@xatlas/rainbow-core 1.2.5 → 1.2.9
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/dist/core.common.js +116 -48
- package/dist/core.common.js.map +1 -1
- package/dist/core.umd.js +116 -48
- package/dist/core.umd.js.map +1 -1
- package/dist/core.umd.min.js +4 -4
- package/dist/core.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/core.umd.js
CHANGED
|
@@ -2766,7 +2766,7 @@ function flow_asyncToGenerator(fn) { return function () { var self = this, args
|
|
|
2766
2766
|
}, _callee2);
|
|
2767
2767
|
}))();
|
|
2768
2768
|
},
|
|
2769
|
-
|
|
2769
|
+
handleFlowReassign: function handleFlowReassign(action) {
|
|
2770
2770
|
var _this3 = this;
|
|
2771
2771
|
|
|
2772
2772
|
return flow_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
|
|
@@ -2777,37 +2777,88 @@ function flow_asyncToGenerator(fn) { return function () { var self = this, args
|
|
|
2777
2777
|
case 0:
|
|
2778
2778
|
model = _this3.actionModel;
|
|
2779
2779
|
_this3.actionConfirmMode = true;
|
|
2780
|
-
|
|
2781
|
-
_context3.next = 5;
|
|
2780
|
+
_context3.next = 4;
|
|
2782
2781
|
return _this3.saveData({
|
|
2783
2782
|
key: action.key,
|
|
2784
2783
|
data: flow_objectSpread({}, model)
|
|
2785
2784
|
});
|
|
2786
2785
|
|
|
2787
|
-
case
|
|
2786
|
+
case 4:
|
|
2788
2787
|
data = _context3.sent;
|
|
2789
|
-
_this3.actioning = false;
|
|
2790
2788
|
|
|
2791
2789
|
if (data.data) {
|
|
2792
|
-
_context3.next =
|
|
2790
|
+
_context3.next = 7;
|
|
2793
2791
|
break;
|
|
2794
2792
|
}
|
|
2795
2793
|
|
|
2796
2794
|
return _context3.abrupt("return");
|
|
2797
2795
|
|
|
2798
|
-
case
|
|
2796
|
+
case 7:
|
|
2799
2797
|
_this3.actionConfirmMode = false;
|
|
2800
2798
|
_this3.actionViewWidget = 'workflow-report';
|
|
2799
|
+
_this3.actionModel = flow_objectSpread(flow_objectSpread({}, model), {}, {
|
|
2800
|
+
data: flow_objectSpread({}, data.data),
|
|
2801
|
+
confirm: 1,
|
|
2802
|
+
deal_note: '',
|
|
2803
|
+
flow_action_name: 'reassign',
|
|
2804
|
+
form_param: [],
|
|
2805
|
+
todo_actors: [],
|
|
2806
|
+
todo_id: data.data.todo_id,
|
|
2807
|
+
back_step: ''
|
|
2808
|
+
});
|
|
2801
2809
|
_this3.actionParams.flow = data;
|
|
2802
2810
|
_this3.actionViewVisible = true;
|
|
2803
2811
|
|
|
2804
|
-
case
|
|
2812
|
+
case 12:
|
|
2805
2813
|
case "end":
|
|
2806
2814
|
return _context3.stop();
|
|
2807
2815
|
}
|
|
2808
2816
|
}
|
|
2809
2817
|
}, _callee3);
|
|
2810
2818
|
}))();
|
|
2819
|
+
},
|
|
2820
|
+
handleFlowQuery: function handleFlowQuery(action) {
|
|
2821
|
+
var _this4 = this;
|
|
2822
|
+
|
|
2823
|
+
return flow_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
|
|
2824
|
+
var model, data;
|
|
2825
|
+
return regenerator_default.a.wrap(function _callee4$(_context4) {
|
|
2826
|
+
while (1) {
|
|
2827
|
+
switch (_context4.prev = _context4.next) {
|
|
2828
|
+
case 0:
|
|
2829
|
+
model = _this4.actionModel;
|
|
2830
|
+
_this4.actionConfirmMode = true;
|
|
2831
|
+
_this4.actioning = true;
|
|
2832
|
+
_context4.next = 5;
|
|
2833
|
+
return _this4.saveData({
|
|
2834
|
+
key: action.key,
|
|
2835
|
+
data: flow_objectSpread({}, model)
|
|
2836
|
+
});
|
|
2837
|
+
|
|
2838
|
+
case 5:
|
|
2839
|
+
data = _context4.sent;
|
|
2840
|
+
_this4.actioning = false;
|
|
2841
|
+
|
|
2842
|
+
if (data.data) {
|
|
2843
|
+
_context4.next = 9;
|
|
2844
|
+
break;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
return _context4.abrupt("return");
|
|
2848
|
+
|
|
2849
|
+
case 9:
|
|
2850
|
+
_this4.actionConfirmMode = false;
|
|
2851
|
+
_this4.actionViewWidget = 'workflow-report';
|
|
2852
|
+
_this4.actionParams.flow = data;
|
|
2853
|
+
_this4.actionViewVisible = true;
|
|
2854
|
+
|
|
2855
|
+
case 13:
|
|
2856
|
+
case "end":
|
|
2857
|
+
return _context4.stop();
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
}, _callee4);
|
|
2861
|
+
}))();
|
|
2811
2862
|
}
|
|
2812
2863
|
}
|
|
2813
2864
|
});
|
|
@@ -3066,6 +3117,7 @@ var ACTION_ACCESS = {
|
|
|
3066
3117
|
'e.flow-submit': 'handleFlowCheck',
|
|
3067
3118
|
'e.flow-check': 'handleFlowCheck',
|
|
3068
3119
|
'e.flow-open': 'handleFlowCheck',
|
|
3120
|
+
'e.flow-reassign': 'handleFlowReassign',
|
|
3069
3121
|
viewSelect: 'handleViewPicker',
|
|
3070
3122
|
algorithm: 'handleAlgorithm'
|
|
3071
3123
|
};
|
|
@@ -3836,8 +3888,8 @@ function form_base_defineProperty(obj, key, value) { if (key in obj) { Object.de
|
|
|
3836
3888
|
}
|
|
3837
3889
|
}
|
|
3838
3890
|
});
|
|
3839
|
-
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"302e9f43-vue-loader-template"}!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/forms/Item.vue?vue&type=template&id=
|
|
3840
|
-
var
|
|
3891
|
+
// CONCATENATED MODULE: ../node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"302e9f43-vue-loader-template"}!../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib??vue-loader-options!../src/web/components/forms/Item.vue?vue&type=template&id=4af280fd&
|
|
3892
|
+
var Itemvue_type_template_id_4af280fd_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showModel)?_c('a-form-model-item',{ref:"item",attrs:{"label":_vm.label,"help":_vm.help,"extra":_vm.extra,"validate-status":_vm.validateStatus,"colon":false,"has-feedback":false,"prop":_vm.prop,"rules":_vm.rules}},[(['select', 'chosen'].includes(_vm.schema.control))?_c('a-select',{staticStyle:{"width":"100%","min-width":"190px"},attrs:{"value":_vm.value,"allowClear":"","showSearch":_vm.schema.control === 'chosen',"optionFilterProp":"children","filterOption":_vm.filterOption,"disabled":_vm.readonly,"dropdownMatchSelectWidth":false,"placeholder":_vm.placeholder},on:{"change":function (value) { return _vm.$emit('change', value); }}},_vm._l((_vm.options),function(item,index){return _c('a-select-option',{key:index,attrs:{"title":item.label,"value":item.value}},[_vm._v(" "+_vm._s(item.label)+" ")])}),1):(['multiple'].includes(_vm.schema.control))?_c('a-select',{staticStyle:{"width":"100%","min-width":"190px"},attrs:{"mode":"multiple","allowClear":"","defaultValue":_vm.value && _vm.value.split(','),"disabled":_vm.readonly,"dropdownMatchSelectWidth":false,"placeholder":_vm.placeholder},on:{"change":function (value) { return _vm.$emit('change', value.join(',')); }}},_vm._l((_vm.options),function(item,index){return _c('a-select-option',{key:index,attrs:{"title":item.label,"value":item.value}},[_vm._v(" "+_vm._s(item.label)+" ")])}),1):(_vm.schema.metaType === 'Boolean')?_c('a-switch',{attrs:{"disabled":_vm.readonly,"defaultChecked":_vm.value},on:{"change":function (e) { return _vm.$emit('change', e.target.value); }}}):(_vm.schema.control === 'daterange')?_c('a-range-picker',{attrs:{"disabled":_vm.readonly,"valueFormat":'YYYY-MM-DD',"placeholder":[("开始" + _vm.placeholder), ("结束" + _vm.placeholder)],"defaultValue":_vm.value ? _vm.value.split(',').map(function (v) { return _vm.moment(Number(v) || v); }) : null,"allowClear":""},on:{"change":function (date, str) {
|
|
3841
3893
|
_vm.$emit('change', str.join(','))
|
|
3842
3894
|
}}}):(
|
|
3843
3895
|
['date', 'datetime'].includes(_vm.schema.control) ||
|
|
@@ -3865,17 +3917,17 @@ var Itemvue_type_template_id_5c935f44_render = function () {var _vm=this;var _h=
|
|
|
3865
3917
|
_vm.schema.params && _vm.schema.params.fileSize
|
|
3866
3918
|
? _vm.schema.params.fileSize
|
|
3867
3919
|
: null
|
|
3868
|
-
)}}},[_c('a-icon',{attrs:{"type":"upload"}}),_vm._v(" 批量上传 ")],1)],1),_vm._l((_vm.defaultFileList),function(file,index){return _c('div',{key:index,staticClass:"form-file-upload"},[_c('a-row',{attrs:{"type":"flex","justify":"space-between","align":"middle"}},[_c('a-col',[_vm._v(_vm._s(file.file_name || file.name))]),_c('a-col',[_c('a-icon',{attrs:{"type":"close"},on:{"click":function($event){return _vm.handleRemove(index)}}})],1)],1)],1)})],2):(_vm.schema.control === 'image')?_c('a-upload',{staticClass:"avatar-uploader",attrs:{"accept":"image/*","list-type":"picture-card","default-file-list":_vm.defaultFileList,"before-upload":_vm.beforeUpload,"remove":function () { return _vm.$emit('change', null); }}},[(!_vm.formModel[_vm.schema.name])?_c('div',[_c('a-icon',{attrs:{"type":'plus'}}),_c('div',{staticClass:"ant-upload-text"},[_vm._v("上传")])],1):_vm._e()]):(_vm.schema.control === 'view-select' && !_vm.readonly)?_c('a-input',{attrs:{"placeholder":_vm.placeholder,"read-only":"","value":_vm.valueLabel,"allowClear":""}},[_c('a-icon',{attrs:{"slot":"addonAfter","type":"search"},on:{"click":function($event){return _vm.handlePickerShow(_vm.schema)}},slot:"addonAfter"})],1):(_vm.schema.control === 'textarea')?_c('a-textarea',{attrs:{"placeholder":_vm.placeholder,"defaultValue":_vm.value,"disabled":_vm.readonly,"maxLength":_vm.schema.maxLength ? _vm.schema.maxLength : 512,"auto-size":{ minRows: 1, maxRows: 10 },"allowClear":""},on:{"blur":function (e) { return _vm.$emit('change', e.target.value); },"pressEnter":function (e) { return _vm.$emit('change', e.target.value); }}}):(_vm.schema.control === 'csv-json')?_c('span',[_c('a-textarea',{attrs:{"defaultValue":_vm.value,"placeholder":_vm.placeholder,"disabled":_vm.readonly,"maxLength":_vm.schema.maxLength ? _vm.schema.maxLength : 512,"auto-size":{ minRows: 1, maxRows: 10 },"allowClear":""},on:{"blur":function (e) { return _vm.$emit('change', e.target.value); },"pressEnter":function (e) { return _vm.$emit('change', e.target.value); }}})],1):(_vm.schema.control === 'tree-suggest')?_c('a-tree-select',{staticStyle:{"width":"100%","min-width":"190px"},attrs:{"placeholder":_vm.placeholder,"dropdownStyle":{ maxHeight: '300px', overflow: 'auto' },"treeData":_vm.async ? _vm.asyncTreeData : _vm.treeData,"loadData":(_vm.async && _vm.handleAsyncLoadData) || null,"allowClear":"","value":_vm.value},on:{"change":function (value) { return _vm.$emit('change', value); }}}):(_vm.schema.control === 'tree-select')?_c('div',[(0)?undefined:_vm._e(),_c('a-tree',{attrs:{"replaceFields":{ title: 'label' },"treeData":_vm.async ? _vm.asyncTreeData : _vm.treeData,"selectedKeys":[_vm.defaultValue],"loadData":(_vm.async && _vm.handleAsyncLoadData) || null,"defaultExpandedKeys":[_vm.treeData[0] && _vm.treeData[0].key]},on:{"select":_vm.handleTreeSelect}})],1):(_vm.schema.control === 'password')?_c("a-input-password",{tag:"component",attrs:{"name":_vm.schema.name,"placeholder":_vm.placeholder,"allowClear":""},on:{"change":function (e) { return _vm.$emit('change', e.target.value); }}}):(_vm.schema.control === 'editor')?_c('Editor',{attrs:{"placeholder":_vm.placeholder,"disabled":_vm.readonly},on:{"change":function (val) { return _vm.$emit('change', val); }},model:{value:(_vm.formModel[_vm.schema.name]),callback:function ($$v) {_vm.$set(_vm.formModel, _vm.schema.name, $$v)},expression:"formModel[schema.name]"}}):(_vm.schema.control === 'verify')?_c('VerificationCode',{attrs:{"placeholder":_vm.placeholder,"url":_vm.schema.params.url,"time":_vm.schema.params.time,"phone":_vm.formModel[_vm.schema.params.phoneName]},on:{"change":function (val) { return _vm.$emit('change', val); }}}):(_vm.schema.control === 'map-marker')?_c('MapMarker',{attrs:{"placeholder":_vm.placeholder,"name":_vm.schema.name,"mapCenter":_vm.schema.params &&
|
|
3920
|
+
)}}},[_c('a-icon',{attrs:{"type":"upload"}}),_vm._v(" 批量上传 ")],1)],1),_vm._l((_vm.defaultFileList),function(file,index){return _c('div',{key:index,staticClass:"form-file-upload"},[_c('a-row',{attrs:{"type":"flex","justify":"space-between","align":"middle"}},[_c('a-col',[_vm._v(_vm._s(file.file_name || file.name))]),_c('a-col',[_c('a-icon',{attrs:{"type":"close"},on:{"click":function($event){return _vm.handleRemove(index)}}})],1)],1)],1)})],2):(_vm.schema.control === 'image')?_c('a-upload',{staticClass:"avatar-uploader",attrs:{"accept":"image/*","list-type":"picture-card","default-file-list":_vm.defaultFileList,"before-upload":_vm.beforeUpload,"remove":function () { return _vm.$emit('change', null); }}},[(!_vm.formModel[_vm.schema.name])?_c('div',[_c('a-icon',{attrs:{"type":'plus'}}),_c('div',{staticClass:"ant-upload-text"},[_vm._v("上传")])],1):_vm._e()]):(_vm.schema.control === 'view-select' && !_vm.readonly)?_c('a-input',{attrs:{"placeholder":_vm.placeholder,"read-only":"","value":_vm.valueLabel,"allowClear":""}},[_c('a-icon',{attrs:{"slot":"addonAfter","type":"search"},on:{"click":function($event){return _vm.handlePickerShow(_vm.schema)}},slot:"addonAfter"})],1):(_vm.schema.control === 'textarea')?_c('a-textarea',{attrs:{"placeholder":_vm.placeholder,"defaultValue":_vm.value,"disabled":_vm.readonly,"maxLength":_vm.schema.maxLength ? _vm.schema.maxLength : 512,"auto-size":{ minRows: 1, maxRows: 10 },"allowClear":""},on:{"blur":function (e) { return _vm.$emit('change', e.target.value); },"pressEnter":function (e) { return _vm.$emit('change', e.target.value); }}}):(_vm.schema.control === 'csv-json')?_c('span',[_c('a-textarea',{attrs:{"defaultValue":_vm.value,"placeholder":_vm.placeholder,"disabled":_vm.readonly,"maxLength":_vm.schema.maxLength ? _vm.schema.maxLength : 512,"auto-size":{ minRows: 1, maxRows: 10 },"allowClear":""},on:{"blur":function (e) { return _vm.$emit('change', e.target.value); },"pressEnter":function (e) { return _vm.$emit('change', e.target.value); }}})],1):(_vm.schema.control === 'tree-suggest')?_c('a-tree-select',{staticStyle:{"width":"100%","min-width":"190px"},attrs:{"placeholder":_vm.placeholder,"dropdownStyle":{ maxHeight: '300px', overflow: 'auto' },"treeData":_vm.async ? _vm.asyncTreeData : _vm.treeData,"loadData":(_vm.async && _vm.handleAsyncLoadData) || null,"allowClear":"","value":_vm.value},on:{"change":function (value) { return _vm.$emit('change', value); }}}):(_vm.schema.control === 'tree-suggests')?_c('a-tree-select',{staticStyle:{"width":"100%","min-width":"190px"},attrs:{"placeholder":_vm.placeholder,"dropdownStyle":{ maxHeight: '300px', overflow: 'auto' },"treeData":_vm.async ? _vm.asyncTreeData : _vm.treeData,"loadData":(_vm.async && _vm.handleAsyncLoadData) || null,"allowClear":"","multiple":"","value":_vm.value ? _vm.value.split(',') : undefined},on:{"change":function (value) { return _vm.$emit('change', value ? value.join(',') : undefined); }}}):(_vm.schema.control === 'tree-select')?_c('div',[(0)?undefined:_vm._e(),_c('a-tree',{attrs:{"replaceFields":{ title: 'label' },"treeData":_vm.async ? _vm.asyncTreeData : _vm.treeData,"selectedKeys":[_vm.defaultValue],"loadData":(_vm.async && _vm.handleAsyncLoadData) || null,"defaultExpandedKeys":[_vm.treeData[0] && _vm.treeData[0].key]},on:{"select":_vm.handleTreeSelect}})],1):(_vm.schema.control === 'password')?_c("a-input-password",{tag:"component",attrs:{"name":_vm.schema.name,"placeholder":_vm.placeholder,"allowClear":""},on:{"change":function (e) { return _vm.$emit('change', e.target.value); }}}):(_vm.schema.control === 'editor')?_c('Editor',{attrs:{"placeholder":_vm.placeholder,"disabled":_vm.readonly},on:{"change":function (val) { return _vm.$emit('change', val); }},model:{value:(_vm.formModel[_vm.schema.name]),callback:function ($$v) {_vm.$set(_vm.formModel, _vm.schema.name, $$v)},expression:"formModel[schema.name]"}}):(_vm.schema.control === 'verify')?_c('VerificationCode',{attrs:{"placeholder":_vm.placeholder,"url":_vm.schema.params.url,"time":_vm.schema.params.time,"phone":_vm.formModel[_vm.schema.params.phoneName]},on:{"change":function (val) { return _vm.$emit('change', val); }}}):(_vm.schema.control === 'map-marker')?_c('MapMarker',{attrs:{"placeholder":_vm.placeholder,"name":_vm.schema.name,"mapCenter":_vm.schema.params &&
|
|
3869
3921
|
(_vm.schema.params.mapCenter
|
|
3870
3922
|
? JSON.parse(_vm.schema.params.mapCenter)
|
|
3871
3923
|
: _vm.schema.params.control.mapCenter)},on:{"change":function (val) { return _vm.$emit('change', val); },"map":_vm.handleMapComplete},model:{value:(_vm.formModel[_vm.schema.name]),callback:function ($$v) {_vm.$set(_vm.formModel, _vm.schema.name, $$v)},expression:"formModel[schema.name]"}}):(_vm.schema.control === 'map-polygon')?_c('MapPolygon',{attrs:{"placeholder":_vm.placeholder,"name":_vm.schema.name,"mapCenter":_vm.schema.params &&
|
|
3872
3924
|
(_vm.schema.params.mapCenter
|
|
3873
3925
|
? JSON.parse(_vm.schema.params.mapCenter)
|
|
3874
3926
|
: _vm.schema.params.control.mapCenter)},on:{"change":function (val) { return _vm.$emit('change', val); }},model:{value:(_vm.formModel[_vm.schema.name]),callback:function ($$v) {_vm.$set(_vm.formModel, _vm.schema.name, $$v)},expression:"formModel[schema.name]"}}):(_vm.schema.control === 'transfer')?_c('Transfer',{attrs:{"placeholder":_vm.placeholder,"treeUrl":_vm.schema.params.control.url,"titleName":_vm.schema.params.control.displayValue,"keyName":_vm.schema.params.control.realValue},on:{"submit":_vm.handlePickerComplete,"selected":_vm.handlePickerSelected},model:{value:(_vm.formModel[_vm.schema.name]),callback:function ($$v) {_vm.$set(_vm.formModel, _vm.schema.name, $$v)},expression:"formModel[schema.name]"}}):_c(("a-" + _vm.type),{ref:"aInput",tag:"component",attrs:{"defaultValue":_vm.value,"name":_vm.schema.name,"placeholder":_vm.placeholder,"disabled":_vm.readonly,"allowClear":""},on:{"blur":function (e) { return _vm.$emit('change', e.target.value); },"pressEnter":function (e) { return _vm.$emit('change', e.target.value); }}}),(_vm.pickerViewShow)?_c('Popup',{attrs:{"visible":_vm.pickerViewShow,"title":_vm.schema.alias,"type":'modal',"okButtonProps":{ props: { icon: 'check' } },"cancelButtonProps":{ props: { icon: 'close' } }},on:{"ok":_vm.handlePickerComplete,"close":_vm.handlePickerClose,"cancel":_vm.handlePickerClose}},[(_vm.pickerViewShow)?_c('Picker',_vm._b({ref:"picker",attrs:{"viewKey":_vm.schema.name,"params":{ filters: _vm.pickerFilter },"mode":"picker"},on:{"selected":_vm.handlePickerSelected}},'Picker',_vm.pickerViewOptions,false)):_vm._e()],1):_vm._e()],2):_vm._e()}
|
|
3875
|
-
var
|
|
3927
|
+
var Itemvue_type_template_id_4af280fd_staticRenderFns = []
|
|
3876
3928
|
|
|
3877
3929
|
|
|
3878
|
-
// CONCATENATED MODULE: ../src/web/components/forms/Item.vue?vue&type=template&id=
|
|
3930
|
+
// CONCATENATED MODULE: ../src/web/components/forms/Item.vue?vue&type=template&id=4af280fd&
|
|
3879
3931
|
|
|
3880
3932
|
// CONCATENATED MODULE: ../src/core/form/item.js
|
|
3881
3933
|
|
|
@@ -4043,6 +4095,8 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4043
4095
|
return [];
|
|
4044
4096
|
},
|
|
4045
4097
|
treeData: function treeData() {
|
|
4098
|
+
var _this2 = this;
|
|
4099
|
+
|
|
4046
4100
|
if (this.schema.dataType === 'wordbook' && this.schema.typeObject) {
|
|
4047
4101
|
var label = this.schema.typeObject.model.attrs.find(function (item) {
|
|
4048
4102
|
return item.display === 'title';
|
|
@@ -4056,6 +4110,7 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4056
4110
|
label: item[label],
|
|
4057
4111
|
value: item[idName],
|
|
4058
4112
|
key: item[idName],
|
|
4113
|
+
disabled: _this2.schema.params && _this2.schema.params.control.leafCheck && !!item._childList,
|
|
4059
4114
|
children: item._childList ? transform(item._childList) : null
|
|
4060
4115
|
};
|
|
4061
4116
|
});
|
|
@@ -4189,7 +4244,7 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4189
4244
|
initDate: function initDate() {},
|
|
4190
4245
|
reset: function reset() {},
|
|
4191
4246
|
watch: function watch() {
|
|
4192
|
-
var
|
|
4247
|
+
var _this3 = this;
|
|
4193
4248
|
|
|
4194
4249
|
var _this$schema$params = this.schema.params;
|
|
4195
4250
|
_this$schema$params = _this$schema$params === void 0 ? {} : _this$schema$params;
|
|
@@ -4205,27 +4260,27 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4205
4260
|
var values = rule.split('|');
|
|
4206
4261
|
|
|
4207
4262
|
if (values[0] === 'filter') {
|
|
4208
|
-
|
|
4263
|
+
_this3.filterRules.push({
|
|
4209
4264
|
key: keys[1],
|
|
4210
4265
|
value: values[1]
|
|
4211
4266
|
});
|
|
4212
4267
|
} else if (values[0] === 'show') {
|
|
4213
|
-
|
|
4268
|
+
_this3.showRules.push({
|
|
4214
4269
|
key: keys[1],
|
|
4215
4270
|
value: values[1]
|
|
4216
4271
|
});
|
|
4217
4272
|
} else if (values[0] === 'hide') {
|
|
4218
|
-
|
|
4273
|
+
_this3.hideRules.push({
|
|
4219
4274
|
key: keys[1],
|
|
4220
4275
|
value: values[1]
|
|
4221
4276
|
});
|
|
4222
4277
|
} else if (values[0] === 'require') {
|
|
4223
|
-
|
|
4278
|
+
_this3.requireRules.push({
|
|
4224
4279
|
key: keys[1],
|
|
4225
4280
|
value: values[1]
|
|
4226
4281
|
});
|
|
4227
4282
|
} else if (values[0] === 'swift') {
|
|
4228
|
-
|
|
4283
|
+
_this3.swiftRules.push({
|
|
4229
4284
|
key: keys[1],
|
|
4230
4285
|
value: values[1].split('/').map(function (item) {
|
|
4231
4286
|
var items = item.split(':');
|
|
@@ -4245,46 +4300,46 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4245
4300
|
}
|
|
4246
4301
|
|
|
4247
4302
|
this.showRules.forEach(function (show) {
|
|
4248
|
-
|
|
4249
|
-
|
|
4303
|
+
_this3.$watch("formModel.".concat(show.key), function () {
|
|
4304
|
+
_this3.show(show.key, show.value.split(','));
|
|
4250
4305
|
});
|
|
4251
4306
|
|
|
4252
|
-
|
|
4307
|
+
_this3.show(show.key, show.value.split(','));
|
|
4253
4308
|
});
|
|
4254
4309
|
this.hideRules.forEach(function (show) {
|
|
4255
|
-
|
|
4256
|
-
|
|
4310
|
+
_this3.$watch("formModel.".concat(show.key), function () {
|
|
4311
|
+
_this3.hide(show.key, show.value.split(','));
|
|
4257
4312
|
});
|
|
4258
4313
|
|
|
4259
|
-
|
|
4314
|
+
_this3.hide(show.key, show.value.split(','));
|
|
4260
4315
|
});
|
|
4261
4316
|
this.requireRules.forEach(function (show) {
|
|
4262
|
-
|
|
4263
|
-
|
|
4317
|
+
_this3.$watch("formModel.".concat(show.key), function () {
|
|
4318
|
+
_this3.require(show.key, show.value.split(','));
|
|
4264
4319
|
});
|
|
4265
4320
|
|
|
4266
|
-
|
|
4321
|
+
_this3.require(show.key, show.value.split(','));
|
|
4267
4322
|
});
|
|
4268
4323
|
this.filterRules.forEach(function (show) {
|
|
4269
|
-
|
|
4270
|
-
if (
|
|
4324
|
+
_this3.$watch("formModel.".concat(show.key), function () {
|
|
4325
|
+
if (_this3.schema.required && _this3.options.length) {
|
|
4271
4326
|
// 判断值是否属于 options 中的某一项,如果 options 根据其它表单项动态过滤,自动填充表单时,本地存储的值不在 options 中,就会默认选中第一项
|
|
4272
|
-
var
|
|
4273
|
-
return item.value ===
|
|
4327
|
+
var hasValue = _this3.options.find(function (item) {
|
|
4328
|
+
return item.value === _this3.value;
|
|
4274
4329
|
});
|
|
4275
4330
|
|
|
4276
|
-
|
|
4331
|
+
_this3.$emit('change', hasValue && _this3.value || _this3.options[0].value);
|
|
4277
4332
|
} else {
|
|
4278
|
-
|
|
4333
|
+
_this3.$emit('change', '');
|
|
4279
4334
|
}
|
|
4280
4335
|
});
|
|
4281
4336
|
});
|
|
4282
4337
|
this.swiftRules.forEach(function (show) {
|
|
4283
|
-
|
|
4284
|
-
if (
|
|
4285
|
-
|
|
4338
|
+
_this3.$watch("formModel.".concat(show.key), function (value) {
|
|
4339
|
+
if (_this3.schema.required && _this3.options.length && value) {
|
|
4340
|
+
_this3.$emit('change', _this3.options[0].value);
|
|
4286
4341
|
} else {
|
|
4287
|
-
|
|
4342
|
+
_this3.$emit('change', '');
|
|
4288
4343
|
}
|
|
4289
4344
|
});
|
|
4290
4345
|
});
|
|
@@ -4410,29 +4465,29 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4410
4465
|
this.reUpload = true; // this.$emit('change', null)
|
|
4411
4466
|
},
|
|
4412
4467
|
handleAsyncLoadData: function handleAsyncLoadData(node) {
|
|
4413
|
-
var
|
|
4468
|
+
var _this4 = this;
|
|
4414
4469
|
|
|
4415
4470
|
return item_asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
4416
|
-
var
|
|
4471
|
+
var _this4$schema$typeObj, attrs, idName, url, label, _yield$_this4$$api$ge, collection;
|
|
4417
4472
|
|
|
4418
4473
|
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
4419
4474
|
while (1) {
|
|
4420
4475
|
switch (_context.prev = _context.next) {
|
|
4421
4476
|
case 0:
|
|
4422
|
-
|
|
4423
|
-
url =
|
|
4477
|
+
_this4$schema$typeObj = _this4.schema.typeObject.model, attrs = _this4$schema$typeObj.attrs, idName = _this4$schema$typeObj.idName;
|
|
4478
|
+
url = _this4.view.apiURL;
|
|
4424
4479
|
label = attrs.find(function (item) {
|
|
4425
4480
|
return item.display === 'title';
|
|
4426
4481
|
});
|
|
4427
4482
|
label = label.name || idName;
|
|
4428
4483
|
_context.next = 6;
|
|
4429
|
-
return
|
|
4484
|
+
return _this4.$api.get("".concat(url, "/").concat(_this4.schema.name, "?_node=").concat(node.eventKey), {
|
|
4430
4485
|
baseURL: ''
|
|
4431
4486
|
});
|
|
4432
4487
|
|
|
4433
4488
|
case 6:
|
|
4434
|
-
_yield$
|
|
4435
|
-
collection = _yield$
|
|
4489
|
+
_yield$_this4$$api$ge = _context.sent;
|
|
4490
|
+
collection = _yield$_this4$$api$ge.data.collection;
|
|
4436
4491
|
node.dataRef.children = collection.map(function (item) {
|
|
4437
4492
|
return {
|
|
4438
4493
|
label: item[label],
|
|
@@ -4440,7 +4495,7 @@ function item_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
4440
4495
|
key: item[idName]
|
|
4441
4496
|
};
|
|
4442
4497
|
});
|
|
4443
|
-
|
|
4498
|
+
_this4.asyncTreeData = item_toConsumableArray(_this4.asyncTreeData);
|
|
4444
4499
|
return _context.abrupt("return", new Promise(function (resolve) {
|
|
4445
4500
|
return resolve();
|
|
4446
4501
|
}));
|
|
@@ -6470,6 +6525,19 @@ var Popup_component = normalizeComponent(
|
|
|
6470
6525
|
//
|
|
6471
6526
|
//
|
|
6472
6527
|
//
|
|
6528
|
+
//
|
|
6529
|
+
//
|
|
6530
|
+
//
|
|
6531
|
+
//
|
|
6532
|
+
//
|
|
6533
|
+
//
|
|
6534
|
+
//
|
|
6535
|
+
//
|
|
6536
|
+
//
|
|
6537
|
+
//
|
|
6538
|
+
//
|
|
6539
|
+
//
|
|
6540
|
+
//
|
|
6473
6541
|
//
|
|
6474
6542
|
// import Editor from '@/web/components/cell/Editor/Index'
|
|
6475
6543
|
// import Editor from '@/web/components/cell/TinyMCE'
|
|
@@ -6519,8 +6587,8 @@ var Itemvue_type_style_index_0_lang_css_ = __webpack_require__("bb5f");
|
|
|
6519
6587
|
|
|
6520
6588
|
var Item_component = normalizeComponent(
|
|
6521
6589
|
forms_Itemvue_type_script_lang_js_,
|
|
6522
|
-
|
|
6523
|
-
|
|
6590
|
+
Itemvue_type_template_id_4af280fd_render,
|
|
6591
|
+
Itemvue_type_template_id_4af280fd_staticRenderFns,
|
|
6524
6592
|
false,
|
|
6525
6593
|
null,
|
|
6526
6594
|
null,
|