@fecp/designer 5.4.27 → 5.4.30

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 (27) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer.css +86 -7
  3. package/es/packages/vue/index.mjs +2 -0
  4. package/es/packages/vue/src/components/all.mjs +6 -0
  5. package/es/packages/vue/src/components/dialog/customDialog/CustomDialog.vue.mjs +172 -0
  6. package/es/packages/vue/src/components/dialog/customDialog/index.mjs +7 -0
  7. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +3 -4
  8. package/es/packages/vue/src/components/layout/Layout.vue.mjs +81 -0
  9. package/es/packages/vue/src/components/layout/index.mjs +9 -0
  10. package/es/packages/vue/src/components/layout/layoutCard/LayoutCard.vue.mjs +162 -0
  11. package/es/packages/vue/src/components/layout/layoutCard/index.mjs +7 -0
  12. package/es/packages/vue/src/directive/layout.mjs +28 -0
  13. package/es/packages/vue/src/utils/datasource.mjs +2 -2
  14. package/lib/designer/package.json.js +1 -1
  15. package/lib/designer.css +86 -7
  16. package/lib/packages/vue/index.js +7 -5
  17. package/lib/packages/vue/src/components/all.js +6 -0
  18. package/lib/packages/vue/src/components/dialog/customDialog/CustomDialog.vue.js +172 -0
  19. package/lib/packages/vue/src/components/dialog/customDialog/index.js +7 -0
  20. package/lib/packages/vue/src/components/forms/form/Form.vue.js +3 -4
  21. package/lib/packages/vue/src/components/layout/Layout.vue.js +81 -0
  22. package/lib/packages/vue/src/components/layout/index.js +9 -0
  23. package/lib/packages/vue/src/components/layout/layoutCard/LayoutCard.vue.js +162 -0
  24. package/lib/packages/vue/src/components/layout/layoutCard/index.js +7 -0
  25. package/lib/packages/vue/src/directive/layout.js +28 -0
  26. package/lib/packages/vue/src/utils/datasource.js +2 -2
  27. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- const version = "5.4.27";
1
+ const version = "5.4.30";
2
2
  const packageJson = {
3
3
  version
4
4
  };
package/es/designer.css CHANGED
@@ -5904,27 +5904,27 @@ body,
5904
5904
  width: 80px;
5905
5905
  font-size: var(--el-font-size-extra-small);
5906
5906
  }
5907
- .fec-form[data-v-5d68b9c4] {
5907
+ .fec-form[data-v-4eb26904] {
5908
5908
  height: 100%;
5909
5909
  }
5910
- [data-v-5d68b9c4] .vgl-item {
5910
+ [data-v-4eb26904] .vgl-item {
5911
5911
  transition: none;
5912
5912
  }
5913
- [data-v-5d68b9c4] .vgl-item > .el-form-item {
5913
+ [data-v-4eb26904] .vgl-item > .el-form-item {
5914
5914
  width: 100%;
5915
5915
  padding: 12px 8px 0 8px;
5916
5916
  height: calc(100% - 15px);
5917
5917
  display: flex;
5918
5918
  }
5919
- [data-v-5d68b9c4] .vgl-item > .el-form-item.el-form-item--label-top {
5919
+ [data-v-4eb26904] .vgl-item > .el-form-item.el-form-item--label-top {
5920
5920
  flex-direction: column;
5921
5921
  }
5922
- [data-v-5d68b9c4] .vgl-item > .el-form-item .el-form-item__label {
5922
+ [data-v-4eb26904] .vgl-item > .el-form-item .el-form-item__label {
5923
5923
  line-height: 20px;
5924
5924
  display: flex;
5925
5925
  align-items: center;
5926
5926
  }
5927
- [data-v-5d68b9c4] .vgl-item > .el-container {
5927
+ [data-v-4eb26904] .vgl-item > .el-container {
5928
5928
  height: auto !important;
5929
5929
  }.cell-content .cell-text[data-v-3e5372d4] {
5930
5930
  display: inline-block;
@@ -6253,7 +6253,86 @@ body,
6253
6253
  .fec-table-container[data-v-45cdf333] .vxe-table .vxe-body--column .c--title {
6254
6254
  height: 40px !important;
6255
6255
  min-height: 40px !important;
6256
- }:root,:host{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background: var(--van-background-2);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: var(--van-padding-base);--van-cell-value-color: var(--van-text-color-2);--van-cell-value-font-size: inherit;--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: inherit}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);font-size:var(--van-cell-value-font-size);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}
6256
+ }
6257
+ .custom-dialog {
6258
+ min-height: 50% !important;
6259
+ height: auto;
6260
+ max-height: 90% !important;
6261
+ padding: 0 !important;
6262
+ }
6263
+ .fec-layout-row[data-v-bb40b3aa] {
6264
+ width: 100%;
6265
+ height: 100%;
6266
+ }
6267
+ .fec-layout-row[data-v-bb40b3aa] .el-col {
6268
+ height: 100%;
6269
+ }
6270
+ .fec-layout-row[data-v-bb40b3aa] .el-col .el-scrollbar__bar {
6271
+ display: none;
6272
+ }
6273
+ .grid-content[data-v-bb40b3aa] {
6274
+ border-radius: 9px 9px 4px 4px;
6275
+ background-color: #fff;
6276
+ position: relative;
6277
+ height: 100%;
6278
+ /* padding: 16px; */
6279
+ overflow: hidden;
6280
+ /* .layout-content {
6281
+ padding: 16px 16px 16px 16px;
6282
+ } */
6283
+ }
6284
+ .grid-content-statistics[data-v-bb40b3aa] {
6285
+ height: 100%;
6286
+ display: flex;
6287
+ flex-direction: column;
6288
+ /* .card-content {
6289
+ display: flex;
6290
+ flex-direction: column;
6291
+ height: 100%;
6292
+ } */
6293
+ }
6294
+ .grid-content-statistics[data-v-bb40b3aa] .fec-layout-card:last-child {
6295
+ margin-bottom: 0 !important;
6296
+ flex: 1;
6297
+ }
6298
+ .fec-layout-card[data-v-3ce25014] {
6299
+ margin-bottom: 8px;
6300
+ border-radius: 4px;
6301
+ background-color: #fff;
6302
+ padding: 16px;
6303
+ display: flex;
6304
+ flex-direction: column;
6305
+ }
6306
+ .fec-layout-card .header[data-v-3ce25014] {
6307
+ display: flex;
6308
+ align-items: center;
6309
+ justify-content: space-between;
6310
+ }
6311
+ .fec-layout-card .header .title[data-v-3ce25014] {
6312
+ display: flex;
6313
+ align-items: center;
6314
+ }
6315
+ .fec-layout-card .header .title .icon[data-v-3ce25014] {
6316
+ color: #fff;
6317
+ width: 30px;
6318
+ height: 30px;
6319
+ display: block;
6320
+ border-radius: 4px;
6321
+ text-align: center;
6322
+ line-height: 30px;
6323
+ font-size: 20px;
6324
+ margin-right: 12px;
6325
+ }
6326
+ .fec-layout-card .header .title > span[data-v-3ce25014] {
6327
+ font-size: 17px;
6328
+ font-weight: bold;
6329
+ color: #1a1a1a;
6330
+ }
6331
+ .fec-layout-card .content[data-v-3ce25014] {
6332
+ flex-grow: 1;
6333
+ padding-top: 12px;
6334
+ }
6335
+ :root,:host{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background: var(--van-background-2);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: var(--van-padding-base);--van-cell-value-color: var(--van-text-color-2);--van-cell-value-font-size: inherit;--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: inherit}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);font-size:var(--van-cell-value-font-size);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}
6257
6336
  :root,:host{--van-cell-group-background: var(--van-background-2);--van-cell-group-title-color: var(--van-text-color-2);--van-cell-group-title-padding: var(--van-padding-md) var(--van-padding-md);--van-cell-group-title-font-size: var(--van-font-size-md);--van-cell-group-title-line-height: 16px;--van-cell-group-inset-padding: 0 var(--van-padding-md);--van-cell-group-inset-radius: var(--van-radius-lg);--van-cell-group-inset-title-padding: var(--van-padding-md) var(--van-padding-md)}.van-cell-group{background:var(--van-cell-group-background)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}
6258
6337
  .van-swipe-cell{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}
6259
6338
 
@@ -5,6 +5,7 @@ import element_plus_default from "../../node_modules/element-plus/es/index.mjs";
5
5
  import * as components from "../../node_modules/vxe-pc-ui/es/components.mjs";
6
6
  /* empty css */
7
7
  /* empty css */
8
+ import layout from "./src/directive/layout.mjs";
8
9
  const fecVue = {
9
10
  install: (app) => {
10
11
  for (let c in all) {
@@ -19,6 +20,7 @@ const fecVue = {
19
20
  locale: zh_cn_default
20
21
  });
21
22
  app.use(components);
23
+ app.use(layout);
22
24
  }
23
25
  };
24
26
  export {
@@ -25,6 +25,9 @@ import { Document } from "./bus/document/index.mjs";
25
25
  import { header } from "./details/header/index.mjs";
26
26
  import { footer } from "./details/footer/index.mjs";
27
27
  import { main } from "./details/main/index.mjs";
28
+ import { customDialog } from "./dialog/customDialog/index.mjs";
29
+ import { Layout } from "./layout/index.mjs";
30
+ import { LayoutCard } from "./layout/layoutCard/index.mjs";
28
31
  export {
29
32
  ApprovalHistory,
30
33
  Area,
@@ -36,6 +39,8 @@ export {
36
39
  FormItem,
37
40
  H2,
38
41
  Industry,
42
+ Layout,
43
+ LayoutCard,
39
44
  MultipleSelection,
40
45
  Number,
41
46
  Radio,
@@ -50,6 +55,7 @@ export {
50
55
  Textarea,
51
56
  Upload,
52
57
  UserSelect,
58
+ customDialog,
53
59
  footer,
54
60
  header,
55
61
  main
@@ -0,0 +1,172 @@
1
+ import "../../../../../../node_modules/element-plus/es/index.mjs";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import { useSlots, computed, ref, watch, createBlock, openBlock, unref, normalizeStyle, normalizeClass, isRef, createSlots, withCtx, renderSlot, createElementVNode, toDisplayString, createVNode, createElementBlock, createTextVNode, Fragment, createCommentVNode } from "vue";
7
+ /* empty css */
8
+ import { ElDialog } from "../../../../../../node_modules/element-plus/es/components/dialog/index.mjs";
9
+ import { ElButton } from "../../../../../../node_modules/element-plus/es/components/button/index.mjs";
10
+ const _sfc_main = {
11
+ __name: "CustomDialog",
12
+ props: {
13
+ modelValue: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ initOption: {
18
+ type: Object,
19
+ default: {
20
+ width: ""
21
+ }
22
+ },
23
+ width: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ height: {
28
+ type: String,
29
+ default: "auto"
30
+ },
31
+ //max,default,min
32
+ size: {
33
+ type: String,
34
+ default: "default"
35
+ },
36
+ class: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ title: {
41
+ type: String,
42
+ default: "标题"
43
+ },
44
+ submitButtonText: {
45
+ type: String,
46
+ default: "确定"
47
+ },
48
+ cancelButtonText: {
49
+ type: String,
50
+ default: "取消"
51
+ },
52
+ query: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ appendToBody: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ hiddenFooter: {
61
+ type: Boolean,
62
+ default: false
63
+ }
64
+ },
65
+ emits: ["submit", "onClose", "update:modelValue"],
66
+ setup(__props, { emit: __emit }) {
67
+ const props = __props;
68
+ const slotFooter = !!useSlots().footer;
69
+ const dialogWidth = computed(() => {
70
+ let w = props.initOption.width || props.width;
71
+ if (w) {
72
+ return w;
73
+ } else {
74
+ if (props.size == "default") {
75
+ return "65%";
76
+ } else if (props.size == "max") {
77
+ return "80%";
78
+ } else if (props.size == "min") {
79
+ return "50%";
80
+ }
81
+ }
82
+ });
83
+ const dialogVisible = ref(false);
84
+ const emit = __emit;
85
+ const onClose = () => {
86
+ emit("onClose");
87
+ emit("update:modelValue", false);
88
+ };
89
+ ref();
90
+ function submit() {
91
+ emit("submit");
92
+ }
93
+ const isFullscreen = ref(false);
94
+ function changeFullscreen() {
95
+ isFullscreen.value = !isFullscreen.value;
96
+ }
97
+ watch(
98
+ () => props.modelValue,
99
+ (visible) => {
100
+ if (visible) {
101
+ isFullscreen.value = false;
102
+ }
103
+ dialogVisible.value = visible;
104
+ },
105
+ {
106
+ immediate: true
107
+ }
108
+ );
109
+ return (_ctx, _cache) => {
110
+ const _component_el_button = ElButton;
111
+ const _component_el_dialog = ElDialog;
112
+ return openBlock(), createBlock(_component_el_dialog, {
113
+ modelValue: unref(dialogVisible),
114
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
115
+ title: props.title,
116
+ onClose,
117
+ "destroy-on-close": "",
118
+ draggable: "",
119
+ "append-to-body": props.appendToBody,
120
+ "close-on-click-modal": false,
121
+ "close-on-press-escape": false,
122
+ width: unref(dialogWidth),
123
+ class: normalizeClass(props.class + " custom-dialog"),
124
+ style: normalizeStyle("height:" + __props.height),
125
+ fullscreen: unref(isFullscreen)
126
+ }, createSlots({
127
+ header: withCtx(() => [
128
+ createElementVNode("span", null, toDisplayString(props.title), 1),
129
+ createElementVNode("i", {
130
+ class: "iconfont icon-MaxScreen max-screen",
131
+ onClick: changeFullscreen
132
+ })
133
+ ]),
134
+ default: withCtx(() => [
135
+ renderSlot(_ctx.$slots, "default")
136
+ ]),
137
+ _: 2
138
+ }, [
139
+ !__props.hiddenFooter ? {
140
+ name: "footer",
141
+ fn: withCtx(() => [
142
+ createVNode(_component_el_button, {
143
+ onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = false)
144
+ }, {
145
+ default: withCtx(() => [
146
+ createTextVNode(toDisplayString(props.cancelButtonText), 1)
147
+ ]),
148
+ _: 1
149
+ }),
150
+ slotFooter ? renderSlot(_ctx.$slots, "footer", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
151
+ !props.query ? (openBlock(), createBlock(_component_el_button, {
152
+ key: 0,
153
+ type: "primary",
154
+ onClick: submit,
155
+ size: "default"
156
+ }, {
157
+ default: withCtx(() => [
158
+ createTextVNode(toDisplayString(props.submitButtonText), 1)
159
+ ]),
160
+ _: 1
161
+ })) : createCommentVNode("", true)
162
+ ], 64))
163
+ ]),
164
+ key: "0"
165
+ } : void 0
166
+ ]), 1032, ["modelValue", "title", "append-to-body", "width", "class", "style", "fullscreen"]);
167
+ };
168
+ }
169
+ };
170
+ export {
171
+ _sfc_main as default
172
+ };
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./CustomDialog.vue.mjs";
2
+ import install from "../../../utils/install.mjs";
3
+ const customDialog = install.withInstall("CustomDialog", _sfc_main);
4
+ export {
5
+ customDialog,
6
+ customDialog as default
7
+ };
@@ -145,7 +145,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
145
145
  }
146
146
  );
147
147
  const loadConfig = async () => {
148
- if (!props.templateKey) {
148
+ if (!props.templateKey && props.initOption && Object.keys(props.initOption).length == 0) {
149
149
  return;
150
150
  }
151
151
  configLoading.value = true;
@@ -190,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
190
190
  mergeOptionsToFields();
191
191
  initGridLayoutDataConfig();
192
192
  initLinkage();
193
- emit("loaded", option);
193
+ emit("loaded", option, getFormData());
194
194
  } catch (error) {
195
195
  console.error("加载配置失败:", error);
196
196
  ElMessage.error("加载配置失败");
@@ -811,7 +811,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
811
811
  );
812
812
  relevantConfigs.dataLink.forEach((item) => {
813
813
  if (checkFilterMatch(item.filterConfig, formData.value, fields)) {
814
- debugger;
815
814
  const fieldAssignments = item.fieldAssignments || [];
816
815
  fieldAssignments.forEach((assignment) => {
817
816
  var _a2, _b;
@@ -1065,7 +1064,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1065
1064
  };
1066
1065
  }
1067
1066
  });
1068
- const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5d68b9c4"]]);
1067
+ const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4eb26904"]]);
1069
1068
  export {
1070
1069
  _Form as default
1071
1070
  };
@@ -0,0 +1,81 @@
1
+ import "../../../../../node_modules/element-plus/es/index.mjs";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import { ref, resolveDirective, withDirectives, createBlock, openBlock, withCtx, createVNode, createElementVNode, unref, isRef, renderSlot, createCommentVNode } from "vue";
7
+ import { Form } from "../forms/form/index.mjs";
8
+ import { cloneDeep } from "../../utils/common.mjs";
9
+ /* empty css */
10
+ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
11
+ import { ElRow } from "../../../../../node_modules/element-plus/es/components/row/index.mjs";
12
+ import { ElCol } from "../../../../../node_modules/element-plus/es/components/col/index.mjs";
13
+ import { ElScrollbar } from "../../../../../node_modules/element-plus/es/components/scrollbar/index.mjs";
14
+ const _hoisted_1 = { class: "grid-content" };
15
+ const _hoisted_2 = { class: "grid-content-statistics" };
16
+ const _sfc_main = {
17
+ __name: "Layout",
18
+ props: {
19
+ templateKey: {
20
+ type: String,
21
+ default: ""
22
+ }
23
+ },
24
+ emits: ["loaded"],
25
+ setup(__props, { emit: __emit }) {
26
+ const formData = ref({});
27
+ const emit = __emit;
28
+ const showCard = ref(false);
29
+ function loaded(option, formData2) {
30
+ showCard.value = true;
31
+ emit("loaded", cloneDeep(formData2));
32
+ }
33
+ return (_ctx, _cache) => {
34
+ const _component_el_scrollbar = ElScrollbar;
35
+ const _component_el_col = ElCol;
36
+ const _component_el_row = ElRow;
37
+ const _directive_fec_layout = resolveDirective("fec-layout");
38
+ return withDirectives((openBlock(), createBlock(_component_el_row, {
39
+ gutter: 8,
40
+ class: "fec-layout-row"
41
+ }, {
42
+ default: withCtx(() => [
43
+ createVNode(_component_el_col, { span: 18 }, {
44
+ default: withCtx(() => [
45
+ createElementVNode("div", _hoisted_1, [
46
+ createVNode(_component_el_scrollbar, { ref: "scrollbarRef" }, {
47
+ default: withCtx(() => [
48
+ createVNode(unref(Form), {
49
+ ref: "formRef",
50
+ templateKey: __props.templateKey,
51
+ modelValue: unref(formData),
52
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(formData) ? formData.value = $event : null),
53
+ onLoaded: loaded
54
+ }, null, 8, ["templateKey", "modelValue"])
55
+ ]),
56
+ _: 1
57
+ }, 512)
58
+ ])
59
+ ]),
60
+ _: 1
61
+ }),
62
+ createVNode(_component_el_col, { span: 6 }, {
63
+ default: withCtx(() => [
64
+ createElementVNode("div", _hoisted_2, [
65
+ unref(showCard) ? renderSlot(_ctx.$slots, "card", { key: 0 }, void 0, true) : createCommentVNode("", true)
66
+ ])
67
+ ]),
68
+ _: 3
69
+ })
70
+ ]),
71
+ _: 3
72
+ })), [
73
+ [_directive_fec_layout]
74
+ ]);
75
+ };
76
+ }
77
+ };
78
+ const _Layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bb40b3aa"]]);
79
+ export {
80
+ _Layout as default
81
+ };
@@ -0,0 +1,9 @@
1
+ import _Layout from "./Layout.vue.mjs";
2
+ import install from "../../utils/install.mjs";
3
+ import { LayoutCard } from "./layoutCard/index.mjs";
4
+ const Layout = install.withInstall("Layout", _Layout);
5
+ export {
6
+ Layout,
7
+ LayoutCard,
8
+ Layout as default
9
+ };
@@ -0,0 +1,162 @@
1
+ import "../../../../../../node_modules/element-plus/es/index.mjs";
2
+ /* empty css */
3
+ /* empty css */
4
+ import { computed, ref, watch, nextTick, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, createBlock, createCommentVNode, normalizeStyle, normalizeClass, toDisplayString, unref, withCtx, createTextVNode, renderSlot, isRef, resolveDynamicComponent, normalizeProps, mergeProps } from "vue";
5
+ import { ArrowRight as arrow_right_default } from "../../../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
6
+ import { customDialog } from "../../dialog/customDialog/index.mjs";
7
+ import api from "../../../api/index.mjs";
8
+ import { getCurrentVueInstance } from "../../../utils/getInstance.mjs";
9
+ import { Form } from "../../forms/form/index.mjs";
10
+ import { Table } from "../../table/index.mjs";
11
+ /* empty css */
12
+ import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
13
+ import { ElButton } from "../../../../../../node_modules/element-plus/es/components/button/index.mjs";
14
+ import { ElIcon } from "../../../../../../node_modules/element-plus/es/components/icon/index.mjs";
15
+ const _hoisted_1 = { class: "fec-layout-card" };
16
+ const _hoisted_2 = { class: "header" };
17
+ const _hoisted_3 = { class: "title" };
18
+ const _hoisted_4 = { class: "content" };
19
+ const _sfc_main = {
20
+ __name: "LayoutCard",
21
+ props: {
22
+ //标题
23
+ title: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ //图标
28
+ icon: {
29
+ type: String,
30
+ default: "icon-authorization"
31
+ },
32
+ //图标背景色
33
+ iconColor: {
34
+ type: String,
35
+ default: "#4fbdc1"
36
+ },
37
+ morePageRoute: {
38
+ type: String,
39
+ default: ""
40
+ },
41
+ morePageTemplateKey: {
42
+ type: String,
43
+ default: ""
44
+ },
45
+ morePageParams: {
46
+ type: Object,
47
+ default: {}
48
+ }
49
+ },
50
+ setup(__props) {
51
+ const props = __props;
52
+ const ctx = getCurrentVueInstance();
53
+ const isMoreBtn = computed(() => {
54
+ return props.morePageRoute || props.morePageTemplateKey;
55
+ });
56
+ const dialogVisible = ref(false);
57
+ const currentComponent = ref(null);
58
+ const currentParams = ref(props.morePageParams);
59
+ const flag = ref(true);
60
+ watch(currentParams, () => {
61
+ if (props.morePageRoute && Object.keys(currentParams).length > 0) {
62
+ flag.value = false;
63
+ nextTick(() => {
64
+ flag.value = true;
65
+ });
66
+ }
67
+ });
68
+ function moreClick() {
69
+ if (props.morePageRoute) {
70
+ loadComponentByPath(props.morePageRoute);
71
+ dialogVisible.value = true;
72
+ } else if (props.morePageTemplateKey) {
73
+ api.findByTemplateKey(ctx.$http, {
74
+ templateKey: props.morePageTemplateKey,
75
+ timestamp: Date.now(),
76
+ templateVersion: "v5"
77
+ }).then((res) => {
78
+ const data = JSON.parse(res);
79
+ if (data.formMode) {
80
+ currentComponent.value = Form;
81
+ } else {
82
+ currentComponent.value = Table;
83
+ }
84
+ currentParams.value.initOption = data;
85
+ currentParams.value.isDialog = true;
86
+ dialogVisible.value = true;
87
+ });
88
+ }
89
+ }
90
+ function loadComponentByPath(path) {
91
+ const route = ctx.$router.getRoutes().find((item) => item.path === path);
92
+ if (!route) return;
93
+ const comp = route.components.default;
94
+ if (!comp) return;
95
+ if (typeof comp === "function") {
96
+ comp().then((module) => {
97
+ currentComponent.value = module.default;
98
+ });
99
+ } else {
100
+ currentComponent.value = comp;
101
+ }
102
+ }
103
+ return (_ctx, _cache) => {
104
+ const _component_el_icon = ElIcon;
105
+ const _component_el_button = ElButton;
106
+ return openBlock(), createElementBlock(Fragment, null, [
107
+ createElementVNode("div", _hoisted_1, [
108
+ createElementVNode("div", _hoisted_2, [
109
+ createElementVNode("div", _hoisted_3, [
110
+ __props.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
111
+ createElementVNode("i", {
112
+ class: normalizeClass("icon iconfont " + __props.icon),
113
+ style: normalizeStyle("background-color:" + __props.iconColor)
114
+ }, null, 6),
115
+ createElementVNode("span", null, toDisplayString(__props.title), 1)
116
+ ], 64)) : createCommentVNode("", true)
117
+ ]),
118
+ unref(isMoreBtn) ? (openBlock(), createBlock(_component_el_button, {
119
+ key: 0,
120
+ class: "moreBtn",
121
+ type: "primary",
122
+ link: "",
123
+ onClick: moreClick
124
+ }, {
125
+ default: withCtx(() => [
126
+ _cache[1] || (_cache[1] = createTextVNode("更多信息")),
127
+ createVNode(_component_el_icon, null, {
128
+ default: withCtx(() => [
129
+ createVNode(unref(arrow_right_default))
130
+ ]),
131
+ _: 1
132
+ })
133
+ ]),
134
+ _: 1
135
+ })) : createCommentVNode("", true)
136
+ ]),
137
+ createElementVNode("div", _hoisted_4, [
138
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
139
+ ])
140
+ ]),
141
+ createVNode(unref(customDialog), {
142
+ modelValue: unref(dialogVisible),
143
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
144
+ width: "80%",
145
+ height: "100%",
146
+ query: "",
147
+ "append-to-body": "",
148
+ title: __props.title
149
+ }, {
150
+ default: withCtx(() => [
151
+ unref(flag) && unref(currentComponent) ? (openBlock(), createBlock(resolveDynamicComponent(unref(currentComponent)), normalizeProps(mergeProps({ key: 0 }, unref(currentParams))), null, 16)) : createCommentVNode("", true)
152
+ ]),
153
+ _: 1
154
+ }, 8, ["modelValue", "title"])
155
+ ], 64);
156
+ };
157
+ }
158
+ };
159
+ const _LayoutCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3ce25014"]]);
160
+ export {
161
+ _LayoutCard as default
162
+ };
@@ -0,0 +1,7 @@
1
+ import _LayoutCard from "./LayoutCard.vue.mjs";
2
+ import install from "../../../utils/install.mjs";
3
+ const LayoutCard = install.withInstall("LayoutCard", _LayoutCard);
4
+ export {
5
+ LayoutCard,
6
+ LayoutCard as default
7
+ };