@fecp/designer 5.2.14 → 5.3.2
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.
- package/es/designer.css +42 -36
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/components/ValueSelector.vue2.mjs +1 -2
- package/es/packages/designer/src/packages/form/property/widgets.vue.mjs +1 -1
- package/es/packages/designer/src/packages/table/property/widgets.vue.mjs +1 -1
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/src/api/index.mjs +3 -0
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +2 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +164 -7
- package/lib/designer.css +42 -36
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/components/ValueSelector.vue2.js +1 -2
- package/lib/packages/designer/src/packages/form/property/widgets.vue.js +1 -1
- package/lib/packages/designer/src/packages/table/property/widgets.vue.js +1 -1
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/src/api/index.js +3 -0
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +2 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +164 -7
- package/package.json +1 -1
package/es/designer.css
CHANGED
|
@@ -550,22 +550,22 @@
|
|
|
550
550
|
margin-right: 1px;
|
|
551
551
|
border-top-left-radius: 0;
|
|
552
552
|
border-bottom-left-radius: 0;
|
|
553
|
-
}[data-v-
|
|
553
|
+
}[data-v-e5b87efa] .el-input-tag .el-input .el-input__suffix {
|
|
554
554
|
position: absolute;
|
|
555
555
|
right: 8px;
|
|
556
556
|
top: 50%;
|
|
557
557
|
transform: translateY(-50%);
|
|
558
558
|
}
|
|
559
|
-
.value-selector-input[data-v-
|
|
559
|
+
.value-selector-input[data-v-e5b87efa] {
|
|
560
560
|
width: 100%;
|
|
561
561
|
padding-right: 0;
|
|
562
562
|
padding-top: 0;
|
|
563
563
|
padding-bottom: 0;
|
|
564
564
|
}
|
|
565
|
-
.value-selector-input[data-v-
|
|
565
|
+
.value-selector-input[data-v-e5b87efa] .el-input__wrapper {
|
|
566
566
|
padding-right: 0;
|
|
567
567
|
}
|
|
568
|
-
.value-selector-input[data-v-
|
|
568
|
+
.value-selector-input[data-v-e5b87efa] .el-input-tag__suffix {
|
|
569
569
|
padding-right: 0;
|
|
570
570
|
}.params-config-container[data-v-097f1353] {
|
|
571
571
|
width: 100%;
|
|
@@ -2264,17 +2264,17 @@
|
|
|
2264
2264
|
}
|
|
2265
2265
|
.setting-btn.is-configured .edit-btn[data-v-db416ffc] {
|
|
2266
2266
|
display: inline-block;
|
|
2267
|
-
}.collapse-header[data-v-
|
|
2267
|
+
}.collapse-header[data-v-b2bc33ea] {
|
|
2268
2268
|
display: flex;
|
|
2269
2269
|
align-items: center;
|
|
2270
2270
|
justify-content: space-between;
|
|
2271
2271
|
width: 100%;
|
|
2272
2272
|
padding-right: 20px;
|
|
2273
2273
|
}
|
|
2274
|
-
.setting[data-v-
|
|
2274
|
+
.setting[data-v-b2bc33ea] .el-collapse-item__content {
|
|
2275
2275
|
position: relative;
|
|
2276
2276
|
}
|
|
2277
|
-
.field-type-select[data-v-
|
|
2277
|
+
.field-type-select[data-v-b2bc33ea] {
|
|
2278
2278
|
position: absolute;
|
|
2279
2279
|
top: 11px;
|
|
2280
2280
|
right: 16px;
|
|
@@ -2285,15 +2285,18 @@
|
|
|
2285
2285
|
transition: all 0.3s;
|
|
2286
2286
|
border-radius: 4px;
|
|
2287
2287
|
}
|
|
2288
|
-
.field-type-select[data-v-
|
|
2288
|
+
.field-type-select[data-v-b2bc33ea] .el-select__wrapper {
|
|
2289
2289
|
background: transparent;
|
|
2290
2290
|
box-shadow: none;
|
|
2291
2291
|
}
|
|
2292
|
-
.field-type-select[data-v-
|
|
2292
|
+
.field-type-select[data-v-b2bc33ea] .el-select__selected-item {
|
|
2293
2293
|
text-align: center;
|
|
2294
2294
|
}
|
|
2295
|
-
.width-input[data-v-
|
|
2295
|
+
.width-input[data-v-b2bc33ea] {
|
|
2296
2296
|
width: 100%;
|
|
2297
|
+
}
|
|
2298
|
+
[data-v-b2bc33ea] .el-form-item__content {
|
|
2299
|
+
flex-wrap: wrap !important;
|
|
2297
2300
|
}.dialog-menu-item[data-v-8f751b6e] {
|
|
2298
2301
|
padding: 10px;
|
|
2299
2302
|
border: 1px solid #ebeef5;
|
|
@@ -3154,17 +3157,17 @@ to {
|
|
|
3154
3157
|
width: 100%;
|
|
3155
3158
|
}
|
|
3156
3159
|
|
|
3157
|
-
.collapse-header[data-v-
|
|
3160
|
+
.collapse-header[data-v-03a024b8] {
|
|
3158
3161
|
display: flex;
|
|
3159
3162
|
align-items: center;
|
|
3160
3163
|
justify-content: space-between;
|
|
3161
3164
|
width: 100%;
|
|
3162
3165
|
padding-right: 20px;
|
|
3163
3166
|
}
|
|
3164
|
-
.setting[data-v-
|
|
3167
|
+
.setting[data-v-03a024b8] .el-collapse-item__content {
|
|
3165
3168
|
position: relative;
|
|
3166
3169
|
}
|
|
3167
|
-
.field-type-select[data-v-
|
|
3170
|
+
.field-type-select[data-v-03a024b8] {
|
|
3168
3171
|
position: absolute;
|
|
3169
3172
|
top: 11px;
|
|
3170
3173
|
right: 16px;
|
|
@@ -3175,39 +3178,42 @@ to {
|
|
|
3175
3178
|
transition: all 0.3s;
|
|
3176
3179
|
border-radius: 4px;
|
|
3177
3180
|
}
|
|
3178
|
-
.field-type-select[data-v-
|
|
3181
|
+
.field-type-select[data-v-03a024b8] .el-select__wrapper {
|
|
3179
3182
|
background: transparent;
|
|
3180
3183
|
box-shadow: none;
|
|
3181
3184
|
}
|
|
3182
|
-
.field-type-select[data-v-
|
|
3185
|
+
.field-type-select[data-v-03a024b8] .el-select__selected-item {
|
|
3183
3186
|
text-align: center;
|
|
3184
3187
|
}
|
|
3185
|
-
.width-input[data-v-
|
|
3188
|
+
.width-input[data-v-03a024b8] {
|
|
3186
3189
|
width: 100%;
|
|
3187
3190
|
}
|
|
3188
|
-
.data-source-fields[data-v-
|
|
3191
|
+
.data-source-fields[data-v-03a024b8] {
|
|
3189
3192
|
display: flex;
|
|
3190
3193
|
flex-direction: column;
|
|
3191
3194
|
gap: 8px;
|
|
3192
3195
|
margin-bottom: 18px;
|
|
3193
3196
|
}
|
|
3194
|
-
.data-source-fields .field-item[data-v-
|
|
3197
|
+
.data-source-fields .field-item[data-v-03a024b8] {
|
|
3195
3198
|
display: flex;
|
|
3196
3199
|
align-items: center;
|
|
3197
3200
|
gap: 8px;
|
|
3198
3201
|
}
|
|
3199
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3202
|
+
.data-source-fields .field-item .field-label[data-v-03a024b8] {
|
|
3200
3203
|
width: 80px;
|
|
3201
3204
|
font-size: 13px;
|
|
3202
3205
|
color: #606266;
|
|
3203
3206
|
text-align: right;
|
|
3204
3207
|
flex-shrink: 0;
|
|
3205
3208
|
}
|
|
3206
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3209
|
+
.data-source-fields .field-item .field-label[data-v-03a024b8]::after {
|
|
3207
3210
|
content: ":";
|
|
3208
3211
|
}
|
|
3209
|
-
.data-source-fields .field-item .el-input[data-v-
|
|
3212
|
+
.data-source-fields .field-item .el-input[data-v-03a024b8] {
|
|
3210
3213
|
flex: 1;
|
|
3214
|
+
}
|
|
3215
|
+
[data-v-03a024b8] .el-form-item__content {
|
|
3216
|
+
flex-wrap: wrap !important;
|
|
3211
3217
|
}.root-property[data-v-e88c3a83] {
|
|
3212
3218
|
width: 300px;
|
|
3213
3219
|
background-color: #fff;
|
|
@@ -5348,18 +5354,18 @@ body,
|
|
|
5348
5354
|
}
|
|
5349
5355
|
.approval-history-content.flowChart[data-v-7be2a6d2] {
|
|
5350
5356
|
background-color: #f9fafc;
|
|
5351
|
-
}.dialog-header-content[data-v-
|
|
5357
|
+
}.dialog-header-content[data-v-7e9fd985] {
|
|
5352
5358
|
font-size: 16px;
|
|
5353
5359
|
font-weight: 600;
|
|
5354
5360
|
color: #303133;
|
|
5355
5361
|
}
|
|
5356
|
-
.dialog-content-wrapper[data-v-
|
|
5362
|
+
.dialog-content-wrapper[data-v-7e9fd985] {
|
|
5357
5363
|
min-height: 500px;
|
|
5358
5364
|
flex-grow: 1;
|
|
5359
5365
|
display: flex;
|
|
5360
5366
|
flex-direction: column;
|
|
5361
5367
|
}
|
|
5362
|
-
.empty-content[data-v-
|
|
5368
|
+
.empty-content[data-v-7e9fd985] {
|
|
5363
5369
|
display: flex;
|
|
5364
5370
|
align-items: center;
|
|
5365
5371
|
justify-content: center;
|
|
@@ -5367,13 +5373,13 @@ body,
|
|
|
5367
5373
|
color: #909399;
|
|
5368
5374
|
font-size: 14px;
|
|
5369
5375
|
}
|
|
5370
|
-
.component-error[data-v-
|
|
5376
|
+
.component-error[data-v-7e9fd985] {
|
|
5371
5377
|
padding: 40px 20px;
|
|
5372
5378
|
text-align: center;
|
|
5373
5379
|
color: #f56c6c;
|
|
5374
5380
|
font-size: 14px;
|
|
5375
5381
|
}
|
|
5376
|
-
.fec-dialog-table[data-v-
|
|
5382
|
+
.fec-dialog-table[data-v-7e9fd985] .table-pagination {
|
|
5377
5383
|
padding: 8px 0 0 0;
|
|
5378
5384
|
}.text-field-wrapper[data-v-b0c0d80f] {
|
|
5379
5385
|
width: 100%;
|
|
@@ -5544,24 +5550,24 @@ body,
|
|
|
5544
5550
|
width: 80px;
|
|
5545
5551
|
font-size: var(--el-font-size-extra-small);
|
|
5546
5552
|
}
|
|
5547
|
-
.fec-form[data-v-
|
|
5553
|
+
.fec-form[data-v-f1c90d7c] {
|
|
5548
5554
|
height: 100%;
|
|
5549
5555
|
}
|
|
5550
|
-
[data-v-
|
|
5556
|
+
[data-v-f1c90d7c] .vgl-item > .el-form-item {
|
|
5551
5557
|
width: 100%;
|
|
5552
5558
|
padding: 12px 8px 0 8px;
|
|
5553
5559
|
height: calc(100% - 15px);
|
|
5554
5560
|
display: flex;
|
|
5555
5561
|
}
|
|
5556
|
-
[data-v-
|
|
5562
|
+
[data-v-f1c90d7c] .vgl-item > .el-form-item.el-form-item--label-top {
|
|
5557
5563
|
flex-direction: column;
|
|
5558
5564
|
}
|
|
5559
|
-
[data-v-
|
|
5565
|
+
[data-v-f1c90d7c] .vgl-item > .el-form-item .el-form-item__label {
|
|
5560
5566
|
line-height: 20px;
|
|
5561
5567
|
display: flex;
|
|
5562
5568
|
align-items: center;
|
|
5563
5569
|
}
|
|
5564
|
-
[data-v-
|
|
5570
|
+
[data-v-f1c90d7c] .vgl-item > .el-container {
|
|
5565
5571
|
height: auto !important;
|
|
5566
5572
|
}.cell-content .cell-text[data-v-b57831f4] {
|
|
5567
5573
|
display: inline-block;
|
|
@@ -5892,11 +5898,6 @@ body,
|
|
|
5892
5898
|
: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)}
|
|
5893
5899
|
: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)}
|
|
5894
5900
|
.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)}
|
|
5895
|
-
:root,:host{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 50px}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}
|
|
5896
|
-
:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width: 321px){.van-action-bar-button{font-size:13px}}
|
|
5897
|
-
:root,:host{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}
|
|
5898
|
-
:root,:host{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-webkit-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}
|
|
5899
|
-
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}
|
|
5900
5901
|
|
|
5901
5902
|
.fec-card[data-v-43900a34] {
|
|
5902
5903
|
margin: 12px;
|
|
@@ -5904,6 +5905,11 @@ body,
|
|
|
5904
5905
|
.fec-swipe-delete-button[data-v-43900a34] {
|
|
5905
5906
|
height: 100%;
|
|
5906
5907
|
}
|
|
5908
|
+
:root,:host{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 50px}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}
|
|
5909
|
+
:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width: 321px){.van-action-bar-button{font-size:13px}}
|
|
5910
|
+
:root,:host{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}
|
|
5911
|
+
:root,:host{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-webkit-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}
|
|
5912
|
+
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}
|
|
5907
5913
|
:root,:host{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
|
|
5908
5914
|
|
|
5909
5915
|
.fec-collapse-container[data-v-3ddaa041] {
|
|
@@ -12,7 +12,6 @@ const _sfc_main = {
|
|
|
12
12
|
// 单选:{ type: 'field', value: '字段ID' }
|
|
13
13
|
// 多选:[{ type: 'field', value: '字段ID1' }, { type: 'field', value: '字段ID2' }]
|
|
14
14
|
modelValue: {
|
|
15
|
-
type: [Object, Array, null, void 0],
|
|
16
15
|
default: () => null
|
|
17
16
|
},
|
|
18
17
|
placeholder: {
|
|
@@ -185,7 +184,7 @@ const _sfc_main = {
|
|
|
185
184
|
};
|
|
186
185
|
}
|
|
187
186
|
};
|
|
188
|
-
const ValueSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
187
|
+
const ValueSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5b87efa"]]);
|
|
189
188
|
export {
|
|
190
189
|
ValueSelector as default
|
|
191
190
|
};
|
|
@@ -1116,7 +1116,7 @@ const _sfc_main = {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
}
|
|
1118
1118
|
};
|
|
1119
|
-
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1119
|
+
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-03a024b8"]]);
|
|
1120
1120
|
export {
|
|
1121
1121
|
widgets as default
|
|
1122
1122
|
};
|
|
@@ -489,7 +489,7 @@ const _sfc_main = {
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
492
|
+
const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b2bc33ea"]]);
|
|
493
493
|
export {
|
|
494
494
|
widgets as default
|
|
495
495
|
};
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { createBlock, openBlock, withCtx, createVNode, renderSlot } from "vue";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
11
|
/* empty css */
|
|
10
12
|
/* empty css */
|
|
11
13
|
/* empty css */
|
|
12
14
|
/* empty css */
|
|
13
15
|
/* empty css */
|
|
14
|
-
/* empty css */
|
|
15
|
-
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
16
16
|
import { SwipeCell } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/swipe-cell/index.mjs";
|
|
17
17
|
import { showConfirmDialog } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/function-call.mjs";
|
|
18
18
|
import "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/index.mjs";
|
|
@@ -10,6 +10,9 @@ const api = {
|
|
|
10
10
|
},
|
|
11
11
|
getTemplateDialogById: ($http, id) => {
|
|
12
12
|
return $http.postForm(`${$servers.base}/template/sysTemplateDialog/getById`, { id });
|
|
13
|
+
},
|
|
14
|
+
getProductData: ($http, prodId) => {
|
|
15
|
+
return $http.postForm(`${$servers.base}/design/getProductData`, { prodId });
|
|
13
16
|
}
|
|
14
17
|
};
|
|
15
18
|
export {
|
|
@@ -193,6 +193,7 @@ const _sfc_main = {
|
|
|
193
193
|
// exposed: dialogTableRef.value,
|
|
194
194
|
// },
|
|
195
195
|
// },
|
|
196
|
+
form: props.componentCtx,
|
|
196
197
|
table: props.componentCtx
|
|
197
198
|
},
|
|
198
199
|
row: props.formData,
|
|
@@ -410,7 +411,7 @@ const _sfc_main = {
|
|
|
410
411
|
};
|
|
411
412
|
}
|
|
412
413
|
};
|
|
413
|
-
const DialogRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
414
|
+
const DialogRenderer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e9fd985"]]);
|
|
414
415
|
export {
|
|
415
416
|
DialogRenderer as default
|
|
416
417
|
};
|
|
@@ -24,6 +24,7 @@ import { useEventFlow } from "../../../utils/eventFlow/eventFlowHandler.mjs";
|
|
|
24
24
|
/* empty css */
|
|
25
25
|
/* empty css */
|
|
26
26
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
27
|
+
import api from "../../../api/index.mjs";
|
|
27
28
|
/* empty css */
|
|
28
29
|
/* empty css */
|
|
29
30
|
import { usePageEvents } from "../../../composables/usePageEvents.mjs";
|
|
@@ -98,6 +99,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
98
99
|
const formRules = ref({});
|
|
99
100
|
const dataSourceOptions = ref({});
|
|
100
101
|
const dictionaryOptions = ref({});
|
|
102
|
+
const productData = ref({});
|
|
101
103
|
const fieldsData = ref({});
|
|
102
104
|
const hiddenFields = ref({});
|
|
103
105
|
const rowHeight = ref(1);
|
|
@@ -144,8 +146,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
144
146
|
return item.component;
|
|
145
147
|
});
|
|
146
148
|
hiddenFields.value = option.hiddenFields || [];
|
|
147
|
-
loadFormData();
|
|
148
149
|
await loadFieldDataSources();
|
|
150
|
+
loadFormData();
|
|
149
151
|
loadEventFlow();
|
|
150
152
|
if (pageEvents && localConfig.value.pageEventConfig) {
|
|
151
153
|
const onCreatedEvent = localConfig.value.pageEventConfig.find(
|
|
@@ -156,6 +158,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
156
158
|
await pageEvents.executeEvent("onCreated");
|
|
157
159
|
}
|
|
158
160
|
}
|
|
161
|
+
await loadProductData();
|
|
162
|
+
applyProductConfigToForm();
|
|
163
|
+
mergeOptionsToFields();
|
|
159
164
|
} catch (error) {
|
|
160
165
|
console.error("加载配置失败:", error);
|
|
161
166
|
ElMessage.error("加载配置失败");
|
|
@@ -164,12 +169,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
164
169
|
}
|
|
165
170
|
};
|
|
166
171
|
const loadFormData = () => {
|
|
167
|
-
const
|
|
172
|
+
const defaultData = {};
|
|
168
173
|
const rules = {};
|
|
169
174
|
if (fieldsData.value) {
|
|
170
175
|
fieldsData.value.forEach((component) => {
|
|
171
176
|
if (component.fieldName) {
|
|
172
|
-
|
|
177
|
+
defaultData[component.fieldName] = component.defaultValue ? component.defaultValue : null;
|
|
173
178
|
}
|
|
174
179
|
if (component.fieldName) {
|
|
175
180
|
const fieldRules = generateFieldRules(component);
|
|
@@ -182,11 +187,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
182
187
|
if (hiddenFields.value && hiddenFields.value.length > 0) {
|
|
183
188
|
hiddenFields.value.forEach((field) => {
|
|
184
189
|
if (field.fieldName) {
|
|
185
|
-
|
|
190
|
+
defaultData[field.fieldName] = field.value !== void 0 ? field.value : null;
|
|
186
191
|
}
|
|
187
192
|
});
|
|
188
193
|
}
|
|
189
|
-
formData.value = { ...
|
|
194
|
+
formData.value = { ...defaultData, ...props.modelValue };
|
|
190
195
|
formRules.value = rules;
|
|
191
196
|
};
|
|
192
197
|
const loadFieldDataSources = async () => {
|
|
@@ -251,7 +256,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
251
256
|
console.error("Failed to load dictionary data:", error);
|
|
252
257
|
}
|
|
253
258
|
}
|
|
254
|
-
mergeOptionsToFields();
|
|
255
259
|
};
|
|
256
260
|
const mergeOptionsToFields = () => {
|
|
257
261
|
if (fieldsData.value) {
|
|
@@ -288,7 +292,157 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
288
292
|
} else if (optionSource === "custom") {
|
|
289
293
|
component.optionConfig.options = component.optionConfig.options || [];
|
|
290
294
|
}
|
|
295
|
+
applyProductConfigFilter(component);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const loadProductData = async () => {
|
|
300
|
+
if (!localConfig.value || !localConfig.value.prodConfig) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const { prodId } = localConfig.value.prodConfig;
|
|
304
|
+
if (!prodId) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
const field = [...fieldsData.value, ...hiddenFields.value].find(
|
|
308
|
+
(item) => item.id == prodId.value
|
|
309
|
+
);
|
|
310
|
+
if (!field) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
const prodIdValue = formData.value[field.fieldName];
|
|
314
|
+
if (!prodIdValue) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
try {
|
|
318
|
+
const response = await api.getProductData(ctx.$http, prodIdValue);
|
|
319
|
+
productData.value = response;
|
|
320
|
+
console.log("产品数据加载成功:", productData.value);
|
|
321
|
+
} catch (error) {
|
|
322
|
+
console.error("获取产品数据失败:", error);
|
|
323
|
+
productData.value = {};
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
const prodRules = ref({});
|
|
327
|
+
const applyProductConfigToForm = () => {
|
|
328
|
+
if (!localConfig.value || !localConfig.value.prodConfig || !productData.value) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const { defaultValueConfigs, validationConfigs } = localConfig.value.prodConfig;
|
|
332
|
+
if (defaultValueConfigs && defaultValueConfigs.length > 0) {
|
|
333
|
+
defaultValueConfigs.forEach((config) => {
|
|
334
|
+
if (config.pageField && config.productConfigField) {
|
|
335
|
+
const defaultValue = productData.value[config.productConfigField];
|
|
336
|
+
if (defaultValue !== void 0) {
|
|
337
|
+
const formField = [...fieldsData.value, ...hiddenFields.value].find(
|
|
338
|
+
(item) => item.id == config.pageField
|
|
339
|
+
);
|
|
340
|
+
if (formField && !formData.value[formField.fieldName]) {
|
|
341
|
+
formData.value[formField.fieldName] = defaultValue;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
if (validationConfigs && validationConfigs.length > 0) {
|
|
348
|
+
validationConfigs.forEach((config) => {
|
|
349
|
+
if (config.pageField && (config.minProductField || config.maxProductField)) {
|
|
350
|
+
const minValue = productData.value[config.minProductField];
|
|
351
|
+
const maxValue = productData.value[config.maxProductField];
|
|
352
|
+
if (minValue !== void 0 || maxValue !== void 0) {
|
|
353
|
+
const formField = [...fieldsData.value, ...hiddenFields.value].find(
|
|
354
|
+
(item) => item.id == config.pageField
|
|
355
|
+
);
|
|
356
|
+
if (formField && !prodRules.value[formField.fieldName]) {
|
|
357
|
+
prodRules.value[formField.fieldName] = [];
|
|
358
|
+
}
|
|
359
|
+
const customValidator = (rule, value, callback) => {
|
|
360
|
+
console.log(
|
|
361
|
+
"🚀 ~ customValidator 被调用 ~ 字段:",
|
|
362
|
+
formField == null ? void 0 : formField.fieldName,
|
|
363
|
+
"值:",
|
|
364
|
+
value,
|
|
365
|
+
"minValue:",
|
|
366
|
+
minValue,
|
|
367
|
+
"maxValue:",
|
|
368
|
+
maxValue
|
|
369
|
+
);
|
|
370
|
+
if (value === null || value === void 0 || value === "") {
|
|
371
|
+
callback();
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const numValue = Number(value);
|
|
375
|
+
if (isNaN(numValue)) {
|
|
376
|
+
callback(new Error("请输入有效的数字"));
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
let errorMessage = "";
|
|
380
|
+
if (minValue !== void 0 && numValue < Number(minValue)) {
|
|
381
|
+
errorMessage = `不能小于 ${minValue}`;
|
|
382
|
+
}
|
|
383
|
+
if (maxValue !== void 0 && numValue > Number(maxValue)) {
|
|
384
|
+
if (errorMessage) {
|
|
385
|
+
errorMessage = `${errorMessage} 且 不能大于 ${maxValue}`;
|
|
386
|
+
} else {
|
|
387
|
+
errorMessage = `不能大于 ${maxValue}`;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (errorMessage) {
|
|
391
|
+
callback(new Error(errorMessage));
|
|
392
|
+
} else {
|
|
393
|
+
callback();
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
const customRule = {
|
|
397
|
+
validator: customValidator,
|
|
398
|
+
trigger: "blur"
|
|
399
|
+
};
|
|
400
|
+
prodRules.value[formField.fieldName].push(customRule);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
291
403
|
});
|
|
404
|
+
for (let fieldName in prodRules.value) {
|
|
405
|
+
if (formRules.value[fieldName]) {
|
|
406
|
+
formRules.value[fieldName].push(...prodRules.value[fieldName]);
|
|
407
|
+
} else {
|
|
408
|
+
formRules.value[fieldName] = prodRules.value[fieldName];
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
const applyProductConfigFilter = (component) => {
|
|
414
|
+
if (!localConfig.value || !localConfig.value.prodConfig || !productData.value) {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const { optionConfigs } = localConfig.value.prodConfig;
|
|
418
|
+
if (!optionConfigs || !component.optionConfig || !component.optionConfig.options) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
const componentConfig = optionConfigs.find(
|
|
422
|
+
(item) => item.pageField == component.id
|
|
423
|
+
);
|
|
424
|
+
if (!componentConfig || !componentConfig.productConfigField) {
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
const fieldValue = productData.value[componentConfig.productConfigField];
|
|
428
|
+
if (!fieldValue) {
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
const allowedValues = Array.isArray(fieldValue) ? fieldValue : fieldValue.split("|");
|
|
432
|
+
component.optionConfig.options = component.optionConfig.options.filter(
|
|
433
|
+
(option) => {
|
|
434
|
+
const optionValue = option.value !== void 0 ? option.value : option;
|
|
435
|
+
return allowedValues.includes(optionValue);
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
if (component.optionConfig.options.length === 0) {
|
|
439
|
+
component.optionConfig.options = [
|
|
440
|
+
{
|
|
441
|
+
label: `无可用选项(产品配置限制)`,
|
|
442
|
+
value: "",
|
|
443
|
+
disabled: true
|
|
444
|
+
}
|
|
445
|
+
];
|
|
292
446
|
}
|
|
293
447
|
};
|
|
294
448
|
const handleEvent = ref(null);
|
|
@@ -411,6 +565,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
411
565
|
}
|
|
412
566
|
}
|
|
413
567
|
});
|
|
568
|
+
for (let fieldName in prodRules.value) {
|
|
569
|
+
rules[fieldName] = prodRules.value[fieldName];
|
|
570
|
+
}
|
|
414
571
|
formRules.value = rules;
|
|
415
572
|
const readonlyArr = (linkedConfig == null ? void 0 : linkedConfig.readonly) || [];
|
|
416
573
|
readonlyArr.forEach((item) => {
|
|
@@ -693,7 +850,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
693
850
|
};
|
|
694
851
|
}
|
|
695
852
|
});
|
|
696
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
853
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f1c90d7c"]]);
|
|
697
854
|
export {
|
|
698
855
|
_Form as default
|
|
699
856
|
};
|
package/lib/designer.css
CHANGED
|
@@ -550,22 +550,22 @@
|
|
|
550
550
|
margin-right: 1px;
|
|
551
551
|
border-top-left-radius: 0;
|
|
552
552
|
border-bottom-left-radius: 0;
|
|
553
|
-
}[data-v-
|
|
553
|
+
}[data-v-e5b87efa] .el-input-tag .el-input .el-input__suffix {
|
|
554
554
|
position: absolute;
|
|
555
555
|
right: 8px;
|
|
556
556
|
top: 50%;
|
|
557
557
|
transform: translateY(-50%);
|
|
558
558
|
}
|
|
559
|
-
.value-selector-input[data-v-
|
|
559
|
+
.value-selector-input[data-v-e5b87efa] {
|
|
560
560
|
width: 100%;
|
|
561
561
|
padding-right: 0;
|
|
562
562
|
padding-top: 0;
|
|
563
563
|
padding-bottom: 0;
|
|
564
564
|
}
|
|
565
|
-
.value-selector-input[data-v-
|
|
565
|
+
.value-selector-input[data-v-e5b87efa] .el-input__wrapper {
|
|
566
566
|
padding-right: 0;
|
|
567
567
|
}
|
|
568
|
-
.value-selector-input[data-v-
|
|
568
|
+
.value-selector-input[data-v-e5b87efa] .el-input-tag__suffix {
|
|
569
569
|
padding-right: 0;
|
|
570
570
|
}.params-config-container[data-v-097f1353] {
|
|
571
571
|
width: 100%;
|
|
@@ -2264,17 +2264,17 @@
|
|
|
2264
2264
|
}
|
|
2265
2265
|
.setting-btn.is-configured .edit-btn[data-v-db416ffc] {
|
|
2266
2266
|
display: inline-block;
|
|
2267
|
-
}.collapse-header[data-v-
|
|
2267
|
+
}.collapse-header[data-v-b2bc33ea] {
|
|
2268
2268
|
display: flex;
|
|
2269
2269
|
align-items: center;
|
|
2270
2270
|
justify-content: space-between;
|
|
2271
2271
|
width: 100%;
|
|
2272
2272
|
padding-right: 20px;
|
|
2273
2273
|
}
|
|
2274
|
-
.setting[data-v-
|
|
2274
|
+
.setting[data-v-b2bc33ea] .el-collapse-item__content {
|
|
2275
2275
|
position: relative;
|
|
2276
2276
|
}
|
|
2277
|
-
.field-type-select[data-v-
|
|
2277
|
+
.field-type-select[data-v-b2bc33ea] {
|
|
2278
2278
|
position: absolute;
|
|
2279
2279
|
top: 11px;
|
|
2280
2280
|
right: 16px;
|
|
@@ -2285,15 +2285,18 @@
|
|
|
2285
2285
|
transition: all 0.3s;
|
|
2286
2286
|
border-radius: 4px;
|
|
2287
2287
|
}
|
|
2288
|
-
.field-type-select[data-v-
|
|
2288
|
+
.field-type-select[data-v-b2bc33ea] .el-select__wrapper {
|
|
2289
2289
|
background: transparent;
|
|
2290
2290
|
box-shadow: none;
|
|
2291
2291
|
}
|
|
2292
|
-
.field-type-select[data-v-
|
|
2292
|
+
.field-type-select[data-v-b2bc33ea] .el-select__selected-item {
|
|
2293
2293
|
text-align: center;
|
|
2294
2294
|
}
|
|
2295
|
-
.width-input[data-v-
|
|
2295
|
+
.width-input[data-v-b2bc33ea] {
|
|
2296
2296
|
width: 100%;
|
|
2297
|
+
}
|
|
2298
|
+
[data-v-b2bc33ea] .el-form-item__content {
|
|
2299
|
+
flex-wrap: wrap !important;
|
|
2297
2300
|
}.dialog-menu-item[data-v-8f751b6e] {
|
|
2298
2301
|
padding: 10px;
|
|
2299
2302
|
border: 1px solid #ebeef5;
|
|
@@ -3154,17 +3157,17 @@ to {
|
|
|
3154
3157
|
width: 100%;
|
|
3155
3158
|
}
|
|
3156
3159
|
|
|
3157
|
-
.collapse-header[data-v-
|
|
3160
|
+
.collapse-header[data-v-03a024b8] {
|
|
3158
3161
|
display: flex;
|
|
3159
3162
|
align-items: center;
|
|
3160
3163
|
justify-content: space-between;
|
|
3161
3164
|
width: 100%;
|
|
3162
3165
|
padding-right: 20px;
|
|
3163
3166
|
}
|
|
3164
|
-
.setting[data-v-
|
|
3167
|
+
.setting[data-v-03a024b8] .el-collapse-item__content {
|
|
3165
3168
|
position: relative;
|
|
3166
3169
|
}
|
|
3167
|
-
.field-type-select[data-v-
|
|
3170
|
+
.field-type-select[data-v-03a024b8] {
|
|
3168
3171
|
position: absolute;
|
|
3169
3172
|
top: 11px;
|
|
3170
3173
|
right: 16px;
|
|
@@ -3175,39 +3178,42 @@ to {
|
|
|
3175
3178
|
transition: all 0.3s;
|
|
3176
3179
|
border-radius: 4px;
|
|
3177
3180
|
}
|
|
3178
|
-
.field-type-select[data-v-
|
|
3181
|
+
.field-type-select[data-v-03a024b8] .el-select__wrapper {
|
|
3179
3182
|
background: transparent;
|
|
3180
3183
|
box-shadow: none;
|
|
3181
3184
|
}
|
|
3182
|
-
.field-type-select[data-v-
|
|
3185
|
+
.field-type-select[data-v-03a024b8] .el-select__selected-item {
|
|
3183
3186
|
text-align: center;
|
|
3184
3187
|
}
|
|
3185
|
-
.width-input[data-v-
|
|
3188
|
+
.width-input[data-v-03a024b8] {
|
|
3186
3189
|
width: 100%;
|
|
3187
3190
|
}
|
|
3188
|
-
.data-source-fields[data-v-
|
|
3191
|
+
.data-source-fields[data-v-03a024b8] {
|
|
3189
3192
|
display: flex;
|
|
3190
3193
|
flex-direction: column;
|
|
3191
3194
|
gap: 8px;
|
|
3192
3195
|
margin-bottom: 18px;
|
|
3193
3196
|
}
|
|
3194
|
-
.data-source-fields .field-item[data-v-
|
|
3197
|
+
.data-source-fields .field-item[data-v-03a024b8] {
|
|
3195
3198
|
display: flex;
|
|
3196
3199
|
align-items: center;
|
|
3197
3200
|
gap: 8px;
|
|
3198
3201
|
}
|
|
3199
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3202
|
+
.data-source-fields .field-item .field-label[data-v-03a024b8] {
|
|
3200
3203
|
width: 80px;
|
|
3201
3204
|
font-size: 13px;
|
|
3202
3205
|
color: #606266;
|
|
3203
3206
|
text-align: right;
|
|
3204
3207
|
flex-shrink: 0;
|
|
3205
3208
|
}
|
|
3206
|
-
.data-source-fields .field-item .field-label[data-v-
|
|
3209
|
+
.data-source-fields .field-item .field-label[data-v-03a024b8]::after {
|
|
3207
3210
|
content: ":";
|
|
3208
3211
|
}
|
|
3209
|
-
.data-source-fields .field-item .el-input[data-v-
|
|
3212
|
+
.data-source-fields .field-item .el-input[data-v-03a024b8] {
|
|
3210
3213
|
flex: 1;
|
|
3214
|
+
}
|
|
3215
|
+
[data-v-03a024b8] .el-form-item__content {
|
|
3216
|
+
flex-wrap: wrap !important;
|
|
3211
3217
|
}.root-property[data-v-e88c3a83] {
|
|
3212
3218
|
width: 300px;
|
|
3213
3219
|
background-color: #fff;
|
|
@@ -5348,18 +5354,18 @@ body,
|
|
|
5348
5354
|
}
|
|
5349
5355
|
.approval-history-content.flowChart[data-v-7be2a6d2] {
|
|
5350
5356
|
background-color: #f9fafc;
|
|
5351
|
-
}.dialog-header-content[data-v-
|
|
5357
|
+
}.dialog-header-content[data-v-7e9fd985] {
|
|
5352
5358
|
font-size: 16px;
|
|
5353
5359
|
font-weight: 600;
|
|
5354
5360
|
color: #303133;
|
|
5355
5361
|
}
|
|
5356
|
-
.dialog-content-wrapper[data-v-
|
|
5362
|
+
.dialog-content-wrapper[data-v-7e9fd985] {
|
|
5357
5363
|
min-height: 500px;
|
|
5358
5364
|
flex-grow: 1;
|
|
5359
5365
|
display: flex;
|
|
5360
5366
|
flex-direction: column;
|
|
5361
5367
|
}
|
|
5362
|
-
.empty-content[data-v-
|
|
5368
|
+
.empty-content[data-v-7e9fd985] {
|
|
5363
5369
|
display: flex;
|
|
5364
5370
|
align-items: center;
|
|
5365
5371
|
justify-content: center;
|
|
@@ -5367,13 +5373,13 @@ body,
|
|
|
5367
5373
|
color: #909399;
|
|
5368
5374
|
font-size: 14px;
|
|
5369
5375
|
}
|
|
5370
|
-
.component-error[data-v-
|
|
5376
|
+
.component-error[data-v-7e9fd985] {
|
|
5371
5377
|
padding: 40px 20px;
|
|
5372
5378
|
text-align: center;
|
|
5373
5379
|
color: #f56c6c;
|
|
5374
5380
|
font-size: 14px;
|
|
5375
5381
|
}
|
|
5376
|
-
.fec-dialog-table[data-v-
|
|
5382
|
+
.fec-dialog-table[data-v-7e9fd985] .table-pagination {
|
|
5377
5383
|
padding: 8px 0 0 0;
|
|
5378
5384
|
}.text-field-wrapper[data-v-b0c0d80f] {
|
|
5379
5385
|
width: 100%;
|
|
@@ -5544,24 +5550,24 @@ body,
|
|
|
5544
5550
|
width: 80px;
|
|
5545
5551
|
font-size: var(--el-font-size-extra-small);
|
|
5546
5552
|
}
|
|
5547
|
-
.fec-form[data-v-
|
|
5553
|
+
.fec-form[data-v-f1c90d7c] {
|
|
5548
5554
|
height: 100%;
|
|
5549
5555
|
}
|
|
5550
|
-
[data-v-
|
|
5556
|
+
[data-v-f1c90d7c] .vgl-item > .el-form-item {
|
|
5551
5557
|
width: 100%;
|
|
5552
5558
|
padding: 12px 8px 0 8px;
|
|
5553
5559
|
height: calc(100% - 15px);
|
|
5554
5560
|
display: flex;
|
|
5555
5561
|
}
|
|
5556
|
-
[data-v-
|
|
5562
|
+
[data-v-f1c90d7c] .vgl-item > .el-form-item.el-form-item--label-top {
|
|
5557
5563
|
flex-direction: column;
|
|
5558
5564
|
}
|
|
5559
|
-
[data-v-
|
|
5565
|
+
[data-v-f1c90d7c] .vgl-item > .el-form-item .el-form-item__label {
|
|
5560
5566
|
line-height: 20px;
|
|
5561
5567
|
display: flex;
|
|
5562
5568
|
align-items: center;
|
|
5563
5569
|
}
|
|
5564
|
-
[data-v-
|
|
5570
|
+
[data-v-f1c90d7c] .vgl-item > .el-container {
|
|
5565
5571
|
height: auto !important;
|
|
5566
5572
|
}.cell-content .cell-text[data-v-b57831f4] {
|
|
5567
5573
|
display: inline-block;
|
|
@@ -5892,11 +5898,6 @@ body,
|
|
|
5892
5898
|
: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)}
|
|
5893
5899
|
: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)}
|
|
5894
5900
|
.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)}
|
|
5895
|
-
:root,:host{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 50px}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}
|
|
5896
|
-
:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width: 321px){.van-action-bar-button{font-size:13px}}
|
|
5897
|
-
:root,:host{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}
|
|
5898
|
-
:root,:host{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-webkit-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}
|
|
5899
|
-
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}
|
|
5900
5901
|
|
|
5901
5902
|
.fec-card[data-v-43900a34] {
|
|
5902
5903
|
margin: 12px;
|
|
@@ -5904,6 +5905,11 @@ body,
|
|
|
5904
5905
|
.fec-swipe-delete-button[data-v-43900a34] {
|
|
5905
5906
|
height: 100%;
|
|
5906
5907
|
}
|
|
5908
|
+
:root,:host{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 50px}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}
|
|
5909
|
+
:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width: 321px){.van-action-bar-button{font-size:13px}}
|
|
5910
|
+
:root,:host{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}
|
|
5911
|
+
:root,:host{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-webkit-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}
|
|
5912
|
+
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width: 321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}
|
|
5907
5913
|
:root,:host{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
|
|
5908
5914
|
|
|
5909
5915
|
.fec-collapse-container[data-v-3ddaa041] {
|
|
@@ -14,7 +14,6 @@ const _sfc_main = {
|
|
|
14
14
|
// 单选:{ type: 'field', value: '字段ID' }
|
|
15
15
|
// 多选:[{ type: 'field', value: '字段ID1' }, { type: 'field', value: '字段ID2' }]
|
|
16
16
|
modelValue: {
|
|
17
|
-
type: [Object, Array, null, void 0],
|
|
18
17
|
default: () => null
|
|
19
18
|
},
|
|
20
19
|
placeholder: {
|
|
@@ -187,5 +186,5 @@ const _sfc_main = {
|
|
|
187
186
|
};
|
|
188
187
|
}
|
|
189
188
|
};
|
|
190
|
-
const ValueSelector = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
189
|
+
const ValueSelector = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-e5b87efa"]]);
|
|
191
190
|
exports.default = ValueSelector;
|
|
@@ -1118,5 +1118,5 @@ const _sfc_main = {
|
|
|
1118
1118
|
};
|
|
1119
1119
|
}
|
|
1120
1120
|
};
|
|
1121
|
-
const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1121
|
+
const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-03a024b8"]]);
|
|
1122
1122
|
exports.default = widgets;
|
|
@@ -491,5 +491,5 @@ const _sfc_main = {
|
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
|
-
const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
494
|
+
const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b2bc33ea"]]);
|
|
495
495
|
exports.default = widgets;
|
|
@@ -8,13 +8,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const vue = require("vue");
|
|
11
|
+
;/* empty css */
|
|
12
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
11
13
|
;/* empty css */
|
|
12
14
|
;/* empty css */
|
|
13
15
|
;/* empty css */
|
|
14
16
|
;/* empty css */
|
|
15
17
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
18
18
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/swipe-cell/index.js");
|
|
19
19
|
const functionCall = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/function-call.js");
|
|
20
20
|
require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/index.js");
|
|
@@ -12,6 +12,9 @@ const api = {
|
|
|
12
12
|
},
|
|
13
13
|
getTemplateDialogById: ($http, id) => {
|
|
14
14
|
return $http.postForm(`${$servers.base}/template/sysTemplateDialog/getById`, { id });
|
|
15
|
+
},
|
|
16
|
+
getProductData: ($http, prodId) => {
|
|
17
|
+
return $http.postForm(`${$servers.base}/design/getProductData`, { prodId });
|
|
15
18
|
}
|
|
16
19
|
};
|
|
17
20
|
exports.default = api;
|
|
@@ -195,6 +195,7 @@ const _sfc_main = {
|
|
|
195
195
|
// exposed: dialogTableRef.value,
|
|
196
196
|
// },
|
|
197
197
|
// },
|
|
198
|
+
form: props.componentCtx,
|
|
198
199
|
table: props.componentCtx
|
|
199
200
|
},
|
|
200
201
|
row: props.formData,
|
|
@@ -412,5 +413,5 @@ const _sfc_main = {
|
|
|
412
413
|
};
|
|
413
414
|
}
|
|
414
415
|
};
|
|
415
|
-
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
416
|
+
const DialogRenderer = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-7e9fd985"]]);
|
|
416
417
|
exports.default = DialogRenderer;
|
|
@@ -26,6 +26,7 @@ const eventFlowHandler = require("../../../utils/eventFlow/eventFlowHandler.js")
|
|
|
26
26
|
;/* empty css */
|
|
27
27
|
;/* empty css */
|
|
28
28
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
29
|
+
const index$6 = require("../../../api/index.js");
|
|
29
30
|
;/* empty css */
|
|
30
31
|
;/* empty css */
|
|
31
32
|
const usePageEvents = require("../../../composables/usePageEvents.js");
|
|
@@ -100,6 +101,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
100
101
|
const formRules = vue.ref({});
|
|
101
102
|
const dataSourceOptions = vue.ref({});
|
|
102
103
|
const dictionaryOptions = vue.ref({});
|
|
104
|
+
const productData = vue.ref({});
|
|
103
105
|
const fieldsData = vue.ref({});
|
|
104
106
|
const hiddenFields = vue.ref({});
|
|
105
107
|
const rowHeight = vue.ref(1);
|
|
@@ -146,8 +148,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
146
148
|
return item.component;
|
|
147
149
|
});
|
|
148
150
|
hiddenFields.value = option.hiddenFields || [];
|
|
149
|
-
loadFormData();
|
|
150
151
|
await loadFieldDataSources();
|
|
152
|
+
loadFormData();
|
|
151
153
|
loadEventFlow();
|
|
152
154
|
if (pageEvents && localConfig.value.pageEventConfig) {
|
|
153
155
|
const onCreatedEvent = localConfig.value.pageEventConfig.find(
|
|
@@ -158,6 +160,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
158
160
|
await pageEvents.executeEvent("onCreated");
|
|
159
161
|
}
|
|
160
162
|
}
|
|
163
|
+
await loadProductData();
|
|
164
|
+
applyProductConfigToForm();
|
|
165
|
+
mergeOptionsToFields();
|
|
161
166
|
} catch (error) {
|
|
162
167
|
console.error("加载配置失败:", error);
|
|
163
168
|
index$5.ElMessage.error("加载配置失败");
|
|
@@ -166,12 +171,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
166
171
|
}
|
|
167
172
|
};
|
|
168
173
|
const loadFormData = () => {
|
|
169
|
-
const
|
|
174
|
+
const defaultData = {};
|
|
170
175
|
const rules = {};
|
|
171
176
|
if (fieldsData.value) {
|
|
172
177
|
fieldsData.value.forEach((component) => {
|
|
173
178
|
if (component.fieldName) {
|
|
174
|
-
|
|
179
|
+
defaultData[component.fieldName] = component.defaultValue ? component.defaultValue : null;
|
|
175
180
|
}
|
|
176
181
|
if (component.fieldName) {
|
|
177
182
|
const fieldRules = validation.generateFieldRules(component);
|
|
@@ -184,11 +189,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
184
189
|
if (hiddenFields.value && hiddenFields.value.length > 0) {
|
|
185
190
|
hiddenFields.value.forEach((field) => {
|
|
186
191
|
if (field.fieldName) {
|
|
187
|
-
|
|
192
|
+
defaultData[field.fieldName] = field.value !== void 0 ? field.value : null;
|
|
188
193
|
}
|
|
189
194
|
});
|
|
190
195
|
}
|
|
191
|
-
formData.value = { ...
|
|
196
|
+
formData.value = { ...defaultData, ...props.modelValue };
|
|
192
197
|
formRules.value = rules;
|
|
193
198
|
};
|
|
194
199
|
const loadFieldDataSources = async () => {
|
|
@@ -253,7 +258,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
253
258
|
console.error("Failed to load dictionary data:", error);
|
|
254
259
|
}
|
|
255
260
|
}
|
|
256
|
-
mergeOptionsToFields();
|
|
257
261
|
};
|
|
258
262
|
const mergeOptionsToFields = () => {
|
|
259
263
|
if (fieldsData.value) {
|
|
@@ -290,7 +294,157 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
290
294
|
} else if (optionSource === "custom") {
|
|
291
295
|
component.optionConfig.options = component.optionConfig.options || [];
|
|
292
296
|
}
|
|
297
|
+
applyProductConfigFilter(component);
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
const loadProductData = async () => {
|
|
302
|
+
if (!localConfig.value || !localConfig.value.prodConfig) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
const { prodId } = localConfig.value.prodConfig;
|
|
306
|
+
if (!prodId) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const field = [...fieldsData.value, ...hiddenFields.value].find(
|
|
310
|
+
(item) => item.id == prodId.value
|
|
311
|
+
);
|
|
312
|
+
if (!field) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
const prodIdValue = formData.value[field.fieldName];
|
|
316
|
+
if (!prodIdValue) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
try {
|
|
320
|
+
const response = await index$6.default.getProductData(ctx.$http, prodIdValue);
|
|
321
|
+
productData.value = response;
|
|
322
|
+
console.log("产品数据加载成功:", productData.value);
|
|
323
|
+
} catch (error) {
|
|
324
|
+
console.error("获取产品数据失败:", error);
|
|
325
|
+
productData.value = {};
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
const prodRules = vue.ref({});
|
|
329
|
+
const applyProductConfigToForm = () => {
|
|
330
|
+
if (!localConfig.value || !localConfig.value.prodConfig || !productData.value) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
const { defaultValueConfigs, validationConfigs } = localConfig.value.prodConfig;
|
|
334
|
+
if (defaultValueConfigs && defaultValueConfigs.length > 0) {
|
|
335
|
+
defaultValueConfigs.forEach((config) => {
|
|
336
|
+
if (config.pageField && config.productConfigField) {
|
|
337
|
+
const defaultValue = productData.value[config.productConfigField];
|
|
338
|
+
if (defaultValue !== void 0) {
|
|
339
|
+
const formField = [...fieldsData.value, ...hiddenFields.value].find(
|
|
340
|
+
(item) => item.id == config.pageField
|
|
341
|
+
);
|
|
342
|
+
if (formField && !formData.value[formField.fieldName]) {
|
|
343
|
+
formData.value[formField.fieldName] = defaultValue;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
if (validationConfigs && validationConfigs.length > 0) {
|
|
350
|
+
validationConfigs.forEach((config) => {
|
|
351
|
+
if (config.pageField && (config.minProductField || config.maxProductField)) {
|
|
352
|
+
const minValue = productData.value[config.minProductField];
|
|
353
|
+
const maxValue = productData.value[config.maxProductField];
|
|
354
|
+
if (minValue !== void 0 || maxValue !== void 0) {
|
|
355
|
+
const formField = [...fieldsData.value, ...hiddenFields.value].find(
|
|
356
|
+
(item) => item.id == config.pageField
|
|
357
|
+
);
|
|
358
|
+
if (formField && !prodRules.value[formField.fieldName]) {
|
|
359
|
+
prodRules.value[formField.fieldName] = [];
|
|
360
|
+
}
|
|
361
|
+
const customValidator = (rule, value, callback) => {
|
|
362
|
+
console.log(
|
|
363
|
+
"🚀 ~ customValidator 被调用 ~ 字段:",
|
|
364
|
+
formField == null ? void 0 : formField.fieldName,
|
|
365
|
+
"值:",
|
|
366
|
+
value,
|
|
367
|
+
"minValue:",
|
|
368
|
+
minValue,
|
|
369
|
+
"maxValue:",
|
|
370
|
+
maxValue
|
|
371
|
+
);
|
|
372
|
+
if (value === null || value === void 0 || value === "") {
|
|
373
|
+
callback();
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const numValue = Number(value);
|
|
377
|
+
if (isNaN(numValue)) {
|
|
378
|
+
callback(new Error("请输入有效的数字"));
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
let errorMessage = "";
|
|
382
|
+
if (minValue !== void 0 && numValue < Number(minValue)) {
|
|
383
|
+
errorMessage = `不能小于 ${minValue}`;
|
|
384
|
+
}
|
|
385
|
+
if (maxValue !== void 0 && numValue > Number(maxValue)) {
|
|
386
|
+
if (errorMessage) {
|
|
387
|
+
errorMessage = `${errorMessage} 且 不能大于 ${maxValue}`;
|
|
388
|
+
} else {
|
|
389
|
+
errorMessage = `不能大于 ${maxValue}`;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if (errorMessage) {
|
|
393
|
+
callback(new Error(errorMessage));
|
|
394
|
+
} else {
|
|
395
|
+
callback();
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const customRule = {
|
|
399
|
+
validator: customValidator,
|
|
400
|
+
trigger: "blur"
|
|
401
|
+
};
|
|
402
|
+
prodRules.value[formField.fieldName].push(customRule);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
293
405
|
});
|
|
406
|
+
for (let fieldName in prodRules.value) {
|
|
407
|
+
if (formRules.value[fieldName]) {
|
|
408
|
+
formRules.value[fieldName].push(...prodRules.value[fieldName]);
|
|
409
|
+
} else {
|
|
410
|
+
formRules.value[fieldName] = prodRules.value[fieldName];
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
const applyProductConfigFilter = (component) => {
|
|
416
|
+
if (!localConfig.value || !localConfig.value.prodConfig || !productData.value) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const { optionConfigs } = localConfig.value.prodConfig;
|
|
420
|
+
if (!optionConfigs || !component.optionConfig || !component.optionConfig.options) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const componentConfig = optionConfigs.find(
|
|
424
|
+
(item) => item.pageField == component.id
|
|
425
|
+
);
|
|
426
|
+
if (!componentConfig || !componentConfig.productConfigField) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
const fieldValue = productData.value[componentConfig.productConfigField];
|
|
430
|
+
if (!fieldValue) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
const allowedValues = Array.isArray(fieldValue) ? fieldValue : fieldValue.split("|");
|
|
434
|
+
component.optionConfig.options = component.optionConfig.options.filter(
|
|
435
|
+
(option) => {
|
|
436
|
+
const optionValue = option.value !== void 0 ? option.value : option;
|
|
437
|
+
return allowedValues.includes(optionValue);
|
|
438
|
+
}
|
|
439
|
+
);
|
|
440
|
+
if (component.optionConfig.options.length === 0) {
|
|
441
|
+
component.optionConfig.options = [
|
|
442
|
+
{
|
|
443
|
+
label: `无可用选项(产品配置限制)`,
|
|
444
|
+
value: "",
|
|
445
|
+
disabled: true
|
|
446
|
+
}
|
|
447
|
+
];
|
|
294
448
|
}
|
|
295
449
|
};
|
|
296
450
|
const handleEvent = vue.ref(null);
|
|
@@ -413,6 +567,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
413
567
|
}
|
|
414
568
|
}
|
|
415
569
|
});
|
|
570
|
+
for (let fieldName in prodRules.value) {
|
|
571
|
+
rules[fieldName] = prodRules.value[fieldName];
|
|
572
|
+
}
|
|
416
573
|
formRules.value = rules;
|
|
417
574
|
const readonlyArr = (linkedConfig == null ? void 0 : linkedConfig.readonly) || [];
|
|
418
575
|
readonlyArr.forEach((item) => {
|
|
@@ -695,5 +852,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
695
852
|
};
|
|
696
853
|
}
|
|
697
854
|
});
|
|
698
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
855
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-f1c90d7c"]]);
|
|
699
856
|
exports.default = _Form;
|