@panpanzhao/component-ui 0.0.53 → 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 +1738 -556
- package/lib/components/crud.js +545 -292
- package/lib/components/dialog.js +44 -13
- package/lib/components/drawer.js +10 -10
- package/lib/components/form-dialog.js +242 -140
- package/lib/components/form-drawer.js +112 -45
- package/lib/components/form-group.js +105 -37
- package/lib/components/form-input.js +804 -94
- package/lib/components/form-item.js +19 -8
- package/lib/components/form-query.js +24 -9
- 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 +23 -23
- package/lib/components/table-column.js +47 -47
- package/lib/components/table-editable.js +22 -23
- package/lib/components/table-operate.js +354 -191
- package/lib/components/table-search.js +23 -17
- package/lib/components/table.js +22 -23
- 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 -1
- 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",
|
|
@@ -928,9 +959,23 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
928
959
|
openedCode: null
|
|
929
960
|
};
|
|
930
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
|
+
},
|
|
931
976
|
computed: {
|
|
932
977
|
actionFormMap: function actionFormMap() {
|
|
933
|
-
var
|
|
978
|
+
var _this2 = this;
|
|
934
979
|
var actionForm = {};
|
|
935
980
|
this.actions.forEach(function (action) {
|
|
936
981
|
if (!action.trigger) {
|
|
@@ -953,15 +998,16 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
953
998
|
if (!targetConfig[formTarget.formCode]) {
|
|
954
999
|
targetConfig[formTarget.formCode] = {};
|
|
955
1000
|
}
|
|
956
|
-
targetConfig[formTarget.formCode][formTarget.fieldCode] =
|
|
957
|
-
targetForm[formTarget.formCode] =
|
|
1001
|
+
targetConfig[formTarget.formCode][formTarget.fieldCode] = _this2.formLayout[formTarget.formCode][formTarget.fieldCode];
|
|
1002
|
+
targetForm[formTarget.formCode] = _this2.formModel[formTarget.formCode];
|
|
958
1003
|
});
|
|
959
1004
|
config.targetConfig = targetConfig;
|
|
960
1005
|
config.targetForm = targetForm;
|
|
1006
|
+
config.formModel = _this2.formModel;
|
|
961
1007
|
for (var _len = arguments.length, arg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
962
1008
|
arg[_key - 1] = arguments[_key];
|
|
963
1009
|
}
|
|
964
|
-
(_action$exec = action.exec).call.apply(_action$exec, [
|
|
1010
|
+
(_action$exec = action.exec).call.apply(_action$exec, [_this2, config].concat(arg));
|
|
965
1011
|
}
|
|
966
1012
|
});
|
|
967
1013
|
});
|
|
@@ -970,7 +1016,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
970
1016
|
},
|
|
971
1017
|
methods: {
|
|
972
1018
|
validate: function validate(callback) {
|
|
973
|
-
var
|
|
1019
|
+
var _this3 = this;
|
|
974
1020
|
var promise;
|
|
975
1021
|
// if no callback, return promise
|
|
976
1022
|
if (typeof callback !== "function" && Promise) {
|
|
@@ -988,9 +1034,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
988
1034
|
}
|
|
989
1035
|
var invalidForms = {};
|
|
990
1036
|
this.items.forEach(function (form) {
|
|
991
|
-
var formNode =
|
|
1037
|
+
var formNode = _this3.$refs[form.prop];
|
|
992
1038
|
if (!formNode) {
|
|
993
|
-
if (typeof callback === "function" && ++count ===
|
|
1039
|
+
if (typeof callback === "function" && ++count === _this3.items.length) {
|
|
994
1040
|
callback(valid, invalidForms);
|
|
995
1041
|
}
|
|
996
1042
|
return true;
|
|
@@ -1000,7 +1046,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1000
1046
|
valid = false;
|
|
1001
1047
|
invalidForms[form.prop] = msgObj;
|
|
1002
1048
|
}
|
|
1003
|
-
if (typeof callback === "function" && ++count ===
|
|
1049
|
+
if (typeof callback === "function" && ++count === _this3.items.length) {
|
|
1004
1050
|
callback(valid, invalidForms);
|
|
1005
1051
|
}
|
|
1006
1052
|
});
|
|
@@ -1010,9 +1056,9 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1010
1056
|
}
|
|
1011
1057
|
},
|
|
1012
1058
|
reset: function reset() {
|
|
1013
|
-
var
|
|
1059
|
+
var _this4 = this;
|
|
1014
1060
|
this.items.forEach(function (form) {
|
|
1015
|
-
var formNode =
|
|
1061
|
+
var formNode = _this4.$refs[form.prop];
|
|
1016
1062
|
if (!formNode) {
|
|
1017
1063
|
return true;
|
|
1018
1064
|
}
|
|
@@ -1023,7 +1069,8 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1023
1069
|
var h = this.$createElement;
|
|
1024
1070
|
var formProp = {
|
|
1025
1071
|
attrs: Object.assign({
|
|
1026
|
-
actions: this.actionFormMap[form.prop]
|
|
1072
|
+
actions: this.actionFormMap[form.prop],
|
|
1073
|
+
formModel: form.prop && this.formModel[form.prop]
|
|
1027
1074
|
}, form),
|
|
1028
1075
|
on: form.on
|
|
1029
1076
|
};
|
|
@@ -1037,10 +1084,10 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1037
1084
|
}, formProp]));
|
|
1038
1085
|
},
|
|
1039
1086
|
renderTab: function renderTab(h, filterItems) {
|
|
1040
|
-
var
|
|
1087
|
+
var _this5 = this;
|
|
1041
1088
|
var itemNode = filterItems.map(function (item) {
|
|
1042
1089
|
if (typeof item.render === "function") {
|
|
1043
|
-
return item.render(h,
|
|
1090
|
+
return item.render(h, _this5.formModel, item);
|
|
1044
1091
|
}
|
|
1045
1092
|
return h("el-tab-pane", {
|
|
1046
1093
|
"key": item.prop,
|
|
@@ -1050,7 +1097,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1050
1097
|
}
|
|
1051
1098
|
}, [h("template", {
|
|
1052
1099
|
"slot": "label"
|
|
1053
|
-
}, [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)]);
|
|
1054
1101
|
});
|
|
1055
1102
|
var tabsProp = {
|
|
1056
1103
|
attrs: {
|
|
@@ -1059,17 +1106,17 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1059
1106
|
},
|
|
1060
1107
|
on: {
|
|
1061
1108
|
"tab-click": function tabClick(tabNode) {
|
|
1062
|
-
|
|
1109
|
+
_this5.$emit("openedCode", tabNode.name);
|
|
1063
1110
|
}
|
|
1064
1111
|
}
|
|
1065
1112
|
};
|
|
1066
1113
|
return h("el-tabs", babel_helper_vue_jsx_merge_props_default()([{}, tabsProp]), [itemNode]);
|
|
1067
1114
|
},
|
|
1068
1115
|
renderCollapse: function renderCollapse(h, filterItems) {
|
|
1069
|
-
var
|
|
1116
|
+
var _this6 = this;
|
|
1070
1117
|
var itemNode = filterItems.map(function (item) {
|
|
1071
1118
|
if (typeof item.render === "function") {
|
|
1072
|
-
return item.render(h,
|
|
1119
|
+
return item.render(h, _this6.formModel, item);
|
|
1073
1120
|
}
|
|
1074
1121
|
return h("el-collapse-item", {
|
|
1075
1122
|
"key": item.prop,
|
|
@@ -1079,7 +1126,7 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1079
1126
|
}
|
|
1080
1127
|
}, [h("template", {
|
|
1081
1128
|
"slot": "title"
|
|
1082
|
-
}, [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)]);
|
|
1083
1130
|
});
|
|
1084
1131
|
var collapseProp = {
|
|
1085
1132
|
attrs: {
|
|
@@ -1087,20 +1134,46 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1087
1134
|
},
|
|
1088
1135
|
on: {
|
|
1089
1136
|
change: function change(val) {
|
|
1090
|
-
|
|
1137
|
+
_this6.$emit("openedCode", val);
|
|
1091
1138
|
}
|
|
1092
1139
|
}
|
|
1093
1140
|
};
|
|
1094
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]);
|
|
1095
1168
|
}
|
|
1096
1169
|
},
|
|
1097
1170
|
render: function render(h) {
|
|
1098
|
-
var
|
|
1171
|
+
var _this8 = this;
|
|
1099
1172
|
var filterItems = this.items.filter(function (item) {
|
|
1100
1173
|
if (item.show === false) {
|
|
1101
1174
|
return false;
|
|
1102
1175
|
}
|
|
1103
|
-
if (typeof item.show === "function" && !item.show.call(
|
|
1176
|
+
if (typeof item.show === "function" && !item.show.call(_this8, {
|
|
1104
1177
|
config: item
|
|
1105
1178
|
})) {
|
|
1106
1179
|
return false;
|
|
@@ -1111,9 +1184,14 @@ var collapse_item_default = /*#__PURE__*/__webpack_require__.n(collapse_item_);
|
|
|
1111
1184
|
return null;
|
|
1112
1185
|
}
|
|
1113
1186
|
this.openedCode = filterItems[0] && filterItems[0].prop;
|
|
1187
|
+
var group = {
|
|
1188
|
+
Custom: this.renderCustom,
|
|
1189
|
+
Tab: this.renderTab,
|
|
1190
|
+
Collapse: this.renderCollapse
|
|
1191
|
+
};
|
|
1114
1192
|
return h("div", {
|
|
1115
|
-
"class": ["form-group", "is-" +
|
|
1116
|
-
}, [this.control
|
|
1193
|
+
"class": ["form-group", "is-" + this.control]
|
|
1194
|
+
}, [group[this.control] ? group[this.control](h, filterItems) : null]);
|
|
1117
1195
|
}
|
|
1118
1196
|
});
|
|
1119
1197
|
// CONCATENATED MODULE: ./src/components/form-group/index.js
|
|
@@ -1123,12 +1201,6 @@ src.install = function (Vue) {
|
|
|
1123
1201
|
};
|
|
1124
1202
|
/* harmony default export */ var form_group = __webpack_exports__["default"] = (src);
|
|
1125
1203
|
|
|
1126
|
-
/***/ }),
|
|
1127
|
-
/* 19 */
|
|
1128
|
-
/***/ (function(module, exports) {
|
|
1129
|
-
|
|
1130
|
-
module.exports = require("element-ui/lib/message");
|
|
1131
|
-
|
|
1132
1204
|
/***/ }),
|
|
1133
1205
|
/* 20 */,
|
|
1134
1206
|
/* 21 */
|
|
@@ -1175,15 +1247,19 @@ var form_view = __webpack_require__(10);
|
|
|
1175
1247
|
render: Function,
|
|
1176
1248
|
slots: Object,
|
|
1177
1249
|
config: Object,
|
|
1250
|
+
formModel: {
|
|
1251
|
+
type: Object,
|
|
1252
|
+
default: function _default() {
|
|
1253
|
+
return {};
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1178
1256
|
show: {
|
|
1179
1257
|
type: [Boolean, Function],
|
|
1180
1258
|
default: true
|
|
1181
1259
|
}
|
|
1182
1260
|
},
|
|
1183
1261
|
data: function data() {
|
|
1184
|
-
return {
|
|
1185
|
-
formModel: {}
|
|
1186
|
-
};
|
|
1262
|
+
return {};
|
|
1187
1263
|
},
|
|
1188
1264
|
computed: {
|
|
1189
1265
|
_formViewGroup: function _formViewGroup() {
|
|
@@ -1246,6 +1322,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1246
1322
|
|
|
1247
1323
|
|
|
1248
1324
|
|
|
1325
|
+
|
|
1249
1326
|
/* harmony default export */ var src = ({
|
|
1250
1327
|
name: "FormViewGroup",
|
|
1251
1328
|
componentName: "FormViewGroup",
|
|
@@ -1286,6 +1363,20 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1286
1363
|
openedCode: null
|
|
1287
1364
|
};
|
|
1288
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
|
+
},
|
|
1289
1380
|
computed: {},
|
|
1290
1381
|
methods: {
|
|
1291
1382
|
setFormModel: function setFormModel(model) {
|
|
@@ -1294,7 +1385,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1294
1385
|
formNode: function formNode(form) {
|
|
1295
1386
|
var h = this.$createElement;
|
|
1296
1387
|
var formProp = {
|
|
1297
|
-
attrs: Object.assign({
|
|
1388
|
+
attrs: Object.assign({
|
|
1389
|
+
formModel: form.prop && this.formModel[form.prop]
|
|
1390
|
+
}, form),
|
|
1298
1391
|
on: form.on
|
|
1299
1392
|
};
|
|
1300
1393
|
return h(content, babel_helper_vue_jsx_merge_props_default()([{
|
|
@@ -1307,10 +1400,10 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1307
1400
|
}, formProp]));
|
|
1308
1401
|
},
|
|
1309
1402
|
renderTab: function renderTab(h, filterItems) {
|
|
1310
|
-
var
|
|
1403
|
+
var _this2 = this;
|
|
1311
1404
|
var itemNode = filterItems.map(function (item) {
|
|
1312
1405
|
if (typeof item.render === "function") {
|
|
1313
|
-
return item.render(h,
|
|
1406
|
+
return item.render(h, _this2.formModel, item);
|
|
1314
1407
|
}
|
|
1315
1408
|
return h("el-tab-pane", {
|
|
1316
1409
|
"key": item.prop,
|
|
@@ -1320,7 +1413,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1320
1413
|
}
|
|
1321
1414
|
}, [h("template", {
|
|
1322
1415
|
"slot": "label"
|
|
1323
|
-
}, [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)]);
|
|
1324
1417
|
});
|
|
1325
1418
|
var tabsProp = {
|
|
1326
1419
|
attrs: {
|
|
@@ -1329,17 +1422,17 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1329
1422
|
},
|
|
1330
1423
|
on: {
|
|
1331
1424
|
"tab-click": function tabClick(tabNode) {
|
|
1332
|
-
|
|
1425
|
+
_this2.$emit("openedCode", tabNode.name);
|
|
1333
1426
|
}
|
|
1334
1427
|
}
|
|
1335
1428
|
};
|
|
1336
1429
|
return h("el-tabs", babel_helper_vue_jsx_merge_props_default()([{}, tabsProp]), [itemNode]);
|
|
1337
1430
|
},
|
|
1338
1431
|
renderCollapse: function renderCollapse(h, filterItems) {
|
|
1339
|
-
var
|
|
1432
|
+
var _this3 = this;
|
|
1340
1433
|
var itemNode = filterItems.map(function (item) {
|
|
1341
1434
|
if (typeof item.render === "function") {
|
|
1342
|
-
return item.render(h,
|
|
1435
|
+
return item.render(h, _this3.formModel, item);
|
|
1343
1436
|
}
|
|
1344
1437
|
return h("el-collapse-item", {
|
|
1345
1438
|
"key": item.prop,
|
|
@@ -1349,7 +1442,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1349
1442
|
}
|
|
1350
1443
|
}, [h("template", {
|
|
1351
1444
|
"slot": "title"
|
|
1352
|
-
}, [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)]);
|
|
1353
1446
|
});
|
|
1354
1447
|
var collapseProp = {
|
|
1355
1448
|
attrs: {
|
|
@@ -1357,20 +1450,46 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1357
1450
|
},
|
|
1358
1451
|
on: {
|
|
1359
1452
|
change: function change(val) {
|
|
1360
|
-
|
|
1453
|
+
_this3.$emit("openedCode", val);
|
|
1361
1454
|
}
|
|
1362
1455
|
}
|
|
1363
1456
|
};
|
|
1364
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]);
|
|
1365
1484
|
}
|
|
1366
1485
|
},
|
|
1367
1486
|
render: function render(h) {
|
|
1368
|
-
var
|
|
1487
|
+
var _this5 = this;
|
|
1369
1488
|
var filterItems = this.items.filter(function (item) {
|
|
1370
1489
|
if (item.show === false) {
|
|
1371
1490
|
return false;
|
|
1372
1491
|
}
|
|
1373
|
-
if (typeof item.show === "function" && !item.show.call(
|
|
1492
|
+
if (typeof item.show === "function" && !item.show.call(_this5, {
|
|
1374
1493
|
config: item
|
|
1375
1494
|
})) {
|
|
1376
1495
|
return false;
|
|
@@ -1381,9 +1500,14 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1381
1500
|
return null;
|
|
1382
1501
|
}
|
|
1383
1502
|
this.openedCode = filterItems[0] && filterItems[0].prop;
|
|
1503
|
+
var group = {
|
|
1504
|
+
Custom: this.renderCustom,
|
|
1505
|
+
Tab: this.renderTab,
|
|
1506
|
+
Collapse: this.renderCollapse
|
|
1507
|
+
};
|
|
1384
1508
|
return h("div", {
|
|
1385
|
-
"class": ["form-view-group", "is-" +
|
|
1386
|
-
}, [this.control
|
|
1509
|
+
"class": ["form-view-group", "is-" + this.control]
|
|
1510
|
+
}, [group[this.control] ? group[this.control](h, filterItems) : null]);
|
|
1387
1511
|
}
|
|
1388
1512
|
});
|
|
1389
1513
|
// CONCATENATED MODULE: ./src/components/form-view-group/index.js
|
|
@@ -1415,14 +1539,14 @@ var button_ = __webpack_require__(5);
|
|
|
1415
1539
|
var button_default = /*#__PURE__*/__webpack_require__.n(button_);
|
|
1416
1540
|
|
|
1417
1541
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
1418
|
-
var message_ = __webpack_require__(
|
|
1542
|
+
var message_ = __webpack_require__(17);
|
|
1419
1543
|
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
1420
1544
|
|
|
1421
1545
|
// EXTERNAL MODULE: ./src/components/form/index.js + 5 modules
|
|
1422
1546
|
var components_form = __webpack_require__(4);
|
|
1423
1547
|
|
|
1424
1548
|
// EXTERNAL MODULE: ./src/components/form-group/index.js + 2 modules
|
|
1425
|
-
var form_group = __webpack_require__(
|
|
1549
|
+
var form_group = __webpack_require__(19);
|
|
1426
1550
|
|
|
1427
1551
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
|
|
1428
1552
|
var formula_ = __webpack_require__(3);
|
|
@@ -1430,12 +1554,15 @@ var formula_ = __webpack_require__(3);
|
|
|
1430
1554
|
// EXTERNAL MODULE: external "lodash"
|
|
1431
1555
|
var external_lodash_ = __webpack_require__(2);
|
|
1432
1556
|
|
|
1433
|
-
// 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
|
|
1434
1558
|
|
|
1435
1559
|
|
|
1436
1560
|
|
|
1437
1561
|
|
|
1438
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); }); }; }
|
|
1439
1566
|
|
|
1440
1567
|
|
|
1441
1568
|
|
|
@@ -1443,7 +1570,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1443
1570
|
|
|
1444
1571
|
|
|
1445
1572
|
|
|
1446
|
-
/* harmony default export */ var
|
|
1573
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
|
1447
1574
|
name: "FormDialog",
|
|
1448
1575
|
componentName: "FormDialog",
|
|
1449
1576
|
components: {
|
|
@@ -1607,93 +1734,119 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1607
1734
|
},
|
|
1608
1735
|
submit: function submit(button) {
|
|
1609
1736
|
var _this3 = this;
|
|
1610
|
-
this.$refs.form.validate(function (
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
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
|
-
|
|
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
|
+
}());
|
|
1697
1850
|
},
|
|
1698
1851
|
renderForm: function renderForm(h) {
|
|
1699
1852
|
var param = {
|
|
@@ -1713,13 +1866,19 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1713
1866
|
},
|
|
1714
1867
|
renderTitle: function renderTitle(h) {
|
|
1715
1868
|
if (typeof this.slots.title === "function") {
|
|
1716
|
-
return this.slots.title.call(this,
|
|
1869
|
+
return this.slots.title.call(this, {
|
|
1870
|
+
ref: this,
|
|
1871
|
+
formModel: this.formModel
|
|
1872
|
+
});
|
|
1717
1873
|
}
|
|
1718
1874
|
return this.slots.title || this.dialog.title;
|
|
1719
1875
|
},
|
|
1720
1876
|
renderTools: function renderTools(h) {
|
|
1721
1877
|
if (typeof this.slots.footer === "function") {
|
|
1722
|
-
return this.slots.footer.call(this,
|
|
1878
|
+
return this.slots.footer.call(this, {
|
|
1879
|
+
ref: this,
|
|
1880
|
+
formModel: this.formModel
|
|
1881
|
+
});
|
|
1723
1882
|
}
|
|
1724
1883
|
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
1725
1884
|
var toolParam = {
|
|
@@ -1754,9 +1913,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1754
1913
|
}, [this.renderTools(h)]), this.renderForm(h)]);
|
|
1755
1914
|
}
|
|
1756
1915
|
});
|
|
1757
|
-
// CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue?vue&type=script&lang=js
|
|
1758
|
-
/* harmony default export */ var
|
|
1759
|
-
// 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
|
|
1760
1919
|
var componentNormalizer = __webpack_require__(1);
|
|
1761
1920
|
|
|
1762
1921
|
// CONCATENATED MODULE: ./src/components/form-dialog/src/index.vue
|
|
@@ -1768,7 +1927,7 @@ var src_render, staticRenderFns
|
|
|
1768
1927
|
/* normalize component */
|
|
1769
1928
|
|
|
1770
1929
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
1771
|
-
|
|
1930
|
+
form_dialog_srcvue_type_script_lang_js,
|
|
1772
1931
|
src_render,
|
|
1773
1932
|
staticRenderFns,
|
|
1774
1933
|
false,
|
|
@@ -1788,6 +1947,12 @@ src.install = function (Vue) {
|
|
|
1788
1947
|
|
|
1789
1948
|
/***/ }),
|
|
1790
1949
|
/* 26 */
|
|
1950
|
+
/***/ (function(module, exports) {
|
|
1951
|
+
|
|
1952
|
+
module.exports = require("element-ui/lib/message-box");
|
|
1953
|
+
|
|
1954
|
+
/***/ }),
|
|
1955
|
+
/* 27 */
|
|
1791
1956
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1792
1957
|
|
|
1793
1958
|
"use strict";
|
|
@@ -1812,11 +1977,7 @@ var form_view = __webpack_require__(10);
|
|
|
1812
1977
|
// EXTERNAL MODULE: ./src/components/form-view-group/index.js + 2 modules
|
|
1813
1978
|
var form_view_group = __webpack_require__(23);
|
|
1814
1979
|
|
|
1815
|
-
//
|
|
1816
|
-
var external_lodash_ = __webpack_require__(2);
|
|
1817
|
-
|
|
1818
|
-
// 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&
|
|
1819
|
-
|
|
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
|
|
1820
1981
|
|
|
1821
1982
|
|
|
1822
1983
|
|
|
@@ -1826,7 +1987,8 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1826
1987
|
|
|
1827
1988
|
|
|
1828
1989
|
|
|
1829
|
-
|
|
1990
|
+
// import { merge } from 'lodash';
|
|
1991
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
|
1830
1992
|
name: "FormViewDialog",
|
|
1831
1993
|
componentName: "FormViewDialog",
|
|
1832
1994
|
components: {
|
|
@@ -1953,7 +2115,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1953
2115
|
this.show = false;
|
|
1954
2116
|
},
|
|
1955
2117
|
setFormModel: function setFormModel(model) {
|
|
1956
|
-
Object(
|
|
2118
|
+
Object.assign(this.formModel, model);
|
|
1957
2119
|
},
|
|
1958
2120
|
renderForm: function renderForm(h) {
|
|
1959
2121
|
var param = {
|
|
@@ -1972,13 +2134,19 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
1972
2134
|
},
|
|
1973
2135
|
renderTitle: function renderTitle(h) {
|
|
1974
2136
|
if (typeof this.slots.title === "function") {
|
|
1975
|
-
return this.slots.title.call(this,
|
|
2137
|
+
return this.slots.title.call(this, {
|
|
2138
|
+
ref: this,
|
|
2139
|
+
formModel: this.formModel
|
|
2140
|
+
});
|
|
1976
2141
|
}
|
|
1977
2142
|
return this.slots.title || this.dialog.title;
|
|
1978
2143
|
},
|
|
1979
2144
|
renderTools: function renderTools(h) {
|
|
1980
2145
|
if (typeof this.slots.footer === "function") {
|
|
1981
|
-
return this.slots.footer.call(this,
|
|
2146
|
+
return this.slots.footer.call(this, {
|
|
2147
|
+
ref: this,
|
|
2148
|
+
formModel: this.formModel
|
|
2149
|
+
});
|
|
1982
2150
|
}
|
|
1983
2151
|
return h("div", [(this.tools || this.defaultTools).map(function (item) {
|
|
1984
2152
|
var toolParam = {
|
|
@@ -2011,9 +2179,9 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2011
2179
|
}, [this.renderTools(h)]), this.renderForm(h)]);
|
|
2012
2180
|
}
|
|
2013
2181
|
});
|
|
2014
|
-
// CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue?vue&type=script&lang=js
|
|
2015
|
-
/* harmony default export */ var
|
|
2016
|
-
// 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
|
|
2017
2185
|
var componentNormalizer = __webpack_require__(1);
|
|
2018
2186
|
|
|
2019
2187
|
// CONCATENATED MODULE: ./src/components/form-view-dialog/src/index.vue
|
|
@@ -2025,7 +2193,7 @@ var src_render, staticRenderFns
|
|
|
2025
2193
|
/* normalize component */
|
|
2026
2194
|
|
|
2027
2195
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
2028
|
-
|
|
2196
|
+
form_view_dialog_srcvue_type_script_lang_js,
|
|
2029
2197
|
src_render,
|
|
2030
2198
|
staticRenderFns,
|
|
2031
2199
|
false,
|
|
@@ -2044,22 +2212,16 @@ src.install = function (Vue) {
|
|
|
2044
2212
|
/* harmony default export */ var form_view_dialog = __webpack_exports__["default"] = (src);
|
|
2045
2213
|
|
|
2046
2214
|
/***/ }),
|
|
2047
|
-
/* 27 */,
|
|
2048
2215
|
/* 28 */,
|
|
2049
|
-
/* 29
|
|
2216
|
+
/* 29 */,
|
|
2217
|
+
/* 30 */
|
|
2050
2218
|
/***/ (function(module, exports) {
|
|
2051
2219
|
|
|
2052
2220
|
module.exports = require("@panpanzhao/component-ui/lib/components/table-search");
|
|
2053
2221
|
|
|
2054
2222
|
/***/ }),
|
|
2055
|
-
/* 30 */,
|
|
2056
2223
|
/* 31 */,
|
|
2057
|
-
/* 32
|
|
2058
|
-
/***/ (function(module, exports) {
|
|
2059
|
-
|
|
2060
|
-
module.exports = require("element-ui/lib/message-box");
|
|
2061
|
-
|
|
2062
|
-
/***/ }),
|
|
2224
|
+
/* 32 */,
|
|
2063
2225
|
/* 33 */,
|
|
2064
2226
|
/* 34 */,
|
|
2065
2227
|
/* 35 */,
|
|
@@ -2103,14 +2265,15 @@ module.exports = require("element-ui/lib/message-box");
|
|
|
2103
2265
|
/* 73 */,
|
|
2104
2266
|
/* 74 */,
|
|
2105
2267
|
/* 75 */,
|
|
2106
|
-
/* 76
|
|
2268
|
+
/* 76 */,
|
|
2269
|
+
/* 77 */
|
|
2107
2270
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2108
2271
|
|
|
2109
2272
|
"use strict";
|
|
2110
2273
|
// ESM COMPAT FLAG
|
|
2111
2274
|
__webpack_require__.r(__webpack_exports__);
|
|
2112
2275
|
|
|
2113
|
-
// 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
|
|
2114
2277
|
var render = function render() {
|
|
2115
2278
|
var _vm = this,
|
|
2116
2279
|
_c = _vm._self._c
|
|
@@ -2182,24 +2345,24 @@ var staticRenderFns = []
|
|
|
2182
2345
|
render._withStripped = true
|
|
2183
2346
|
|
|
2184
2347
|
|
|
2185
|
-
// 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
|
|
2186
2349
|
|
|
2187
2350
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/components/table-search"
|
|
2188
|
-
var table_search_ = __webpack_require__(
|
|
2351
|
+
var table_search_ = __webpack_require__(30);
|
|
2189
2352
|
var table_search_default = /*#__PURE__*/__webpack_require__.n(table_search_);
|
|
2190
2353
|
|
|
2191
2354
|
// EXTERNAL MODULE: ./src/components/form-dialog/index.js + 3 modules
|
|
2192
2355
|
var form_dialog = __webpack_require__(25);
|
|
2193
2356
|
|
|
2194
2357
|
// EXTERNAL MODULE: ./src/components/form-view-dialog/index.js + 3 modules
|
|
2195
|
-
var form_view_dialog = __webpack_require__(
|
|
2358
|
+
var form_view_dialog = __webpack_require__(27);
|
|
2196
2359
|
|
|
2197
2360
|
// EXTERNAL MODULE: external "element-ui/lib/message-box"
|
|
2198
|
-
var message_box_ = __webpack_require__(
|
|
2361
|
+
var message_box_ = __webpack_require__(26);
|
|
2199
2362
|
var message_box_default = /*#__PURE__*/__webpack_require__.n(message_box_);
|
|
2200
2363
|
|
|
2201
2364
|
// EXTERNAL MODULE: external "element-ui/lib/message"
|
|
2202
|
-
var message_ = __webpack_require__(
|
|
2365
|
+
var message_ = __webpack_require__(17);
|
|
2203
2366
|
var message_default = /*#__PURE__*/__webpack_require__.n(message_);
|
|
2204
2367
|
|
|
2205
2368
|
// EXTERNAL MODULE: external "@panpanzhao/component-ui/lib/utils/formula"
|
|
@@ -2208,7 +2371,10 @@ var formula_ = __webpack_require__(3);
|
|
|
2208
2371
|
// EXTERNAL MODULE: external "lodash"
|
|
2209
2372
|
var external_lodash_ = __webpack_require__(2);
|
|
2210
2373
|
|
|
2211
|
-
// 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); }); }; }
|
|
2212
2378
|
|
|
2213
2379
|
|
|
2214
2380
|
|
|
@@ -2216,7 +2382,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2216
2382
|
|
|
2217
2383
|
|
|
2218
2384
|
|
|
2219
|
-
/* harmony default export */ var
|
|
2385
|
+
/* harmony default export */ var srcvue_type_script_lang_js = ({
|
|
2220
2386
|
name: "CRUD",
|
|
2221
2387
|
componentName: "CRUD",
|
|
2222
2388
|
components: {
|
|
@@ -2253,7 +2419,7 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2253
2419
|
dialog: {},
|
|
2254
2420
|
message: {
|
|
2255
2421
|
success: {
|
|
2256
|
-
message: '
|
|
2422
|
+
message: '修改成功',
|
|
2257
2423
|
type: 'success',
|
|
2258
2424
|
showClose: true
|
|
2259
2425
|
}
|
|
@@ -2448,40 +2614,76 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2448
2614
|
},
|
|
2449
2615
|
handleUpdate: function handleUpdate(rowProps, that) {
|
|
2450
2616
|
var _this2 = this;
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
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();
|
|
2476
2684
|
}
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
});
|
|
2480
|
-
} else {
|
|
2481
|
-
this.$nextTick(function () {
|
|
2482
|
-
_this2.$refs.updateFormDialog.setFormModel(typeof detailApi.after === "function" ? detailApi.after.call(_this2, reqData) : reqData);
|
|
2483
|
-
});
|
|
2484
|
-
}
|
|
2685
|
+
}, _callee2);
|
|
2686
|
+
}))();
|
|
2485
2687
|
},
|
|
2486
2688
|
handleDelete: function handleDelete(rowProps, that) {
|
|
2487
2689
|
var _this3 = this;
|
|
@@ -2494,81 +2696,132 @@ var external_lodash_ = __webpack_require__(2);
|
|
|
2494
2696
|
confirmButtonText: '确定',
|
|
2495
2697
|
cancelButtonText: '取消',
|
|
2496
2698
|
type: 'warning'
|
|
2497
|
-
}).then(function () {
|
|
2498
|
-
var request
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
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();
|
|
2522
2746
|
}
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
_this3.$emit("deleteError", {
|
|
2526
|
-
request: request,
|
|
2527
|
-
reqData: reqData,
|
|
2528
|
-
resError: error
|
|
2529
|
-
});
|
|
2530
|
-
});
|
|
2531
|
-
}).catch(function () {});
|
|
2747
|
+
}, _callee3);
|
|
2748
|
+
}))).catch(function () {});
|
|
2532
2749
|
},
|
|
2533
2750
|
handleView: function handleView(rowProps, that) {
|
|
2534
2751
|
var _this4 = this;
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
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();
|
|
2553
2816
|
}
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
that.loading = false;
|
|
2557
|
-
});
|
|
2558
|
-
} else {
|
|
2559
|
-
if (typeof viewApi.after === "function") {
|
|
2560
|
-
reqData = viewApi.after.call(this, reqData);
|
|
2561
|
-
}
|
|
2562
|
-
this.$nextTick(function () {
|
|
2563
|
-
_this4.$refs.viewFormDialog.setFormModel(typeof viewApi.after === "function" ? viewApi.after.call(_this4, reqData) : reqData);
|
|
2564
|
-
});
|
|
2565
|
-
}
|
|
2817
|
+
}, _callee5);
|
|
2818
|
+
}))();
|
|
2566
2819
|
}
|
|
2567
2820
|
}
|
|
2568
2821
|
});
|
|
2569
|
-
// CONCATENATED MODULE: ./src/components/crud/src/index.vue?vue&type=script&lang=js
|
|
2570
|
-
/* harmony default export */ var
|
|
2571
|
-
// 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
|
|
2572
2825
|
var componentNormalizer = __webpack_require__(1);
|
|
2573
2826
|
|
|
2574
2827
|
// CONCATENATED MODULE: ./src/components/crud/src/index.vue
|
|
@@ -2580,7 +2833,7 @@ var componentNormalizer = __webpack_require__(1);
|
|
|
2580
2833
|
/* normalize component */
|
|
2581
2834
|
|
|
2582
2835
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
2583
|
-
|
|
2836
|
+
crud_srcvue_type_script_lang_js,
|
|
2584
2837
|
render,
|
|
2585
2838
|
staticRenderFns,
|
|
2586
2839
|
false,
|