eoss-ui 0.5.61 → 0.5.63
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/button-group.js +147 -129
- package/lib/button.js +14 -8
- package/lib/checkbox-group.js +14 -8
- package/lib/data-table-form.js +14 -8
- package/lib/data-table.js +129 -104
- package/lib/date-picker.js +14 -8
- package/lib/dialog.js +17 -11
- package/lib/eoss-ui.common.js +688 -545
- package/lib/flow-group.js +14 -8
- package/lib/flow-list.js +14 -8
- package/lib/flow.js +17 -11
- package/lib/form.js +14 -8
- package/lib/handle-user.js +14 -8
- package/lib/handler.js +17 -11
- package/lib/icon.js +19 -15
- package/lib/icons.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input-number.js +14 -8
- package/lib/input.js +14 -8
- package/lib/label.js +2 -2
- package/lib/login.js +139 -68
- package/lib/main.js +208 -164
- package/lib/menu.js +2 -2
- package/lib/nav.js +14 -8
- package/lib/page.js +14 -8
- package/lib/player.js +18 -12
- package/lib/qr-code.js +16 -10
- package/lib/radio-group.js +14 -8
- package/lib/retrial-auth.js +14 -8
- package/lib/select-ganged.js +14 -8
- package/lib/select.js +14 -8
- package/lib/selector-panel.js +17 -11
- package/lib/selector.js +18 -23
- package/lib/sizer.js +14 -8
- package/lib/steps.js +14 -8
- package/lib/switch.js +14 -8
- package/lib/table-form.js +14 -8
- package/lib/tabs.js +14 -8
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/card.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +14 -8
- package/lib/toolbar.js +4 -1
- package/lib/tree-group.js +28 -11
- package/lib/tree.js +14 -8
- package/lib/upload.js +17 -11
- package/lib/utils/util.js +14 -8
- package/lib/wujie.js +14 -8
- package/lib/wxlogin.js +14 -8
- package/package.json +3 -2
- package/packages/button-group/src/main.vue +71 -58
- package/packages/data-table/src/main.vue +11 -2
- package/packages/flow/src/main.vue +1 -1
- package/packages/handler/src/main.vue +1 -1
- package/packages/icon/src/main.vue +2 -2
- package/packages/label/src/main.vue +2 -2
- package/packages/login/src/main.vue +63 -35
- package/packages/main/src/main.vue +19 -11
- package/packages/main/src/userinfo.vue +165 -150
- package/packages/menu/src/main.vue +2 -2
- package/packages/selector/src/main.vue +0 -1
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/card.css +1 -1
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/icon.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/card.scss +2 -2
- package/packages/theme-chalk/src/form.scss +5 -3
- package/packages/theme-chalk/src/icon.scss +3 -3
- package/packages/theme-chalk/src/login.scss +6 -0
- package/packages/theme-chalk/src/menu.scss +1 -1
- package/packages/toolbar/src/main.vue +4 -1
- package/packages/tree-group/src/main.vue +12 -1
- package/src/index.js +1 -1
- package/src/utils/util.js +14 -9
package/lib/data-table.js
CHANGED
|
@@ -369,7 +369,7 @@ var ajax = function ajax(_ref) {
|
|
|
369
369
|
error.message = '未授权,请重新登录';
|
|
370
370
|
break;
|
|
371
371
|
case 403:
|
|
372
|
-
error.message = '
|
|
372
|
+
error.message = '服务器错误';
|
|
373
373
|
break;
|
|
374
374
|
case 404:
|
|
375
375
|
error.message = '网络请求不存在';
|
|
@@ -381,7 +381,7 @@ var ajax = function ajax(_ref) {
|
|
|
381
381
|
error.message = '请求超时';
|
|
382
382
|
break;
|
|
383
383
|
case 500:
|
|
384
|
-
error.message = '
|
|
384
|
+
error.message = '服务器错误';
|
|
385
385
|
break;
|
|
386
386
|
case 501:
|
|
387
387
|
error.message = '网络未实现';
|
|
@@ -737,18 +737,23 @@ var dayOfMonth = function dayOfMonth(date) {
|
|
|
737
737
|
* @desc:添加js内容
|
|
738
738
|
* @author huangbo
|
|
739
739
|
* @date 2022年5月7日
|
|
740
|
-
* @param {Function} [
|
|
740
|
+
* @param {Function} [callback] - 函数
|
|
741
741
|
* @param {Number} [wait] - 延迟毫秒数
|
|
742
742
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
743
743
|
**/
|
|
744
744
|
|
|
745
|
-
var debounce = function debounce(callback,
|
|
746
|
-
var timeout =
|
|
745
|
+
var debounce = function debounce(callback, wait) {
|
|
746
|
+
var timeout = void 0;
|
|
747
747
|
return function () {
|
|
748
|
-
|
|
749
|
-
|
|
748
|
+
var context = this;
|
|
749
|
+
var args = arguments;
|
|
750
|
+
if (timeout) clearTimeout(timeout);
|
|
751
|
+
timeout = setTimeout(function () {
|
|
752
|
+
callback.apply(context, args);
|
|
753
|
+
}, wait || 500);
|
|
750
754
|
};
|
|
751
755
|
};
|
|
756
|
+
|
|
752
757
|
/**
|
|
753
758
|
* delUrlParam
|
|
754
759
|
* @desc:删除url指定参数
|
|
@@ -2885,7 +2890,8 @@ var toFunction = function toFunction(str) {
|
|
|
2885
2890
|
* @param {string} [$color] - 颜色值
|
|
2886
2891
|
**/
|
|
2887
2892
|
var updateTheme = function updateTheme(color, send) {
|
|
2888
|
-
color = color ? color : '#409eff';
|
|
2893
|
+
color = color && startWith(color, '#') ? color : '#409eff';
|
|
2894
|
+
|
|
2889
2895
|
if (send === undefined) {
|
|
2890
2896
|
send = true;
|
|
2891
2897
|
}
|
|
@@ -3785,7 +3791,12 @@ module.exports = require("vue");
|
|
|
3785
3791
|
/* 16 */,
|
|
3786
3792
|
/* 17 */,
|
|
3787
3793
|
/* 18 */,
|
|
3788
|
-
/* 19
|
|
3794
|
+
/* 19 */
|
|
3795
|
+
/***/ (function(module, exports) {
|
|
3796
|
+
|
|
3797
|
+
module.exports = require("throttle-debounce");
|
|
3798
|
+
|
|
3799
|
+
/***/ }),
|
|
3789
3800
|
/* 20 */,
|
|
3790
3801
|
/* 21 */,
|
|
3791
3802
|
/* 22 */,
|
|
@@ -3805,8 +3816,8 @@ module.exports = require("vue");
|
|
|
3805
3816
|
// ESM COMPAT FLAG
|
|
3806
3817
|
__webpack_require__.r(__webpack_exports__);
|
|
3807
3818
|
|
|
3808
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=
|
|
3809
|
-
var
|
|
3819
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=c40e40b8&
|
|
3820
|
+
var mainvue_type_template_id_c40e40b8_render = function () {
|
|
3810
3821
|
var _vm = this
|
|
3811
3822
|
var _h = _vm.$createElement
|
|
3812
3823
|
var _c = _vm._self._c || _h
|
|
@@ -3837,7 +3848,7 @@ var mainvue_type_template_id_6d62957e_render = function () {
|
|
|
3837
3848
|
"es-toolbar",
|
|
3838
3849
|
_vm._g(
|
|
3839
3850
|
_vm._b(
|
|
3840
|
-
{},
|
|
3851
|
+
{ ref: "toolbar" },
|
|
3841
3852
|
"es-toolbar",
|
|
3842
3853
|
{
|
|
3843
3854
|
contents: _vm.toolbars,
|
|
@@ -4075,14 +4086,17 @@ var mainvue_type_template_id_6d62957e_render = function () {
|
|
|
4075
4086
|
)
|
|
4076
4087
|
}
|
|
4077
4088
|
var staticRenderFns = []
|
|
4078
|
-
|
|
4089
|
+
mainvue_type_template_id_c40e40b8_render._withStripped = true
|
|
4079
4090
|
|
|
4080
4091
|
|
|
4081
|
-
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=
|
|
4092
|
+
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=c40e40b8&
|
|
4082
4093
|
|
|
4083
4094
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
4084
4095
|
var api = __webpack_require__(1);
|
|
4085
4096
|
|
|
4097
|
+
// EXTERNAL MODULE: external "throttle-debounce"
|
|
4098
|
+
var external_throttle_debounce_ = __webpack_require__(19);
|
|
4099
|
+
|
|
4086
4100
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
|
|
4087
4101
|
var childrenvue_type_template_id_29bcbc72_render = function () {
|
|
4088
4102
|
var _vm = this
|
|
@@ -6187,6 +6201,8 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6187
6201
|
//
|
|
6188
6202
|
//
|
|
6189
6203
|
//
|
|
6204
|
+
//
|
|
6205
|
+
|
|
6190
6206
|
|
|
6191
6207
|
|
|
6192
6208
|
|
|
@@ -6637,7 +6653,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6637
6653
|
param: {
|
|
6638
6654
|
deep: true,
|
|
6639
6655
|
handler: function handler(val) {
|
|
6640
|
-
this.getTableData();
|
|
6656
|
+
this.getTableData(112);
|
|
6641
6657
|
}
|
|
6642
6658
|
}
|
|
6643
6659
|
}, _watch['page'] = {
|
|
@@ -6679,6 +6695,11 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6679
6695
|
}
|
|
6680
6696
|
}, _watch),
|
|
6681
6697
|
created: function created() {
|
|
6698
|
+
var _this2 = this;
|
|
6699
|
+
|
|
6700
|
+
this.getTableData = Object(external_throttle_debounce_["debounce"])(300, function (res) {
|
|
6701
|
+
_this2.getTableDatas(res);
|
|
6702
|
+
});
|
|
6682
6703
|
if (Array.isArray(this.thead) && this.thead.length) {
|
|
6683
6704
|
this.getOptions(this.thead);
|
|
6684
6705
|
}
|
|
@@ -6700,55 +6721,55 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6700
6721
|
return [method, url, external_qs_default.a.stringify(params), external_qs_default.a.stringify(data)].join('&');
|
|
6701
6722
|
},
|
|
6702
6723
|
getOptions: function getOptions(res) {
|
|
6703
|
-
var
|
|
6724
|
+
var _this3 = this;
|
|
6704
6725
|
|
|
6705
6726
|
var sysCodes = [];
|
|
6706
6727
|
res.forEach(function (item) {
|
|
6707
6728
|
if (item.sysCode || item.url) {
|
|
6708
6729
|
item.sysCode && sysCodes.push(item.sysCode);
|
|
6709
6730
|
var params = util["a" /* default */].extend({}, item.sysCode ? { sysAppCode: item.sysCode, code: item.sysCode } : {}, item.param ? item.param : {});
|
|
6710
|
-
var key =
|
|
6711
|
-
method:
|
|
6712
|
-
url: item.sysCode ?
|
|
6731
|
+
var key = _this3.getRequestKey({
|
|
6732
|
+
method: _this3.method,
|
|
6733
|
+
url: item.sysCode ? _this3.findCode : item.url,
|
|
6713
6734
|
params: params,
|
|
6714
6735
|
data: {}
|
|
6715
6736
|
});
|
|
6716
|
-
if (!
|
|
6737
|
+
if (!_this3.requests.includes(key)) {
|
|
6717
6738
|
util["a" /* default */].ajax({
|
|
6718
|
-
url: item.sysCode ?
|
|
6719
|
-
method:
|
|
6739
|
+
url: item.sysCode ? _this3.findCode : item.url,
|
|
6740
|
+
method: _this3.method,
|
|
6720
6741
|
params: params,
|
|
6721
6742
|
data: params
|
|
6722
6743
|
}).then(function (res) {
|
|
6723
6744
|
if (res.rCode === 0) {
|
|
6724
6745
|
if (item.type == 'ganged') {
|
|
6725
|
-
|
|
6746
|
+
_this3.$set(_this3.options, item.sysCode || item.field || item.prop, [JSON.parse(JSON.stringify(res.results))]);
|
|
6726
6747
|
if (item.sysCode) {
|
|
6727
|
-
bus["a" /* default */].$emit(item.sysCode, JSON.parse(JSON.stringify(
|
|
6748
|
+
bus["a" /* default */].$emit(item.sysCode, JSON.parse(JSON.stringify(_this3.options[item.sysCode])));
|
|
6728
6749
|
}
|
|
6729
6750
|
} else {
|
|
6730
|
-
|
|
6751
|
+
_this3.$set(_this3.options, item.sysCode || item.field || item.prop, JSON.parse(JSON.stringify(res.results)));
|
|
6731
6752
|
if (item.sysCode) {
|
|
6732
6753
|
bus["a" /* default */].$emit(item.sysCode, JSON.parse(JSON.stringify(res.results)));
|
|
6733
6754
|
}
|
|
6734
6755
|
}
|
|
6735
|
-
|
|
6756
|
+
_this3.requests.push(key);
|
|
6736
6757
|
} else {
|
|
6737
6758
|
var msg = res.msg || '系统错误,请联系管理员!';
|
|
6738
|
-
|
|
6759
|
+
_this3.$message.error(msg);
|
|
6739
6760
|
}
|
|
6740
6761
|
}).catch(function (err) {
|
|
6741
6762
|
if (err.message && err.message !== 'canceled') {
|
|
6742
|
-
|
|
6763
|
+
_this3.$message.error(err.message);
|
|
6743
6764
|
}
|
|
6744
6765
|
});
|
|
6745
6766
|
}
|
|
6746
6767
|
} else {
|
|
6747
6768
|
if (item.childHead && item.childHead.length) {
|
|
6748
|
-
|
|
6769
|
+
_this3.getOptions(item.childHead);
|
|
6749
6770
|
}
|
|
6750
6771
|
if (item.children && item.children.length) {
|
|
6751
|
-
|
|
6772
|
+
_this3.getOptions(item.children);
|
|
6752
6773
|
}
|
|
6753
6774
|
}
|
|
6754
6775
|
});
|
|
@@ -6760,7 +6781,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6760
6781
|
return util["a" /* default */].getObjectType(item) === 'object';
|
|
6761
6782
|
},
|
|
6762
6783
|
chekOpenTotalArea: function chekOpenTotalArea() {
|
|
6763
|
-
var
|
|
6784
|
+
var _this4 = this;
|
|
6764
6785
|
|
|
6765
6786
|
if (this.total || this.showSummary) {
|
|
6766
6787
|
this.showTotal = true;
|
|
@@ -6769,7 +6790,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6769
6790
|
var arr = JSON.parse(JSON.stringify(this.theads));
|
|
6770
6791
|
arr.forEach(function (item) {
|
|
6771
6792
|
if (item.total) {
|
|
6772
|
-
|
|
6793
|
+
_this4.showTotal = true;
|
|
6773
6794
|
}
|
|
6774
6795
|
});
|
|
6775
6796
|
},
|
|
@@ -6816,13 +6837,13 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6816
6837
|
}
|
|
6817
6838
|
},
|
|
6818
6839
|
getRow: function getRow(thead, obj) {
|
|
6819
|
-
var
|
|
6840
|
+
var _this5 = this;
|
|
6820
6841
|
|
|
6821
6842
|
thead.forEach(function (item) {
|
|
6822
6843
|
if (item.field) {
|
|
6823
6844
|
obj[item['field']] = item.defaultValue || '';
|
|
6824
6845
|
} else if (item.children && item.children.length) {
|
|
6825
|
-
|
|
6846
|
+
_this5.getRow(item.children, obj);
|
|
6826
6847
|
}
|
|
6827
6848
|
});
|
|
6828
6849
|
},
|
|
@@ -6849,27 +6870,27 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6849
6870
|
});
|
|
6850
6871
|
},
|
|
6851
6872
|
checkSelect: function checkSelect(newVal) {
|
|
6852
|
-
var
|
|
6873
|
+
var _this6 = this;
|
|
6853
6874
|
|
|
6854
6875
|
this.$nextTick(function () {
|
|
6855
6876
|
if (util["a" /* default */].getObjectType(newVal) === 'array') {
|
|
6856
6877
|
newVal.forEach(function (row) {
|
|
6857
6878
|
if (util["a" /* default */].isObject(row)) {
|
|
6858
|
-
|
|
6859
|
-
} else
|
|
6860
|
-
if (item[
|
|
6861
|
-
|
|
6879
|
+
_this6.$refs.oaTable.toggleRowSelection(row, true);
|
|
6880
|
+
} else _this6.datas.forEach(function (item) {
|
|
6881
|
+
if (item[_this6.checkedKey] === row) {
|
|
6882
|
+
_this6.$refs.oaTable.toggleRowSelection(item, true);
|
|
6862
6883
|
return;
|
|
6863
6884
|
}
|
|
6864
6885
|
});
|
|
6865
6886
|
});
|
|
6866
6887
|
} else if (newVal === true) {
|
|
6867
|
-
|
|
6888
|
+
_this6.toggleAllSelection();
|
|
6868
6889
|
}
|
|
6869
6890
|
});
|
|
6870
6891
|
},
|
|
6871
6892
|
getTheads: function getTheads() {
|
|
6872
|
-
var
|
|
6893
|
+
var _this7 = this;
|
|
6873
6894
|
|
|
6874
6895
|
util["a" /* default */].ajax({
|
|
6875
6896
|
url: this.thead,
|
|
@@ -6881,27 +6902,27 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6881
6902
|
if (res.rCode === 0) {
|
|
6882
6903
|
var results = res.results;
|
|
6883
6904
|
if (Array.isArray(results)) {
|
|
6884
|
-
|
|
6905
|
+
_this7.theadData = results;
|
|
6885
6906
|
} else {
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6907
|
+
_this7.theadData = results.theadData || [];
|
|
6908
|
+
_this7.list = results.data || results.records || [];
|
|
6909
|
+
_this7.config.totalCount = results.count || results.total || results.totalCount;
|
|
6910
|
+
_this7.getOptions(_this7.theadData);
|
|
6890
6911
|
}
|
|
6891
6912
|
} else {
|
|
6892
|
-
|
|
6913
|
+
_this7.theadData = [];
|
|
6893
6914
|
var msg = res.msg || '系统错误,请联系管理员!';
|
|
6894
|
-
|
|
6915
|
+
_this7.$message.error(msg);
|
|
6895
6916
|
}
|
|
6896
|
-
|
|
6917
|
+
_this7.$emit('success', res);
|
|
6897
6918
|
}).catch(function (err) {
|
|
6898
6919
|
if (err.message && err.message !== 'canceled') {
|
|
6899
|
-
|
|
6920
|
+
_this7.$message.error(err.message);
|
|
6900
6921
|
}
|
|
6901
6922
|
});
|
|
6902
6923
|
},
|
|
6903
|
-
|
|
6904
|
-
var
|
|
6924
|
+
getTableDatas: function getTableDatas(res) {
|
|
6925
|
+
var _this8 = this;
|
|
6905
6926
|
|
|
6906
6927
|
var where = void 0;
|
|
6907
6928
|
var first = void 0;
|
|
@@ -6941,36 +6962,36 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6941
6962
|
params: reqData,
|
|
6942
6963
|
data: reqData
|
|
6943
6964
|
})).then(function (res) {
|
|
6944
|
-
|
|
6965
|
+
_this8.tableLoading = false;
|
|
6945
6966
|
if (res.rCode === 0 || res.status === 'success') {
|
|
6946
|
-
var results =
|
|
6947
|
-
if (
|
|
6948
|
-
|
|
6949
|
-
|
|
6967
|
+
var results = _this8.parseData !== undefined ? _this8.parseData(res.results || res.data || res) : res.results || res.data;
|
|
6968
|
+
if (_this8.infiniteScroll) {
|
|
6969
|
+
_this8.list = _this8.list.concat(results.data || results.records || results.list);
|
|
6970
|
+
_this8.config.pageNum += 1;
|
|
6950
6971
|
} else {
|
|
6951
|
-
|
|
6952
|
-
|
|
6972
|
+
_this8.list = results.data || results.records || results.list || [];
|
|
6973
|
+
_this8.$refs.oaTable && _this8.$refs.oaTable.resetScroll && _this8.$refs.oaTable.resetScroll(0, 0);
|
|
6953
6974
|
}
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6975
|
+
_this8.config.totalCount = results.count || results.total || results.totalCount;
|
|
6976
|
+
_this8.checked && _this8.$nextTick(function () {
|
|
6977
|
+
_this8.checkSelect(_this8.checked);
|
|
6957
6978
|
});
|
|
6958
|
-
if (
|
|
6959
|
-
|
|
6979
|
+
if (_this8.infiniteScroll && _this8.config.totalCount === _this8.list.length) {
|
|
6980
|
+
_this8.infiniteDisabled = true;
|
|
6960
6981
|
}
|
|
6961
6982
|
} else {
|
|
6962
|
-
|
|
6983
|
+
_this8.list = [];
|
|
6963
6984
|
//this.tableHeight = false;
|
|
6964
6985
|
var msg = res.msg || '系统错误,请联系管理员!';
|
|
6965
|
-
|
|
6986
|
+
_this8.$message.error(msg);
|
|
6966
6987
|
}
|
|
6967
|
-
|
|
6988
|
+
_this8.$emit('success', res);
|
|
6968
6989
|
}).catch(function (err) {
|
|
6969
6990
|
//this.tableHeight = false;
|
|
6970
6991
|
if (err.message && err.message !== 'canceled') {
|
|
6971
|
-
|
|
6992
|
+
_this8.$message.error(err.message);
|
|
6972
6993
|
}
|
|
6973
|
-
|
|
6994
|
+
_this8.tableLoading = false;
|
|
6974
6995
|
});
|
|
6975
6996
|
},
|
|
6976
6997
|
selectionChange: function selectionChange(data) {
|
|
@@ -7000,6 +7021,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7000
7021
|
},
|
|
7001
7022
|
doLayout: function doLayout() {
|
|
7002
7023
|
this.$refs.oaTable.doLayout();
|
|
7024
|
+
this.$refs.oaTable.updateScroll();
|
|
7003
7025
|
},
|
|
7004
7026
|
sort: function sort(prop, order) {
|
|
7005
7027
|
this.$refs.oaTable.sort(prop, order);
|
|
@@ -7015,7 +7037,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7015
7037
|
this.$emit('change', data, this.datas);
|
|
7016
7038
|
},
|
|
7017
7039
|
handleAjax: function handleAjax(handle, row) {
|
|
7018
|
-
var
|
|
7040
|
+
var _this9 = this;
|
|
7019
7041
|
|
|
7020
7042
|
this.changeLoading(true, handle.text + '\u4E2D...');
|
|
7021
7043
|
var params = handle.param || {};
|
|
@@ -7071,9 +7093,9 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7071
7093
|
method: handle.method,
|
|
7072
7094
|
format: handle.format
|
|
7073
7095
|
})).then(function (res) {
|
|
7074
|
-
|
|
7096
|
+
_this9.changeLoading(false);
|
|
7075
7097
|
if (res.rCode === 0) {
|
|
7076
|
-
|
|
7098
|
+
_this9.$message({
|
|
7077
7099
|
message: handle.text + '\u6210\u529F',
|
|
7078
7100
|
duration: 2000,
|
|
7079
7101
|
type: 'success',
|
|
@@ -7081,17 +7103,17 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7081
7103
|
var first = Object.prototype.hasOwnProperty.call(handle, 'first') ? handle.first : false;
|
|
7082
7104
|
var reload = handle.reload || true;
|
|
7083
7105
|
if (reload) {
|
|
7084
|
-
|
|
7106
|
+
_this9.reload({}, first);
|
|
7085
7107
|
}
|
|
7086
7108
|
}
|
|
7087
7109
|
});
|
|
7088
7110
|
} else {
|
|
7089
|
-
|
|
7111
|
+
_this9.$message.error(res.msg || handle.text + '\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01');
|
|
7090
7112
|
}
|
|
7091
7113
|
}).catch(function (err) {
|
|
7092
|
-
|
|
7114
|
+
_this9.changeLoading(false);
|
|
7093
7115
|
if (err.message && err.message !== 'canceled') {
|
|
7094
|
-
|
|
7116
|
+
_this9.$message.error(err.message);
|
|
7095
7117
|
}
|
|
7096
7118
|
});
|
|
7097
7119
|
},
|
|
@@ -7116,7 +7138,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7116
7138
|
return mainvue_type_script_lang_js_extends({}, obj, item);
|
|
7117
7139
|
},
|
|
7118
7140
|
handleClick: function handleClick(res) {
|
|
7119
|
-
var
|
|
7141
|
+
var _this10 = this;
|
|
7120
7142
|
|
|
7121
7143
|
var row = res.row,
|
|
7122
7144
|
handle = res.handle;
|
|
@@ -7152,7 +7174,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7152
7174
|
cancelButtonText: '取消',
|
|
7153
7175
|
type: 'warning'
|
|
7154
7176
|
}).then(function () {
|
|
7155
|
-
|
|
7177
|
+
_this10.handleAjax(handle, rows);
|
|
7156
7178
|
}).catch(function () {});
|
|
7157
7179
|
} else {
|
|
7158
7180
|
this.handleAjax(handle, rows);
|
|
@@ -7240,7 +7262,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7240
7262
|
var type = ['selection', 'index', 'expand'];
|
|
7241
7263
|
thead = thead.map(function (item) {
|
|
7242
7264
|
return item.filter(function (ele) {
|
|
7243
|
-
return !type.includes(ele.type) && ele.label !== text && !
|
|
7265
|
+
return !type.includes(ele.type) && ele.label !== text && !_this10.exportExcludeLabel.includes(ele.label);
|
|
7244
7266
|
});
|
|
7245
7267
|
});
|
|
7246
7268
|
util["a" /* default */].exportXls({
|
|
@@ -7339,40 +7361,40 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7339
7361
|
}
|
|
7340
7362
|
},
|
|
7341
7363
|
resetHeight: function resetHeight(warn) {
|
|
7342
|
-
var
|
|
7364
|
+
var _this11 = this;
|
|
7343
7365
|
|
|
7344
7366
|
this.$nextTick(function () {
|
|
7345
|
-
if (
|
|
7346
|
-
var height =
|
|
7367
|
+
if (_this11.full && !_this11.height && !_this11.maxHeight) {
|
|
7368
|
+
var height = _this11.$el.parentNode.offsetHeight;
|
|
7347
7369
|
if (height) {
|
|
7348
|
-
height = parseInt(util["a" /* default */].getStyle(
|
|
7349
|
-
height = (height == NaN ? 0 : height) - parseInt(util["a" /* default */].getStyle(
|
|
7350
|
-
for (var i = 0; i <
|
|
7351
|
-
var ele =
|
|
7352
|
-
if (ele !==
|
|
7370
|
+
height = parseInt(util["a" /* default */].getStyle(_this11.$el.parentNode, 'height', '%'), 10);
|
|
7371
|
+
height = (height == NaN ? 0 : height) - parseInt(util["a" /* default */].getStyle(_this11.$el.parentNode, 'padding-top'), 10) - parseInt(util["a" /* default */].getStyle(_this11.$el.parentNode, 'padding-bottom'), 10);
|
|
7372
|
+
for (var i = 0; i < _this11.$el.parentNode.childNodes.length; i++) {
|
|
7373
|
+
var ele = _this11.$el.parentNode.childNodes[i];
|
|
7374
|
+
if (ele !== _this11.$el && ele.offsetHeight !== undefined) {
|
|
7353
7375
|
height = height - ele.offsetHeight - parseInt(util["a" /* default */].getStyle(ele, 'margin-top'), 10) - parseInt(util["a" /* default */].getStyle(ele, 'margin-bottom'), 10);
|
|
7354
7376
|
}
|
|
7355
7377
|
}
|
|
7356
|
-
height -=
|
|
7357
|
-
height -=
|
|
7358
|
-
height -=
|
|
7359
|
-
height -= parseInt(util["a" /* default */].getStyle(
|
|
7360
|
-
height -= parseInt(util["a" /* default */].getStyle(
|
|
7361
|
-
var emptyText =
|
|
7378
|
+
height -= _this11.showToolbar ? 45 : 0;
|
|
7379
|
+
height -= _this11.page === false ? 0 : 46;
|
|
7380
|
+
height -= _this11.title ? _this11.$refs.title.offsetHeight : 0;
|
|
7381
|
+
height -= parseInt(util["a" /* default */].getStyle(_this11.$refs.esTableContent, 'padding-top'), 10);
|
|
7382
|
+
height -= parseInt(util["a" /* default */].getStyle(_this11.$refs.esTableContent, 'padding-bottom'), 10);
|
|
7383
|
+
var emptyText = _this11.$refs.esTableContent.querySelector('.el-table__empty-text');
|
|
7362
7384
|
var eht = 0;
|
|
7363
7385
|
if (emptyText) {
|
|
7364
7386
|
eht = emptyText.offsetHeight;
|
|
7365
|
-
var thead =
|
|
7387
|
+
var thead = _this11.$refs.esTableContent.querySelector('.el-table__header');
|
|
7366
7388
|
thead && (eht += thead.offsetHeight);
|
|
7367
7389
|
}
|
|
7368
7390
|
if (height > 1 && height - eht > 1) {
|
|
7369
|
-
|
|
7391
|
+
_this11.tableHeight = height;
|
|
7370
7392
|
} else {
|
|
7371
|
-
console.warn(
|
|
7393
|
+
console.warn(_this11.$el.parentNode, '\u83B7\u53D6\u4E0D\u5230\u9AD8\u5EA6\uFF01');
|
|
7372
7394
|
}
|
|
7373
7395
|
} else if (!warn) {
|
|
7374
7396
|
setTimeout(function () {
|
|
7375
|
-
|
|
7397
|
+
_this11.resetHeight(true);
|
|
7376
7398
|
}, 1000);
|
|
7377
7399
|
}
|
|
7378
7400
|
}
|
|
@@ -7402,32 +7424,35 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7402
7424
|
this.$emit('sort-change', res);
|
|
7403
7425
|
},
|
|
7404
7426
|
mergeThead: function mergeThead(res) {
|
|
7405
|
-
var
|
|
7427
|
+
var _this12 = this;
|
|
7406
7428
|
|
|
7407
7429
|
this.theadData = res;
|
|
7408
7430
|
this.icon = true;
|
|
7409
7431
|
setTimeout(function () {
|
|
7410
|
-
|
|
7432
|
+
_this12.show = true;
|
|
7411
7433
|
}, 100);
|
|
7412
7434
|
},
|
|
7413
7435
|
setOptions: function setOptions(val, sysCode) {
|
|
7414
7436
|
this.$set(this.options, sysCode, val);
|
|
7415
7437
|
},
|
|
7416
7438
|
bindEventBus: function bindEventBus() {
|
|
7417
|
-
var
|
|
7439
|
+
var _this13 = this;
|
|
7418
7440
|
|
|
7419
7441
|
this.sysCodes.forEach(function (item) {
|
|
7420
7442
|
bus["a" /* default */].$on(item, function (val) {
|
|
7421
|
-
|
|
7443
|
+
_this13.setOptions(val, item);
|
|
7422
7444
|
});
|
|
7423
7445
|
});
|
|
7424
7446
|
},
|
|
7425
7447
|
unbindEventBus: function unbindEventBus() {
|
|
7426
|
-
var
|
|
7448
|
+
var _this14 = this;
|
|
7427
7449
|
|
|
7428
7450
|
this.sysCodes.forEach(function (item) {
|
|
7429
|
-
bus["a" /* default */].$off(item,
|
|
7451
|
+
bus["a" /* default */].$off(item, _this14.setOptions);
|
|
7430
7452
|
});
|
|
7453
|
+
},
|
|
7454
|
+
reset: function reset() {
|
|
7455
|
+
this.$refs.toolbar && this.$refs.toolbar.reset();
|
|
7431
7456
|
}
|
|
7432
7457
|
}
|
|
7433
7458
|
});
|
|
@@ -7443,7 +7468,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7443
7468
|
|
|
7444
7469
|
var main_component = Object(componentNormalizer["a" /* default */])(
|
|
7445
7470
|
src_mainvue_type_script_lang_js_,
|
|
7446
|
-
|
|
7471
|
+
mainvue_type_template_id_c40e40b8_render,
|
|
7447
7472
|
staticRenderFns,
|
|
7448
7473
|
false,
|
|
7449
7474
|
null,
|
package/lib/date-picker.js
CHANGED
|
@@ -370,7 +370,7 @@ var ajax = function ajax(_ref) {
|
|
|
370
370
|
error.message = '未授权,请重新登录';
|
|
371
371
|
break;
|
|
372
372
|
case 403:
|
|
373
|
-
error.message = '
|
|
373
|
+
error.message = '服务器错误';
|
|
374
374
|
break;
|
|
375
375
|
case 404:
|
|
376
376
|
error.message = '网络请求不存在';
|
|
@@ -382,7 +382,7 @@ var ajax = function ajax(_ref) {
|
|
|
382
382
|
error.message = '请求超时';
|
|
383
383
|
break;
|
|
384
384
|
case 500:
|
|
385
|
-
error.message = '
|
|
385
|
+
error.message = '服务器错误';
|
|
386
386
|
break;
|
|
387
387
|
case 501:
|
|
388
388
|
error.message = '网络未实现';
|
|
@@ -738,18 +738,23 @@ var dayOfMonth = function dayOfMonth(date) {
|
|
|
738
738
|
* @desc:添加js内容
|
|
739
739
|
* @author huangbo
|
|
740
740
|
* @date 2022年5月7日
|
|
741
|
-
* @param {Function} [
|
|
741
|
+
* @param {Function} [callback] - 函数
|
|
742
742
|
* @param {Number} [wait] - 延迟毫秒数
|
|
743
743
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
744
744
|
**/
|
|
745
745
|
|
|
746
|
-
var debounce = function debounce(callback,
|
|
747
|
-
var timeout =
|
|
746
|
+
var debounce = function debounce(callback, wait) {
|
|
747
|
+
var timeout = void 0;
|
|
748
748
|
return function () {
|
|
749
|
-
|
|
750
|
-
|
|
749
|
+
var context = this;
|
|
750
|
+
var args = arguments;
|
|
751
|
+
if (timeout) clearTimeout(timeout);
|
|
752
|
+
timeout = setTimeout(function () {
|
|
753
|
+
callback.apply(context, args);
|
|
754
|
+
}, wait || 500);
|
|
751
755
|
};
|
|
752
756
|
};
|
|
757
|
+
|
|
753
758
|
/**
|
|
754
759
|
* delUrlParam
|
|
755
760
|
* @desc:删除url指定参数
|
|
@@ -2886,7 +2891,8 @@ var toFunction = function toFunction(str) {
|
|
|
2886
2891
|
* @param {string} [$color] - 颜色值
|
|
2887
2892
|
**/
|
|
2888
2893
|
var updateTheme = function updateTheme(color, send) {
|
|
2889
|
-
color = color ? color : '#409eff';
|
|
2894
|
+
color = color && startWith(color, '#') ? color : '#409eff';
|
|
2895
|
+
|
|
2890
2896
|
if (send === undefined) {
|
|
2891
2897
|
send = true;
|
|
2892
2898
|
}
|