@panpanzhao/component-ui 1.0.0 → 1.0.1
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/lib/component-ui.common.js +1845 -633
- package/lib/components/crud.js +547 -297
- package/lib/components/dialog.js +50 -19
- package/lib/components/drawer.js +14 -14
- package/lib/components/form-dialog.js +245 -146
- package/lib/components/form-drawer.js +115 -51
- package/lib/components/form-group.js +108 -43
- package/lib/components/form-input.js +804 -94
- package/lib/components/form-item.js +19 -8
- package/lib/components/form-query.js +53 -10
- package/lib/components/form-view-dialog.js +94 -33
- package/lib/components/form-view-group.js +75 -18
- package/lib/components/form-view.js +7 -2
- package/lib/components/form.js +20 -10
- package/lib/components/formula.js +25 -25
- package/lib/components/table-column.js +47 -47
- package/lib/components/table-editable.js +22 -23
- package/lib/components/table-operate.js +357 -197
- package/lib/components/table-search.js +28 -31
- package/lib/components/table.js +69 -56
- package/lib/components/tree-line.js +272 -0
- package/lib/index.js +1 -1
- package/lib/styles/component-ui.css +2 -2
- package/lib/styles/dialog.css +1 -1
- package/lib/styles/form-item.css +1 -0
- package/lib/styles/form-view.css +1 -0
- package/lib/styles/index.css +2 -2
- package/lib/styles/tree-line.css +1 -0
- package/lib/styles/upload-process.css +1 -0
- package/lib/utils/formula/doc.js +2 -3
- package/lib/utils/formula/evalutor.js +4 -3
- package/lib/utils/formula/filter.js +1 -2
- package/lib/utils/formula/function.js +1 -2
- package/lib/utils/formula/lexer.js +1 -4
- package/lib/utils/helper.js +3 -5
- package/package.json +5 -2
package/lib/components/crud.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 77);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -215,7 +215,7 @@ module.exports = require("@panpanzhao/component-ui/lib/utils/formula");
|
|
|
215
215
|
// ESM COMPAT FLAG
|
|
216
216
|
__webpack_require__.r(__webpack_exports__);
|
|
217
217
|
|
|
218
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=
|
|
218
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=template&id=74ff4c20
|
|
219
219
|
var render = function render() {
|
|
220
220
|
var _vm = this,
|
|
221
221
|
_c = _vm._self._c
|
|
@@ -286,7 +286,7 @@ var staticRenderFns = []
|
|
|
286
286
|
render._withStripped = true
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=
|
|
289
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=template&id=74ff4c20
|
|
290
290
|
|
|
291
291
|
// EXTERNAL MODULE: external "element-ui/lib/form"
|
|
292
292
|
var form_ = __webpack_require__(13);
|
|
@@ -310,14 +310,14 @@ var formula_ = __webpack_require__(3);
|
|
|
310
310
|
// EXTERNAL MODULE: external "lodash"
|
|
311
311
|
var external_lodash_ = __webpack_require__(2);
|
|
312
312
|
|
|
313
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=script&lang=js
|
|
313
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form/src/form.vue?vue&type=script&lang=js
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
/* harmony default export */ var
|
|
320
|
+
/* harmony default export */ var formvue_type_script_lang_js = ({
|
|
321
321
|
name: "Form",
|
|
322
322
|
componentName: "Form",
|
|
323
323
|
components: {
|
|
@@ -458,9 +458,19 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
458
458
|
var _callback = null;
|
|
459
459
|
if (callback) {
|
|
460
460
|
_callback = function _callback(flag, message) {
|
|
461
|
-
callback.call(_this3, flag, message);
|
|
462
461
|
if (typeof _this3.verify === "function") {
|
|
463
|
-
_this3.verify.call(_this3, flag, message);
|
|
462
|
+
var promiset = _this3.verify.call(_this3, flag, message);
|
|
463
|
+
if (promiset && Object.prototype.toString.call(promiset) == "[object Promise]") {
|
|
464
|
+
promiset.then(function (vFlag, vMessage) {
|
|
465
|
+
callback.call(_this3, flag && vFlag !== false, message, vMessage);
|
|
466
|
+
}).catch(function (error) {
|
|
467
|
+
callback.call(_this3, false, message, error);
|
|
468
|
+
});
|
|
469
|
+
} else {
|
|
470
|
+
callback.call(_this3, flag && promiset !== false, message);
|
|
471
|
+
}
|
|
472
|
+
} else {
|
|
473
|
+
callback.call(_this3, flag, message);
|
|
464
474
|
}
|
|
465
475
|
};
|
|
466
476
|
}
|
|
@@ -495,9 +505,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
495
505
|
}
|
|
496
506
|
}
|
|
497
507
|
});
|
|
498
|
-
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=script&lang=js
|
|
499
|
-
/* harmony default export */ var
|
|
500
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
508
|
+
// CONCATENATED MODULE: ./src/components/form/src/form.vue?vue&type=script&lang=js
|
|
509
|
+
/* harmony default export */ var src_formvue_type_script_lang_js = (formvue_type_script_lang_js);
|
|
510
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
501
511
|
var componentNormalizer = __webpack_require__(1);
|
|
502
512
|
|
|
503
513
|
// CONCATENATED MODULE: ./src/components/form/src/form.vue
|
|
@@ -509,7 +519,7 @@ var componentNormalizer = __webpack_require__(1);
|
|
|
509
519
|
/* normalize component */
|
|
510
520
|
|
|
511
521
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
512
|
-
|
|
522
|
+
src_formvue_type_script_lang_js,
|
|
513
523
|
render,
|
|
514
524
|
staticRenderFns,
|
|
515
525
|
false,
|
|
@@ -651,7 +661,7 @@ var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_)
|
|
|
651
661
|
this.formItems.forEach(function (item) {
|
|
652
662
|
_this2.formItemLayout[item.prop] = item;
|
|
653
663
|
//初始化数据值
|
|
654
|
-
_this2.$set(_this2.formModel, item.prop, null);
|
|
664
|
+
_this2.$set(_this2.formModel, item.prop, _this2.formModel[item.prop] || null);
|
|
655
665
|
});
|
|
656
666
|
},
|
|
657
667
|
methods: {
|
|
@@ -685,12 +695,17 @@ var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_)
|
|
|
685
695
|
}
|
|
686
696
|
},
|
|
687
697
|
renderItem: function renderItem(h, item) {
|
|
698
|
+
var _item$slots, _item$slots2, _item$slots3, _item$slots4, _item$slots5, _item$slots6;
|
|
688
699
|
var param = {
|
|
689
700
|
attrs: Object.assign({}, item)
|
|
690
701
|
};
|
|
691
702
|
return h("el-descriptions-item", babel_helper_vue_jsx_merge_props_default()([{
|
|
692
703
|
"key": item.prop
|
|
693
|
-
}, param]), [
|
|
704
|
+
}, param]), [h("div", {
|
|
705
|
+
"class": "form-view_wrap"
|
|
706
|
+
}, [typeof ((_item$slots = item.slots) == null ? void 0 : _item$slots.prependItem) === "function" ? (_item$slots2 = item.slots) == null || (_item$slots2 = _item$slots2.prependItem) == null ? void 0 : _item$slots2.call(this, h) : (_item$slots3 = item.slots) == null ? void 0 : _item$slots3.prependItem, h("div", {
|
|
707
|
+
"class": "form-view_content"
|
|
708
|
+
}, [this.renderContent(h, item)]), typeof ((_item$slots4 = item.slots) == null ? void 0 : _item$slots4.appendItem) === "function" ? (_item$slots5 = item.slots) == null || (_item$slots5 = _item$slots5.appendItem) == null ? void 0 : _item$slots5.call(this, h) : (_item$slots6 = item.slots) == null ? void 0 : _item$slots6.appendItem])]);
|
|
694
709
|
}
|
|
695
710
|
},
|
|
696
711
|
render: function render(h) {
|
|
@@ -759,8 +774,14 @@ module.exports = require("element-ui/lib/col");
|
|
|
759
774
|
module.exports = require("@panpanzhao/component-ui/lib/components/form-item");
|
|
760
775
|
|
|
761
776
|
/***/ }),
|
|
762
|
-
/* 17
|
|
763
|
-
|
|
777
|
+
/* 17 */
|
|
778
|
+
/***/ (function(module, exports) {
|
|
779
|
+
|
|
780
|
+
module.exports = require("element-ui/lib/message");
|
|
781
|
+
|
|
782
|
+
/***/ }),
|
|
783
|
+
/* 18 */,
|
|
784
|
+
/* 19 */
|
|
764
785
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
765
786
|
|
|
766
787
|
"use strict";
|
|
@@ -793,6 +814,12 @@ var components_form = __webpack_require__(4);
|
|
|
793
814
|
render: Function,
|
|
794
815
|
slots: Object,
|
|
795
816
|
config: Object,
|
|
817
|
+
formModel: {
|
|
818
|
+
type: Object,
|
|
819
|
+
default: function _default() {
|
|
820
|
+
return {};
|
|
821
|
+
}
|
|
822
|
+
},
|
|
796
823
|
show: {
|
|
797
824
|
type: [Boolean, Function],
|
|
798
825
|
default: true
|
|
@@ -818,8 +845,11 @@ var components_form = __webpack_require__(4);
|
|
|
818
845
|
},
|
|
819
846
|
created: function created() {
|
|
820
847
|
if (this._formGroup) {
|
|
821
|
-
|
|
822
|
-
this.formModel
|
|
848
|
+
// if (!(this.prop&&this._formGroup.formModel[this.prop])) {
|
|
849
|
+
// this._formGroup.formModel[this.prop]={}
|
|
850
|
+
// }
|
|
851
|
+
//const defaultVal= this.prop?this._formGroup.formModel[this.prop]:this._formGroup.formModel
|
|
852
|
+
//this.formModel=defaultVal
|
|
823
853
|
}
|
|
824
854
|
// if (this.prop && this._formGroup) {
|
|
825
855
|
// this._formGroup.formModel[this.prop] = this.formModel;
|
|
@@ -882,6 +912,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
882
912
|
|
|
883
913
|
|
|
884
914
|
|
|
915
|
+
|
|
885
916
|
/* harmony default export */ var src = ({
|
|
886
917
|
name: "FormGroup",
|
|
887
918
|
componentName: "FormGroup",
|
|
@@ -903,9 +934,6 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
903
934
|
return [];
|
|
904
935
|
}
|
|
905
936
|
},
|
|
906
|
-
defaultExpandVal: {
|
|
907
|
-
type: Array | String
|
|
908
|
-
},
|
|
909
937
|
items: {
|
|
910
938
|
type: Array,
|
|
911
939
|
default: function _default() {
|
|
@@ -931,9 +959,23 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
931
959
|
openedCode: null
|
|
932
960
|
};
|
|
933
961
|
},
|
|
962
|
+
created: function created() {
|
|
963
|
+
var _this = this;
|
|
964
|
+
this.items.forEach(function (item) {
|
|
965
|
+
var _item$formItems;
|
|
966
|
+
var formData = item.prop && _this.formModel[item.prop] || {};
|
|
967
|
+
if ((item == null || (_item$formItems = item.formItems) == null ? void 0 : _item$formItems.length) > 0) {
|
|
968
|
+
item == null || item.formItems.forEach(function (itemCh) {
|
|
969
|
+
_this.$set(formData, itemCh.prop, formData[itemCh.prop]);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
//初始化数据值
|
|
973
|
+
_this.$set(_this.formModel, item.prop, formData);
|
|
974
|
+
});
|
|
975
|
+
},
|
|
934
976
|
computed: {
|
|
935
977
|
actionFormMap: function actionFormMap() {
|
|
936
|
-
var
|
|
978
|
+
var _this2 = this;
|
|
937
979
|
var actionForm = {};
|
|
938
980
|
this.actions.forEach(function (action) {
|
|
939
981
|
if (!action.trigger) {
|
|
@@ -956,15 +998,16 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
956
998
|
if (!targetConfig[formTarget.formCode]) {
|
|
957
999
|
targetConfig[formTarget.formCode] = {};
|
|
958
1000
|
}
|
|
959
|
-
targetConfig[formTarget.formCode][formTarget.fieldCode] =
|
|
960
|
-
targetForm[formTarget.formCode] =
|
|
1001
|
+
targetConfig[formTarget.formCode][formTarget.fieldCode] = _this2.formLayout[formTarget.formCode][formTarget.fieldCode];
|
|
1002
|
+
targetForm[formTarget.formCode] = _this2.formModel[formTarget.formCode];
|
|
961
1003
|
});
|
|
962
1004
|
config.targetConfig = targetConfig;
|
|
963
1005
|
config.targetForm = targetForm;
|
|
1006
|
+
config.formModel = _this2.formModel;
|
|
964
1007
|
for (var _len = arguments.length, arg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
965
1008
|
arg[_key - 1] = arguments[_key];
|
|
966
1009
|
}
|
|
967
|
-
(_action$exec = action.exec).call.apply(_action$exec, [
|
|
1010
|
+
(_action$exec = action.exec).call.apply(_action$exec, [_this2, config].concat(arg));
|
|
968
1011
|
}
|
|
969
1012
|
});
|
|
970
1013
|
});
|
|
@@ -973,7 +1016,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
973
1016
|
},
|
|
974
1017
|
methods: {
|
|
975
1018
|
validate: function validate(callback) {
|
|
976
|
-
var
|
|
1019
|
+
var _this3 = this;
|
|
977
1020
|
var promise;
|
|
978
1021
|
// if no callback, return promise
|
|
979
1022
|
if (typeof callback !== "function" && Promise) {
|
|
@@ -991,9 +1034,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
991
1034
|
}
|
|
992
1035
|
var invalidForms = {};
|
|
993
1036
|
this.items.forEach(function (form) {
|
|
994
|
-
var formNode =
|
|
1037
|
+
var formNode = _this3.$refs[form.prop];
|
|
995
1038
|
if (!formNode) {
|
|
996
|
-
if (typeof callback === "function" && ++count ===
|
|
1039
|
+
if (typeof callback === "function" && ++count === _this3.items.length) {
|
|
997
1040
|
callback(valid, invalidForms);
|
|
998
1041
|
}
|
|
999
1042
|
return true;
|
|
@@ -1003,7 +1046,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1003
1046
|
valid = false;
|
|
1004
1047
|
invalidForms[form.prop] = msgObj;
|
|
1005
1048
|
}
|
|
1006
|
-
if (typeof callback === "function" && ++count ===
|
|
1049
|
+
if (typeof callback === "function" && ++count === _this3.items.length) {
|
|
1007
1050
|
callback(valid, invalidForms);
|
|
1008
1051
|
}
|
|
1009
1052
|
});
|
|
@@ -1013,9 +1056,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1013
1056
|
}
|
|
1014
1057
|
},
|
|
1015
1058
|
reset: function reset() {
|
|
1016
|
-
var
|
|
1059
|
+
var _this4 = this;
|
|
1017
1060
|
this.items.forEach(function (form) {
|
|
1018
|
-
var formNode =
|
|
1061
|
+
var formNode = _this4.$refs[form.prop];
|
|
1019
1062
|
if (!formNode) {
|
|
1020
1063
|
return true;
|
|
1021
1064
|
}
|
|
@@ -1026,7 +1069,8 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1026
1069
|
var h = this.$createElement;
|
|
1027
1070
|
var formProp = {
|
|
1028
1071
|
attrs: Object.assign({
|
|
1029
|
-
actions: this.actionFormMap[form.prop]
|
|
1072
|
+
actions: this.actionFormMap[form.prop],
|
|
1073
|
+
formModel: form.prop && this.formModel[form.prop]
|
|
1030
1074
|
}, form),
|
|
1031
1075
|
on: form.on
|
|
1032
1076
|
};
|
|
@@ -1040,10 +1084,10 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1040
1084
|
}, formProp]));
|
|
1041
1085
|
},
|
|
1042
1086
|
renderTab: function renderTab(h, filterItems) {
|
|
1043
|
-
var
|
|
1087
|
+
var _this5 = this;
|
|
1044
1088
|
var itemNode = filterItems.map(function (item) {
|
|
1045
1089
|
if (typeof item.render === "function") {
|
|
1046
|
-
return item.render(h,
|
|
1090
|
+
return item.render(h, _this5.formModel, item);
|
|
1047
1091
|
}
|
|
1048
1092
|
return h("el-tab-pane", {
|
|
1049
1093
|
"key": item.prop,
|
|
@@ -1053,7 +1097,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1053
1097
|
}
|
|
1054
1098
|
}, [h("template", {
|
|
1055
1099
|
"slot": "label"
|
|
1056
|
-
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(
|
|
1100
|
+
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this5, h) : item.slots && item.slots.title]), _this5.formNode(item)]);
|
|
1057
1101
|
});
|
|
1058
1102
|
var tabsProp = {
|
|
1059
1103
|
attrs: {
|
|
@@ -1062,27 +1106,27 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1062
1106
|
},
|
|
1063
1107
|
on: {
|
|
1064
1108
|
"tab-click": function tabClick(tabNode) {
|
|
1065
|
-
|
|
1109
|
+
_this5.$emit("openedCode", tabNode.name);
|
|
1066
1110
|
}
|
|
1067
1111
|
}
|
|
1068
1112
|
};
|
|
1069
1113
|
return h("el-tabs", babel_helper_vue_jsx_merge_props_default()([{}, tabsProp]), [itemNode]);
|
|
1070
1114
|
},
|
|
1071
1115
|
renderCollapse: function renderCollapse(h, filterItems) {
|
|
1072
|
-
var
|
|
1116
|
+
var _this6 = this;
|
|
1073
1117
|
var itemNode = filterItems.map(function (item) {
|
|
1074
1118
|
if (typeof item.render === "function") {
|
|
1075
|
-
return item.render(h,
|
|
1119
|
+
return item.render(h, _this6.formModel, item);
|
|
1076
1120
|
}
|
|
1077
1121
|
return h("el-collapse-item", {
|
|
1078
|
-
"key": item.prop
|
|
1122
|
+
"key": item.prop,
|
|
1079
1123
|
"attrs": {
|
|
1080
|
-
"name": item.prop
|
|
1124
|
+
"name": item.prop,
|
|
1081
1125
|
"title": item.label
|
|
1082
1126
|
}
|
|
1083
1127
|
}, [h("template", {
|
|
1084
1128
|
"slot": "title"
|
|
1085
|
-
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(
|
|
1129
|
+
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this6, h) : item.slots && item.slots.title]), _this6.formNode(item)]);
|
|
1086
1130
|
});
|
|
1087
1131
|
var collapseProp = {
|
|
1088
1132
|
attrs: {
|
|
@@ -1090,20 +1134,46 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1090
1134
|
},
|
|
1091
1135
|
on: {
|
|
1092
1136
|
change: function change(val) {
|
|
1093
|
-
|
|
1137
|
+
_this6.$emit("openedCode", val);
|
|
1094
1138
|
}
|
|
1095
1139
|
}
|
|
1096
1140
|
};
|
|
1097
1141
|
return h("el-collapse", babel_helper_vue_jsx_merge_props_default()([{}, collapseProp]), [itemNode]);
|
|
1142
|
+
},
|
|
1143
|
+
renderCustom: function renderCustom(h, filterItems) {
|
|
1144
|
+
var _this7 = this;
|
|
1145
|
+
var itemNode = filterItems.map(function (item) {
|
|
1146
|
+
if (typeof item.render === "function") {
|
|
1147
|
+
return item.render(h, _this7.formModel, item);
|
|
1148
|
+
}
|
|
1149
|
+
return h("div", {
|
|
1150
|
+
"key": item.prop,
|
|
1151
|
+
"attrs": {
|
|
1152
|
+
"name": item.prop,
|
|
1153
|
+
"title": item.label
|
|
1154
|
+
}
|
|
1155
|
+
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this7, h) : item.slots && item.slots.title || item.label, _this7.formNode(item)]);
|
|
1156
|
+
});
|
|
1157
|
+
var collapseProp = {
|
|
1158
|
+
attrs: {
|
|
1159
|
+
value: this.openedCode
|
|
1160
|
+
},
|
|
1161
|
+
on: {
|
|
1162
|
+
change: function change(val) {
|
|
1163
|
+
_this7.$emit("openedCode", val);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
return h("div", babel_helper_vue_jsx_merge_props_default()([{}, collapseProp]), [itemNode]);
|
|
1098
1168
|
}
|
|
1099
1169
|
},
|
|
1100
1170
|
render: function render(h) {
|
|
1101
|
-
var
|
|
1171
|
+
var _this8 = this;
|
|
1102
1172
|
var filterItems = this.items.filter(function (item) {
|
|
1103
1173
|
if (item.show === false) {
|
|
1104
1174
|
return false;
|
|
1105
1175
|
}
|
|
1106
|
-
if (typeof item.show === "function" && !item.show.call(
|
|
1176
|
+
if (typeof item.show === "function" && !item.show.call(_this8, {
|
|
1107
1177
|
config: item
|
|
1108
1178
|
})) {
|
|
1109
1179
|
return false;
|
|
@@ -1113,10 +1183,15 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1113
1183
|
if (!filterItems.length > 0) {
|
|
1114
1184
|
return null;
|
|
1115
1185
|
}
|
|
1116
|
-
this.openedCode =
|
|
1186
|
+
this.openedCode = filterItems[0] && filterItems[0].prop;
|
|
1187
|
+
var group = {
|
|
1188
|
+
Custom: this.renderCustom,
|
|
1189
|
+
Tab: this.renderTab,
|
|
1190
|
+
Collapse: this.renderCollapse
|
|
1191
|
+
};
|
|
1117
1192
|
return h("div", {
|
|
1118
|
-
"class": ["form-group", "is-" +
|
|
1119
|
-
}, [this.control
|
|
1193
|
+
"class": ["form-group", "is-" + this.control]
|
|
1194
|
+
}, [group[this.control] ? group[this.control](h, filterItems) : null]);
|
|
1120
1195
|
}
|
|
1121
1196
|
});
|
|
1122
1197
|
// CONCATENATED MODULE: ./src/components/form-group/index.js
|
|
@@ -1126,12 +1201,6 @@ src.install = function (Vue) {
|
|
|
1126
1201
|
};
|
|
1127
1202
|
/* harmony default export */ var form_group = __webpack_exports__["default"] = (src);
|
|
1128
1203
|
|
|
1129
|
-
/***/ }),
|
|
1130
|
-
/* 19 */
|
|
1131
|
-
/***/ (function(module, exports) {
|
|
1132
|
-
|
|
1133
|
-
module.exports = require("element-ui/lib/message");
|
|
1134
|
-
|
|
1135
1204
|
/***/ }),
|
|
1136
1205
|
/* 20 */,
|
|
1137
1206
|
/* 21 */
|
|
@@ -1178,15 +1247,19 @@ var form_view = __webpack_require__(10);
|
|
|
1178
1247
|
render: Function,
|
|
1179
1248
|
slots: Object,
|
|
1180
1249
|
config: Object,
|
|
1250
|
+
formModel: {
|
|
1251
|
+
type: Object,
|
|
1252
|
+
default: function _default() {
|
|
1253
|
+
return {};
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1181
1256
|
show: {
|
|
1182
1257
|
type: [Boolean, Function],
|
|
1183
1258
|
default: true
|
|
1184
1259
|
}
|
|
1185
1260
|
},
|
|
1186
1261
|
data: function data() {
|
|
1187
|
-
return {
|
|
1188
|
-
formModel: {}
|
|
1189
|
-
};
|
|
1262
|
+
return {};
|
|
1190
1263
|
},
|
|
1191
1264
|
computed: {
|
|
1192
1265
|
_formViewGroup: function _formViewGroup() {
|
|
@@ -1249,6 +1322,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1249
1322
|
|
|
1250
1323
|
|
|
1251
1324
|
|
|
1325
|
+
|
|
1252
1326
|
/* harmony default export */ var src = ({
|
|
1253
1327
|
name: "FormViewGroup",
|
|
1254
1328
|
componentName: "FormViewGroup",
|
|
@@ -1289,6 +1363,20 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1289
1363
|
openedCode: null
|
|
1290
1364
|
};
|
|
1291
1365
|
},
|
|
1366
|
+
created: function created() {
|
|
1367
|
+
var _this = this;
|
|
1368
|
+
this.items.forEach(function (item) {
|
|
1369
|
+
var _item$formItems;
|
|
1370
|
+
var formData = item.prop && _this.formModel[item.prop] || {};
|
|
1371
|
+
if ((item == null || (_item$formItems = item.formItems) == null ? void 0 : _item$formItems.length) > 0) {
|
|
1372
|
+
item == null || item.formItems.forEach(function (itemCh) {
|
|
1373
|
+
_this.$set(formData, itemCh.prop, formData[itemCh.prop]);
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
//初始化数据值
|
|
1377
|
+
_this.$set(_this.formModel, item.prop, formData);
|
|
1378
|
+
});
|
|
1379
|
+
},
|
|
1292
1380
|
computed: {},
|
|
1293
1381
|
methods: {
|
|
1294
1382
|
setFormModel: function setFormModel(model) {
|
|
@@ -1297,7 +1385,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1297
1385
|
formNode: function formNode(form) {
|
|
1298
1386
|
var h = this.$createElement;
|
|
1299
1387
|
var formProp = {
|
|
1300
|
-
attrs: Object.assign({
|
|
1388
|
+
attrs: Object.assign({
|
|
1389
|
+
formModel: form.prop && this.formModel[form.prop]
|
|
1390
|
+
}, form),
|
|
1301
1391
|
on: form.on
|
|
1302
1392
|
};
|
|
1303
1393
|
return h(content, babel_helper_vue_jsx_merge_props_default()([{
|
|
@@ -1310,10 +1400,10 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1310
1400
|
}, formProp]));
|
|
1311
1401
|
},
|
|
1312
1402
|
renderTab: function renderTab(h, filterItems) {
|
|
1313
|
-
var
|
|
1403
|
+
var _this2 = this;
|
|
1314
1404
|
var itemNode = filterItems.map(function (item) {
|
|
1315
1405
|
if (typeof item.render === "function") {
|
|
1316
|
-
return item.render(h,
|
|
1406
|
+
return item.render(h, _this2.formModel, item);
|
|
1317
1407
|
}
|
|
1318
1408
|
return h("el-tab-pane", {
|
|
1319
1409
|
"key": item.prop,
|
|
@@ -1323,7 +1413,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1323
1413
|
}
|
|
1324
1414
|
}, [h("template", {
|
|
1325
1415
|
"slot": "label"
|
|
1326
|
-
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(
|
|
1416
|
+
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this2, h) : item.slots && item.slots.title]), _this2.formNode(item)]);
|
|
1327
1417
|
});
|
|
1328
1418
|
var tabsProp = {
|
|
1329
1419
|
attrs: {
|
|
@@ -1332,17 +1422,17 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1332
1422
|
},
|
|
1333
1423
|
on: {
|
|
1334
1424
|
"tab-click": function tabClick(tabNode) {
|
|
1335
|
-
|
|
1425
|
+
_this2.$emit("openedCode", tabNode.name);
|
|
1336
1426
|
}
|
|
1337
1427
|
}
|
|
1338
1428
|
};
|
|
1339
1429
|
return h("el-tabs", babel_helper_vue_jsx_merge_props_default()([{}, tabsProp]), [itemNode]);
|
|
1340
1430
|
},
|
|
1341
1431
|
renderCollapse: function renderCollapse(h, filterItems) {
|
|
1342
|
-
var
|
|
1432
|
+
var _this3 = this;
|
|
1343
1433
|
var itemNode = filterItems.map(function (item) {
|
|
1344
1434
|
if (typeof item.render === "function") {
|
|
1345
|
-
return item.render(h,
|
|
1435
|
+
return item.render(h, _this3.formModel, item);
|
|
1346
1436
|
}
|
|
1347
1437
|
return h("el-collapse-item", {
|
|
1348
1438
|
"key": item.prop,
|
|
@@ -1352,7 +1442,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1352
1442
|
}
|
|
1353
1443
|
}, [h("template", {
|
|
1354
1444
|
"slot": "title"
|
|
1355
|
-
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(
|
|
1445
|
+
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this3, h) : item.slots && item.slots.title]), _this3.formNode(item)]);
|
|
1356
1446
|
});
|
|
1357
1447
|
var collapseProp = {
|
|
1358
1448
|
attrs: {
|
|
@@ -1360,20 +1450,46 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1360
1450
|
},
|
|
1361
1451
|
on: {
|
|
1362
1452
|
change: function change(val) {
|
|
1363
|
-
|
|
1453
|
+
_this3.$emit("openedCode", val);
|
|
1364
1454
|
}
|
|
1365
1455
|
}
|
|
1366
1456
|
};
|
|
1367
1457
|
return h("el-collapse", babel_helper_vue_jsx_merge_props_default()([{}, collapseProp]), [itemNode]);
|
|
1458
|
+
},
|
|
1459
|
+
renderCustom: function renderCustom(h, filterItems) {
|
|
1460
|
+
var _this4 = this;
|
|
1461
|
+
var itemNode = filterItems.map(function (item) {
|
|
1462
|
+
if (typeof item.render === "function") {
|
|
1463
|
+
return item.render(h, _this4.formModel, item);
|
|
1464
|
+
}
|
|
1465
|
+
return h("div", {
|
|
1466
|
+
"key": item.prop,
|
|
1467
|
+
"attrs": {
|
|
1468
|
+
"name": item.prop,
|
|
1469
|
+
"title": item.label
|
|
1470
|
+
}
|
|
1471
|
+
}, [item.slots && typeof item.slots.title === "function" ? item.slots.title.call(_this4, h) : item.slots && item.slots.title || item.label, _this4.formNode(item)]);
|
|
1472
|
+
});
|
|
1473
|
+
var collapseProp = {
|
|
1474
|
+
attrs: {
|
|
1475
|
+
value: this.openedCode
|
|
1476
|
+
},
|
|
1477
|
+
on: {
|
|
1478
|
+
change: function change(val) {
|
|
1479
|
+
_this4.$emit("openedCode", val);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
return h("div", babel_helper_vue_jsx_merge_props_default()([{}, collapseProp]), [itemNode]);
|
|
1368
1484
|
}
|
|
1369
1485
|
},
|
|
1370
1486
|
render: function render(h) {
|
|
1371
|
-
var
|
|
1487
|
+
var _this5 = this;
|
|
1372
1488
|
var filterItems = this.items.filter(function (item) {
|
|
1373
1489
|
if (item.show === false) {
|
|
1374
1490
|
return false;
|
|
1375
1491
|
}
|
|
1376
|
-
if (typeof item.show === "function" && !item.show.call(
|
|
1492
|
+
if (typeof item.show === "function" && !item.show.call(_this5, {
|
|
1377
1493
|
config: item
|
|
1378
1494
|
})) {
|
|
1379
1495
|
return false;
|
|
@@ -1384,9 +1500,14 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1384
1500
|
return null;
|
|
1385
1501
|
}
|
|
1386
1502
|
this.openedCode = filterItems[0] && filterItems[0].prop;
|
|
1503
|
+
var group = {
|
|
1504
|
+
Custom: this.renderCustom,
|
|
1505
|
+
Tab: this.renderTab,
|
|
1506
|
+
Collapse: this.renderCollapse
|
|
1507
|
+
};
|
|
1387
1508
|
return h("div", {
|
|
1388
|
-
"class": ["form-view-group", "is-" +
|
|
1389
|
-
}, [this.control
|
|
1509
|
+
"class": ["form-view-group", "is-" + this.control]
|
|
1510
|
+
}, [group[this.control] ? group[this.control](h, filterItems) : null]);
|
|
1390
1511
|
}
|
|
1391
1512
|
});
|
|
1392
1513
|
// CONCATENATED MODULE: ./src/components/form-view-group/index.js
|
|
@@ -1418,14 +1539,14 @@ var button_ = __webpack_require__(5);
|
|
|
1418
1539
|
var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
1419
1540
|
|
|
1420
1541
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
1421
|
-
var message_ = __webpack_require__(
|
|
1542
|
+
var message_ = __webpack_require__(17);
|
|
1422
1543
|
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
1423
1544
|
|
|
1424
1545
|
// EXTERNAL MODULE: ./src/components/form/index.js + 5 modules
|
|
1425
1546
|
var components_form = __webpack_require__(4);
|
|
1426
1547
|
|
|
1427
1548
|
// EXTERNAL MODULE: ./src/components/form-group/index.js + 2 modules
|
|
1428
|
-
var form_group = __webpack_require__(
|
|
1549
|
+
var form_group = __webpack_require__(19);
|
|
1429
1550
|
|
|
1430
1551
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
|
|
1431
1552
|
var formula_ = __webpack_require__(3);
|
|
@@ -1433,12 +1554,15 @@ var formula_ = __webpack_require__(3);
|
|
|
1433
1554
|
// EXTERNAL MODULE: external "lodash"
|
|
1434
1555
|
var external_lodash_ = __webpack_require__(2);
|
|
1435
1556
|
|
|
1436
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-dialog/src/index.vue?vue&type=script&lang=js
|
|
1557
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form-dialog/src/index.vue?vue&type=script&lang=js
|
|
1437
1558
|
|
|
1438
1559
|
|
|
1439
1560
|
|
|
1440
1561
|
|
|
1441
1562
|
|
|
1563
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1564
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
1565
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
1442
1566
|
|
|
1443
1567
|
|
|
1444
1568
|
|
|
@@ -1446,7 +1570,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1446
1570
|
|
|
1447
1571
|
|
|
1448
1572
|
|
|
1449
|
-
/* harmony default export */ var
|
|
1573
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
|
1450
1574
|
name: "FormDialog",
|
|
1451
1575
|
componentName: "FormDialog",
|
|
1452
1576
|
components: {
|
|
@@ -1610,93 +1734,119 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1610
1734
|
},
|
|
1611
1735
|
submit: function submit(button) {
|
|
1612
1736
|
var _this3 = this;
|
|
1613
|
-
this.$refs.form.validate(function (
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1737
|
+
this.$refs.form.validate( /*#__PURE__*/function () {
|
|
1738
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(isValidate, errorMessage) {
|
|
1739
|
+
var reqData;
|
|
1740
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1741
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1742
|
+
case 0:
|
|
1743
|
+
if (isValidate) {
|
|
1744
|
+
_context.next = 2;
|
|
1745
|
+
break;
|
|
1746
|
+
}
|
|
1747
|
+
return _context.abrupt("return", false);
|
|
1748
|
+
case 2:
|
|
1749
|
+
reqData = Object(external_lodash_["merge"])(_this3.api.data || {}, _this3.formModel);
|
|
1750
|
+
if (!(typeof _this3.api.before === "function")) {
|
|
1751
|
+
_context.next = 7;
|
|
1752
|
+
break;
|
|
1753
|
+
}
|
|
1754
|
+
_context.next = 6;
|
|
1755
|
+
return _this3.api.before.call(_this3, reqData);
|
|
1756
|
+
case 6:
|
|
1757
|
+
reqData = _context.sent;
|
|
1758
|
+
case 7:
|
|
1759
|
+
if (_this3.api.url && _this3.requester) {
|
|
1760
|
+
_context.next = 12;
|
|
1761
|
+
break;
|
|
1762
|
+
}
|
|
1763
|
+
if (_this3.noApiClose) {
|
|
1764
|
+
_this3.reset();
|
|
1765
|
+
_this3.show = false;
|
|
1766
|
+
}
|
|
1767
|
+
_this3.$emit("success", {
|
|
1768
|
+
request: _this3.requester,
|
|
1769
|
+
reqData: reqData,
|
|
1770
|
+
expandData: _this3.expandModel
|
|
1771
|
+
}, {
|
|
1772
|
+
button: button
|
|
1773
|
+
});
|
|
1774
|
+
if (!_this3.$listeners.success && _this3.on && typeof _this3.on.success === "function") {
|
|
1775
|
+
_this3.on.success.call(_this3, {
|
|
1776
|
+
request: _this3.requester,
|
|
1777
|
+
reqData: reqData,
|
|
1778
|
+
expandData: _this3.expandModel
|
|
1779
|
+
}, {
|
|
1780
|
+
button: button
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
return _context.abrupt("return", false);
|
|
1784
|
+
case 12:
|
|
1785
|
+
button.loading = true;
|
|
1786
|
+
_this3.requester({
|
|
1787
|
+
url: Object(formula_["evaluate"])(_this3.api.url, reqData),
|
|
1788
|
+
method: _this3.api.method || "POST",
|
|
1789
|
+
headers: _this3.api.headers,
|
|
1790
|
+
data: reqData
|
|
1791
|
+
}).then(function (res) {
|
|
1792
|
+
button.loading = false;
|
|
1793
|
+
_this3.reset();
|
|
1794
|
+
_this3.show = false;
|
|
1795
|
+
_this3.$emit("success", {
|
|
1796
|
+
request: _this3.requester,
|
|
1797
|
+
reqData: reqData,
|
|
1798
|
+
resData: res,
|
|
1799
|
+
expandData: _this3.expandModel
|
|
1800
|
+
}, {
|
|
1801
|
+
button: button
|
|
1802
|
+
});
|
|
1803
|
+
if (!_this3.$listeners.success && _this3.on && typeof _this3.on.success === "function") {
|
|
1804
|
+
_this3.on.success.call(_this3, {
|
|
1805
|
+
request: _this3.requester,
|
|
1806
|
+
reqData: reqData,
|
|
1807
|
+
resData: res,
|
|
1808
|
+
expandData: _this3.expandModel
|
|
1809
|
+
}, {
|
|
1810
|
+
button: button
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
if (_this3.message && _this3.message.success) {
|
|
1814
|
+
message_default()(Object.assign({}, _this3.message.success));
|
|
1815
|
+
}
|
|
1816
|
+
}).catch(function (error) {
|
|
1817
|
+
button.loading = false;
|
|
1818
|
+
_this3.$emit("error", {
|
|
1819
|
+
request: _this3.requester,
|
|
1820
|
+
reqData: reqData,
|
|
1821
|
+
resError: error,
|
|
1822
|
+
expandData: _this3.expandModel
|
|
1823
|
+
}, {
|
|
1824
|
+
button: button
|
|
1825
|
+
});
|
|
1826
|
+
if (!_this3.$listeners.error && _this3.on && typeof _this3.on.error === "function") {
|
|
1827
|
+
_this3.on.error.call(_this3, {
|
|
1828
|
+
request: _this3.requester,
|
|
1829
|
+
reqData: reqData,
|
|
1830
|
+
resError: error,
|
|
1831
|
+
expandData: _this3.expandModel
|
|
1832
|
+
}, {
|
|
1833
|
+
button: button
|
|
1834
|
+
});
|
|
1835
|
+
}
|
|
1836
|
+
if (_this3.message && _this3.message.error) {
|
|
1837
|
+
message_default()(Object.assign({}, _this3.message.error));
|
|
1838
|
+
}
|
|
1839
|
+
});
|
|
1840
|
+
case 14:
|
|
1841
|
+
case "end":
|
|
1842
|
+
return _context.stop();
|
|
1843
|
+
}
|
|
1844
|
+
}, _callee);
|
|
1845
|
+
}));
|
|
1846
|
+
return function (_x, _x2) {
|
|
1847
|
+
return _ref.apply(this, arguments);
|
|
1848
|
+
};
|
|
1849
|
+
}());
|
|
1700
1850
|
},
|
|
1701
1851
|
renderForm: function renderForm(h) {
|
|
1702
1852
|
var param = {
|
|
@@ -1716,13 +1866,19 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1716
1866
|
},
|
|
1717
1867
|
renderTitle: function renderTitle(h) {
|
|
1718
1868
|
if (typeof this.slots.title === "function") {
|
|
1719
|
-
return this.slots.title.call(this,
|
|
1869
|
+
return this.slots.title.call(this, {
|
|
1870
|
+
ref: this,
|
|
1871
|
+
formModel: this.formModel
|
|
1872
|
+
});
|
|
1720
1873
|
}
|
|
1721
1874
|
return this.slots.title || this.dialog.title;
|
|
1722
1875
|
},
|
|
1723
1876
|
renderTools: function renderTools(h) {
|
|
1724
1877
|
if (typeof this.slots.footer === "function") {
|
|
1725
|
-
return this.slots.footer.call(this,
|
|
1878
|
+
return this.slots.footer.call(this, {
|
|
1879
|
+
ref: this,
|
|
1880
|
+
formModel: this.formModel
|
|
1881
|
+
});
|
|
1726
1882
|
}
|
|
1727
1883
|
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
1728
1884
|
var toolParam = {
|
|
@@ -1757,9 +1913,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1757
1913
|
}, [this.renderTools(h)]), this.renderForm(h)]);
|
|
1758
1914
|
}
|
|
1759
1915
|
});
|
|
1760
|
-
// CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue?vue&type=script&lang=js
|
|
1761
|
-
/* harmony default export */ var
|
|
1762
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1916
|
+
// CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue?vue&type=script&lang=js
|
|
1917
|
+
/* harmony default export */ var form_dialog_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
|
1918
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1763
1919
|
var componentNormalizer = __webpack_require__(1);
|
|
1764
1920
|
|
|
1765
1921
|
// CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue
|
|
@@ -1771,7 +1927,7 @@ var src_render, staticRenderFns
|
|
|
1771
1927
|
/* normalize component */
|
|
1772
1928
|
|
|
1773
1929
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
1774
|
-
|
|
1930
|
+
form_dialog_srcvue_type_script_lang_js,
|
|
1775
1931
|
src_render,
|
|
1776
1932
|
staticRenderFns,
|
|
1777
1933
|
false,
|
|
@@ -1791,6 +1947,12 @@ src.install = function (Vue) {
|
|
|
1791
1947
|
|
|
1792
1948
|
/***/ }),
|
|
1793
1949
|
/* 26 */
|
|
1950
|
+
/***/ (function(module, exports) {
|
|
1951
|
+
|
|
1952
|
+
module.exports = require("element-ui/lib/message-box");
|
|
1953
|
+
|
|
1954
|
+
/***/ }),
|
|
1955
|
+
/* 27 */
|
|
1794
1956
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1795
1957
|
|
|
1796
1958
|
"use strict";
|
|
@@ -1815,11 +1977,7 @@ var form_view = __webpack_require__(10);
|
|
|
1815
1977
|
// EXTERNAL MODULE: ./src/components/form-view-group/index.js + 2 modules
|
|
1816
1978
|
var form_view_group = __webpack_require__(23);
|
|
1817
1979
|
|
|
1818
|
-
//
|
|
1819
|
-
var external_lodash_ = __webpack_require__(2);
|
|
1820
|
-
|
|
1821
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js&
|
|
1822
|
-
|
|
1980
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js
|
|
1823
1981
|
|
|
1824
1982
|
|
|
1825
1983
|
|
|
@@ -1829,7 +1987,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1829
1987
|
|
|
1830
1988
|
|
|
1831
1989
|
|
|
1832
|
-
|
|
1990
|
+
// import { merge } from 'lodash';
|
|
1991
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
|
1833
1992
|
name: "FormViewDialog",
|
|
1834
1993
|
componentName: "FormViewDialog",
|
|
1835
1994
|
components: {
|
|
@@ -1956,7 +2115,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1956
2115
|
this.show = false;
|
|
1957
2116
|
},
|
|
1958
2117
|
setFormModel: function setFormModel(model) {
|
|
1959
|
-
Object(
|
|
2118
|
+
Object.assign(this.formModel, model);
|
|
1960
2119
|
},
|
|
1961
2120
|
renderForm: function renderForm(h) {
|
|
1962
2121
|
var param = {
|
|
@@ -1975,13 +2134,19 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1975
2134
|
},
|
|
1976
2135
|
renderTitle: function renderTitle(h) {
|
|
1977
2136
|
if (typeof this.slots.title === "function") {
|
|
1978
|
-
return this.slots.title.call(this,
|
|
2137
|
+
return this.slots.title.call(this, {
|
|
2138
|
+
ref: this,
|
|
2139
|
+
formModel: this.formModel
|
|
2140
|
+
});
|
|
1979
2141
|
}
|
|
1980
2142
|
return this.slots.title || this.dialog.title;
|
|
1981
2143
|
},
|
|
1982
2144
|
renderTools: function renderTools(h) {
|
|
1983
2145
|
if (typeof this.slots.footer === "function") {
|
|
1984
|
-
return this.slots.footer.call(this,
|
|
2146
|
+
return this.slots.footer.call(this, {
|
|
2147
|
+
ref: this,
|
|
2148
|
+
formModel: this.formModel
|
|
2149
|
+
});
|
|
1985
2150
|
}
|
|
1986
2151
|
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
1987
2152
|
var toolParam = {
|
|
@@ -2014,9 +2179,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2014
2179
|
}, [this.renderTools(h)]), this.renderForm(h)]);
|
|
2015
2180
|
}
|
|
2016
2181
|
});
|
|
2017
|
-
// CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js
|
|
2018
|
-
/* harmony default export */ var
|
|
2019
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2182
|
+
// CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js
|
|
2183
|
+
/* harmony default export */ var form_view_dialog_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
|
2184
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2020
2185
|
var componentNormalizer = __webpack_require__(1);
|
|
2021
2186
|
|
|
2022
2187
|
// CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue
|
|
@@ -2028,7 +2193,7 @@ var src_render, staticRenderFns
|
|
|
2028
2193
|
/* normalize component */
|
|
2029
2194
|
|
|
2030
2195
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
2031
|
-
|
|
2196
|
+
form_view_dialog_srcvue_type_script_lang_js,
|
|
2032
2197
|
src_render,
|
|
2033
2198
|
staticRenderFns,
|
|
2034
2199
|
false,
|
|
@@ -2047,22 +2212,16 @@ src.install = function (Vue) {
|
|
|
2047
2212
|
/* harmony default export */ var form_view_dialog = __webpack_exports__["default"] = (src);
|
|
2048
2213
|
|
|
2049
2214
|
/***/ }),
|
|
2050
|
-
/* 27 */,
|
|
2051
2215
|
/* 28 */,
|
|
2052
|
-
/* 29
|
|
2216
|
+
/* 29 */,
|
|
2217
|
+
/* 30 */
|
|
2053
2218
|
/***/ (function(module, exports) {
|
|
2054
2219
|
|
|
2055
2220
|
module.exports = require("@panpanzhao/component-ui/lib/components/table-search");
|
|
2056
2221
|
|
|
2057
2222
|
/***/ }),
|
|
2058
|
-
/* 30 */,
|
|
2059
2223
|
/* 31 */,
|
|
2060
|
-
/* 32
|
|
2061
|
-
/***/ (function(module, exports) {
|
|
2062
|
-
|
|
2063
|
-
module.exports = require("element-ui/lib/message-box");
|
|
2064
|
-
|
|
2065
|
-
/***/ }),
|
|
2224
|
+
/* 32 */,
|
|
2066
2225
|
/* 33 */,
|
|
2067
2226
|
/* 34 */,
|
|
2068
2227
|
/* 35 */,
|
|
@@ -2106,14 +2265,15 @@ module.exports = require("element-ui/lib/message-box");
|
|
|
2106
2265
|
/* 73 */,
|
|
2107
2266
|
/* 74 */,
|
|
2108
2267
|
/* 75 */,
|
|
2109
|
-
/* 76
|
|
2268
|
+
/* 76 */,
|
|
2269
|
+
/* 77 */
|
|
2110
2270
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2111
2271
|
|
|
2112
2272
|
"use strict";
|
|
2113
2273
|
// ESM COMPAT FLAG
|
|
2114
2274
|
__webpack_require__.r(__webpack_exports__);
|
|
2115
2275
|
|
|
2116
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=
|
|
2276
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=template&id=0100425c
|
|
2117
2277
|
var render = function render() {
|
|
2118
2278
|
var _vm = this,
|
|
2119
2279
|
_c = _vm._self._c
|
|
@@ -2185,24 +2345,24 @@ var staticRenderFns = []
|
|
|
2185
2345
|
render._withStripped = true
|
|
2186
2346
|
|
|
2187
2347
|
|
|
2188
|
-
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=
|
|
2348
|
+
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=template&id=0100425c
|
|
2189
2349
|
|
|
2190
2350
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
|
|
2191
|
-
var table_search_ = __webpack_require__(
|
|
2351
|
+
var table_search_ = __webpack_require__(30);
|
|
2192
2352
|
var table_search_default = /*#__PURE__*/__webpack_require__.n(table_search_);
|
|
2193
2353
|
|
|
2194
2354
|
// EXTERNAL MODULE: ./src/components/form-dialog/index.js + 3 modules
|
|
2195
2355
|
var form_dialog = __webpack_require__(25);
|
|
2196
2356
|
|
|
2197
2357
|
// EXTERNAL MODULE: ./src/components/form-view-dialog/index.js + 3 modules
|
|
2198
|
-
var form_view_dialog = __webpack_require__(
|
|
2358
|
+
var form_view_dialog = __webpack_require__(27);
|
|
2199
2359
|
|
|
2200
2360
|
// EXTERNAL MODULE: external "element-ui/lib/message-box"
|
|
2201
|
-
var message_box_ = __webpack_require__(
|
|
2361
|
+
var message_box_ = __webpack_require__(26);
|
|
2202
2362
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
2203
2363
|
|
|
2204
2364
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
2205
|
-
var message_ = __webpack_require__(
|
|
2365
|
+
var message_ = __webpack_require__(17);
|
|
2206
2366
|
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
2207
2367
|
|
|
2208
2368
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
|
|
@@ -2211,7 +2371,10 @@ var formula_ = __webpack_require__(3);
|
|
|
2211
2371
|
// EXTERNAL MODULE: external "lodash"
|
|
2212
2372
|
var external_lodash_ = __webpack_require__(2);
|
|
2213
2373
|
|
|
2214
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=script&lang=js
|
|
2374
|
+
// CONCATENATED MODULE: ./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.9_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/components/crud/src/index.vue?vue&type=script&lang=js
|
|
2375
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
2376
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2377
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2215
2378
|
|
|
2216
2379
|
|
|
2217
2380
|
|
|
@@ -2219,7 +2382,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2219
2382
|
|
|
2220
2383
|
|
|
2221
2384
|
|
|
2222
|
-
/* harmony default export */ var
|
|
2385
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
|
2223
2386
|
name: "CRUD",
|
|
2224
2387
|
componentName: "CRUD",
|
|
2225
2388
|
components: {
|
|
@@ -2451,40 +2614,76 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2451
2614
|
},
|
|
2452
2615
|
handleUpdate: function handleUpdate(rowProps, that) {
|
|
2453
2616
|
var _this2 = this;
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2617
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2618
|
+
var rowData, detailApi, request, reqData;
|
|
2619
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2620
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
2621
|
+
case 0:
|
|
2622
|
+
rowData = rowProps.row;
|
|
2623
|
+
_this2.$refs.updateFormDialog.open();
|
|
2624
|
+
detailApi = _this2.update.detail || {};
|
|
2625
|
+
request = _this2.getRequest(detailApi.request);
|
|
2626
|
+
reqData = Object(external_lodash_["merge"])(detailApi.data || {}, rowData);
|
|
2627
|
+
if (!(typeof detailApi.before === "function")) {
|
|
2628
|
+
_context2.next = 9;
|
|
2629
|
+
break;
|
|
2630
|
+
}
|
|
2631
|
+
_context2.next = 8;
|
|
2632
|
+
return detailApi.before.call(_this2, reqData);
|
|
2633
|
+
case 8:
|
|
2634
|
+
reqData = _context2.sent;
|
|
2635
|
+
case 9:
|
|
2636
|
+
if (detailApi.url && request) {
|
|
2637
|
+
that.loading = true;
|
|
2638
|
+
request({
|
|
2639
|
+
url: Object(formula_["evaluate"])(detailApi.url, rowData),
|
|
2640
|
+
method: detailApi.method || "GET",
|
|
2641
|
+
data: reqData
|
|
2642
|
+
}).then( /*#__PURE__*/function () {
|
|
2643
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
2644
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2645
|
+
while (1) switch (_context.prev = _context.next) {
|
|
2646
|
+
case 0:
|
|
2647
|
+
that.loading = false;
|
|
2648
|
+
if (!(typeof detailApi.after === "function")) {
|
|
2649
|
+
_context.next = 5;
|
|
2650
|
+
break;
|
|
2651
|
+
}
|
|
2652
|
+
_context.next = 4;
|
|
2653
|
+
return detailApi.after.call(_this2, res);
|
|
2654
|
+
case 4:
|
|
2655
|
+
res = _context.sent;
|
|
2656
|
+
case 5:
|
|
2657
|
+
if (Promise.resolve(res) === res) {
|
|
2658
|
+
res.then(function (resData) {
|
|
2659
|
+
_this2.$refs.updateFormDialog.setFormModel(resData);
|
|
2660
|
+
});
|
|
2661
|
+
} else {
|
|
2662
|
+
_this2.$refs.updateFormDialog.setFormModel(res);
|
|
2663
|
+
}
|
|
2664
|
+
case 6:
|
|
2665
|
+
case "end":
|
|
2666
|
+
return _context.stop();
|
|
2667
|
+
}
|
|
2668
|
+
}, _callee);
|
|
2669
|
+
}));
|
|
2670
|
+
return function (_x) {
|
|
2671
|
+
return _ref.apply(this, arguments);
|
|
2672
|
+
};
|
|
2673
|
+
}()).catch(function (error) {
|
|
2674
|
+
that.loading = false;
|
|
2675
|
+
});
|
|
2676
|
+
} else {
|
|
2677
|
+
_this2.$nextTick(function () {
|
|
2678
|
+
_this2.$refs.updateFormDialog.setFormModel(typeof detailApi.after === "function" ? detailApi.after.call(_this2, reqData) : reqData);
|
|
2679
|
+
});
|
|
2680
|
+
}
|
|
2681
|
+
case 10:
|
|
2682
|
+
case "end":
|
|
2683
|
+
return _context2.stop();
|
|
2479
2684
|
}
|
|
2480
|
-
}
|
|
2481
|
-
|
|
2482
|
-
});
|
|
2483
|
-
} else {
|
|
2484
|
-
this.$nextTick(function () {
|
|
2485
|
-
_this2.$refs.updateFormDialog.setFormModel(typeof detailApi.after === "function" ? detailApi.after.call(_this2, reqData) : reqData);
|
|
2486
|
-
});
|
|
2487
|
-
}
|
|
2685
|
+
}, _callee2);
|
|
2686
|
+
}))();
|
|
2488
2687
|
},
|
|
2489
2688
|
handleDelete: function handleDelete(rowProps, that) {
|
|
2490
2689
|
var _this3 = this;
|
|
@@ -2497,81 +2696,132 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2497
2696
|
confirmButtonText: '确定',
|
|
2498
2697
|
cancelButtonText: '取消',
|
|
2499
2698
|
type: 'warning'
|
|
2500
|
-
}).then(function () {
|
|
2501
|
-
var request
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2699
|
+
}).then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
2700
|
+
var request, reqData;
|
|
2701
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
2702
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
2703
|
+
case 0:
|
|
2704
|
+
request = _this3.getRequest(deleteApi.request);
|
|
2705
|
+
reqData = Object(external_lodash_["merge"])(deleteApi.data || {}, rowProps.row);
|
|
2706
|
+
if (!(typeof deleteApi.before === "function")) {
|
|
2707
|
+
_context3.next = 6;
|
|
2708
|
+
break;
|
|
2709
|
+
}
|
|
2710
|
+
_context3.next = 5;
|
|
2711
|
+
return deleteApi.before.call(_this3, reqData);
|
|
2712
|
+
case 5:
|
|
2713
|
+
reqData = _context3.sent;
|
|
2714
|
+
case 6:
|
|
2715
|
+
that.loading = true;
|
|
2716
|
+
request({
|
|
2717
|
+
url: Object(formula_["evaluate"])(deleteApi.url, reqData),
|
|
2718
|
+
method: deleteApi.method || "GET",
|
|
2719
|
+
data: reqData
|
|
2720
|
+
}).then(function (res) {
|
|
2721
|
+
that.loading = false;
|
|
2722
|
+
_this3.reloadTable();
|
|
2723
|
+
_this3.$emit("deleteSuccess", {
|
|
2724
|
+
request: request,
|
|
2725
|
+
reqData: reqData,
|
|
2726
|
+
resData: res
|
|
2727
|
+
});
|
|
2728
|
+
if (_this3.delete.message !== false) {
|
|
2729
|
+
var message = Object(external_lodash_["merge"])({
|
|
2730
|
+
message: '删除成功',
|
|
2731
|
+
type: 'success'
|
|
2732
|
+
}, _this3.delete.message || {});
|
|
2733
|
+
message_default()(message);
|
|
2734
|
+
}
|
|
2735
|
+
}).catch(function (error) {
|
|
2736
|
+
that.loading = false;
|
|
2737
|
+
_this3.$emit("deleteError", {
|
|
2738
|
+
request: request,
|
|
2739
|
+
reqData: reqData,
|
|
2740
|
+
resError: error
|
|
2741
|
+
});
|
|
2742
|
+
});
|
|
2743
|
+
case 8:
|
|
2744
|
+
case "end":
|
|
2745
|
+
return _context3.stop();
|
|
2525
2746
|
}
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
_this3.$emit("deleteError", {
|
|
2529
|
-
request: request,
|
|
2530
|
-
reqData: reqData,
|
|
2531
|
-
resError: error
|
|
2532
|
-
});
|
|
2533
|
-
});
|
|
2534
|
-
}).catch(function () {});
|
|
2747
|
+
}, _callee3);
|
|
2748
|
+
}))).catch(function () {});
|
|
2535
2749
|
},
|
|
2536
2750
|
handleView: function handleView(rowProps, that) {
|
|
2537
2751
|
var _this4 = this;
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2752
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
2753
|
+
var rowData, viewApi, request, reqData;
|
|
2754
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
2755
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
2756
|
+
case 0:
|
|
2757
|
+
rowData = rowProps.row;
|
|
2758
|
+
_this4.$refs.viewFormDialog.open();
|
|
2759
|
+
viewApi = _this4.view.api || {};
|
|
2760
|
+
request = _this4.getRequest(viewApi.request);
|
|
2761
|
+
reqData = Object(external_lodash_["merge"])(viewApi.data || {}, rowData);
|
|
2762
|
+
if (!(typeof viewApi.before === "function")) {
|
|
2763
|
+
_context5.next = 9;
|
|
2764
|
+
break;
|
|
2765
|
+
}
|
|
2766
|
+
_context5.next = 8;
|
|
2767
|
+
return viewApi.before.call(_this4, reqData);
|
|
2768
|
+
case 8:
|
|
2769
|
+
reqData = _context5.sent;
|
|
2770
|
+
case 9:
|
|
2771
|
+
if (viewApi.url && request) {
|
|
2772
|
+
that.loading = true;
|
|
2773
|
+
request({
|
|
2774
|
+
url: Object(formula_["evaluate"])(viewApi.url, reqData),
|
|
2775
|
+
method: viewApi.method || "GET",
|
|
2776
|
+
data: reqData
|
|
2777
|
+
}).then( /*#__PURE__*/function () {
|
|
2778
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(res) {
|
|
2779
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2780
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
2781
|
+
case 0:
|
|
2782
|
+
that.loading = false;
|
|
2783
|
+
if (!(typeof viewApi.after === "function")) {
|
|
2784
|
+
_context4.next = 5;
|
|
2785
|
+
break;
|
|
2786
|
+
}
|
|
2787
|
+
_context4.next = 4;
|
|
2788
|
+
return viewApi.after.call(_this4, res);
|
|
2789
|
+
case 4:
|
|
2790
|
+
res = _context4.sent;
|
|
2791
|
+
case 5:
|
|
2792
|
+
_this4.$refs.viewFormDialog.setFormModel(res);
|
|
2793
|
+
case 6:
|
|
2794
|
+
case "end":
|
|
2795
|
+
return _context4.stop();
|
|
2796
|
+
}
|
|
2797
|
+
}, _callee4);
|
|
2798
|
+
}));
|
|
2799
|
+
return function (_x2) {
|
|
2800
|
+
return _ref3.apply(this, arguments);
|
|
2801
|
+
};
|
|
2802
|
+
}()).catch(function (error) {
|
|
2803
|
+
that.loading = false;
|
|
2804
|
+
});
|
|
2805
|
+
} else {
|
|
2806
|
+
if (typeof viewApi.after === "function") {
|
|
2807
|
+
reqData = viewApi.after.call(_this4, reqData);
|
|
2808
|
+
}
|
|
2809
|
+
_this4.$nextTick(function () {
|
|
2810
|
+
_this4.$refs.viewFormDialog.setFormModel(typeof viewApi.after === "function" ? viewApi.after.call(_this4, reqData) : reqData);
|
|
2811
|
+
});
|
|
2812
|
+
}
|
|
2813
|
+
case 10:
|
|
2814
|
+
case "end":
|
|
2815
|
+
return _context5.stop();
|
|
2556
2816
|
}
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
that.loading = false;
|
|
2560
|
-
});
|
|
2561
|
-
} else {
|
|
2562
|
-
if (typeof viewApi.after === "function") {
|
|
2563
|
-
reqData = viewApi.after.call(this, reqData);
|
|
2564
|
-
}
|
|
2565
|
-
this.$nextTick(function () {
|
|
2566
|
-
_this4.$refs.viewFormDialog.setFormModel(typeof viewApi.after === "function" ? viewApi.after.call(_this4, reqData) : reqData);
|
|
2567
|
-
});
|
|
2568
|
-
}
|
|
2817
|
+
}, _callee5);
|
|
2818
|
+
}))();
|
|
2569
2819
|
}
|
|
2570
2820
|
}
|
|
2571
2821
|
});
|
|
2572
|
-
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=script&lang=js
|
|
2573
|
-
/* harmony default export */ var
|
|
2574
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2822
|
+
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=script&lang=js
|
|
2823
|
+
/* harmony default export */ var crud_srcvue_type_script_lang_js = (srcvue_type_script_lang_js);
|
|
2824
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/vue-loader@15.11.1_css-loader@2.1.1_lodash@4.17.21_vue-template-compiler@2.7.16_webpack@4.47.0/node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2575
2825
|
var componentNormalizer = __webpack_require__(1);
|
|
2576
2826
|
|
|
2577
2827
|
// CONCATENATED MODULE: ./src/components/crud/src/index.vue
|
|
@@ -2583,7 +2833,7 @@ var componentNormalizer = __webpack_require__(1);
|
|
|
2583
2833
|
/* normalize component */
|
|
2584
2834
|
|
|
2585
2835
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
2586
|
-
|
|
2836
|
+
crud_srcvue_type_script_lang_js,
|
|
2587
2837
|
render,
|
|
2588
2838
|
staticRenderFns,
|
|
2589
2839
|
false,
|