hrsass-components 2.2.6 → 2.2.8

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.
@@ -57,7 +57,7 @@ var _slicedToArray = _interopDefault(require('@babel/runtime/helpers/slicedToArr
57
57
  var resizeDetector = require('resize-detector');
58
58
  var moment = require('moment');
59
59
  var moment__default = _interopDefault(moment);
60
- require('tinymce/tinymce');
60
+ var tinymce = _interopDefault(require('tinymce/tinymce'));
61
61
  var Editor = _interopDefault(require('@tinymce/tinymce-vue'));
62
62
  require('tinymce/skins/ui/oxide/skin.css');
63
63
  var uiStyle = _interopDefault(require('!!raw-loader!tinymce/skins/ui/oxide/content.css'));
@@ -65,7 +65,7 @@ var contentStyle = _interopDefault(require('!!raw-loader!tinymce/skins/content/d
65
65
  var SvgPanZoom = _interopDefault(require('svg-pan-zoom'));
66
66
  var saveSvgAsPng = require('save-svg-as-png');
67
67
 
68
- var version = "2.2.6";
68
+ var version = "2.2.8";
69
69
 
70
70
  /**
71
71
  * 版本号
@@ -4119,7 +4119,8 @@ var HrRichText = {
4119
4119
  },
4120
4120
  data: function data() {
4121
4121
  return {
4122
- content_style: ''
4122
+ content_style: '',
4123
+ reloading: false
4123
4124
  };
4124
4125
  },
4125
4126
  computed: {
@@ -4148,9 +4149,39 @@ var HrRichText = {
4148
4149
  require("tinymce/plugins/emoticons/js/emojis");
4149
4150
  }
4150
4151
  });
4152
+ },
4153
+ reload: function reload() {
4154
+ var _this = this;
4155
+ this.reloading = true;
4156
+ this.$nextTick(function () {
4157
+ _this.reloading = false;
4158
+ });
4159
+ },
4160
+ getVmParentByName: function getVmParentByName(vm, name) {
4161
+ var parent = vm.$parent;
4162
+ if (parent && parent.$options) {
4163
+ if (parent.$options.name === name) {
4164
+ return parent;
4165
+ } else {
4166
+ var res = this.getVmParentByName(parent, name);
4167
+ if (res) {
4168
+ return res;
4169
+ }
4170
+ }
4171
+ }
4172
+ return null;
4173
+ },
4174
+ initATabsChangeAutoReload: function initATabsChangeAutoReload() {
4175
+ var modal = this.getVmParentByName(this, 'ADrawer') || this.getVmParentByName(this, 'AModal') || this.getVmParentByName(this, 'ATabs');
4176
+ if (modal) {
4177
+ this.reload();
4178
+ }
4151
4179
  }
4152
4180
  },
4153
- mounted: function mounted() {},
4181
+ mounted: function mounted() {
4182
+ tinymce.init({});
4183
+ this.initATabsChangeAutoReload();
4184
+ },
4154
4185
  render: function render() {
4155
4186
  var h = arguments[0];
4156
4187
  var props = _objectSpread$8(_objectSpread$8({}, this.$props), {}, {
@@ -4180,12 +4211,18 @@ var HrRichText = {
4180
4211
  });
4181
4212
  }
4182
4213
  } else {
4183
- widget = h("div", {
4184
- "class": "hr-rich-text"
4185
- }, [h(Editor, {
4186
- props: props,
4187
- on: this.$listeners
4188
- })]);
4214
+ if (!this.reloading) {
4215
+ widget = h("div", {
4216
+ "class": "hr-rich-text"
4217
+ }, [h(Editor, {
4218
+ props: props,
4219
+ on: this.$listeners
4220
+ })]);
4221
+ } else {
4222
+ widget = h("div", {
4223
+ "class": "hr-rich-text loading"
4224
+ });
4225
+ }
4189
4226
  }
4190
4227
  return widget;
4191
4228
  }
@@ -12922,7 +12959,8 @@ var HrAddrBookCard = {
12922
12959
  absolute: VuePropTypes.bool,
12923
12960
  bordered: VuePropTypes.bool,
12924
12961
  hoverable: VuePropTypes.bool,
12925
- leftLine: VuePropTypes.bool
12962
+ leftLine: VuePropTypes.bool,
12963
+ sort: VuePropTypes.array
12926
12964
  }, {
12927
12965
  prefixCls: "hr-add-book-card",
12928
12966
  hoverable: true,
@@ -13093,11 +13131,12 @@ var HrAddrBookCard = {
13093
13131
  color: "orange",
13094
13132
  title: sub_status
13095
13133
  }
13096
- }, [sub_status])])]), !data.hide ? h("ul", {
13134
+ }, [sub_status])])]), !data.hide ? this.sortList(h("ul", {
13097
13135
  "class": prefixCls + "-other-info"
13098
13136
  }, [this.isShow("dept_name") && h("li", {
13099
13137
  attrs: {
13100
- title: data.dept_name
13138
+ title: data.dept_name,
13139
+ fieldKey: "dept_name"
13101
13140
  }
13102
13141
  }, [h(antDesignVue.Icon, {
13103
13142
  attrs: {
@@ -13107,7 +13146,8 @@ var HrAddrBookCard = {
13107
13146
  "class": "item-info"
13108
13147
  }, [data.dept_name || "-"])]), this.isShow("mobile_phone_number") && h("li", {
13109
13148
  attrs: {
13110
- title: data.mobile_phone_number
13149
+ title: data.mobile_phone_number,
13150
+ fieldKey: "mobile_phone_number"
13111
13151
  }
13112
13152
  }, [h(antDesignVue.Icon, {
13113
13153
  attrs: {
@@ -13117,7 +13157,8 @@ var HrAddrBookCard = {
13117
13157
  "class": "item-info"
13118
13158
  }, [data.mobile_phone_number || "-"])]), this.isShow("personal_mailbox") && h("li", {
13119
13159
  attrs: {
13120
- title: data.personal_mailbox
13160
+ title: data.personal_mailbox,
13161
+ fieldKey: "personal_mailbox"
13121
13162
  }
13122
13163
  }, [h(antDesignVue.Icon, {
13123
13164
  attrs: {
@@ -13127,7 +13168,8 @@ var HrAddrBookCard = {
13127
13168
  "class": "item-info"
13128
13169
  }, [this.showEmailLink(data.personal_mailbox)])]), this.isShow("company_mailbox") && h("li", {
13129
13170
  attrs: {
13130
- title: data.company_mailbox
13171
+ title: data.company_mailbox,
13172
+ fieldKey: "company_mailbox"
13131
13173
  }
13132
13174
  }, [h(antDesignVue.Icon, {
13133
13175
  attrs: {
@@ -13137,7 +13179,8 @@ var HrAddrBookCard = {
13137
13179
  "class": "item-info"
13138
13180
  }, [this.showEmailLink(data.company_mailbox)])]), this.isShow("qq") && h("li", {
13139
13181
  attrs: {
13140
- title: data.qq
13182
+ title: data.qq,
13183
+ fieldKey: "qq"
13141
13184
  }
13142
13185
  }, [h(antDesignVue.Icon, {
13143
13186
  attrs: {
@@ -13147,7 +13190,8 @@ var HrAddrBookCard = {
13147
13190
  "class": "item-info"
13148
13191
  }, [data.qq || "-"])]), this.isShow("wechat") && h("li", {
13149
13192
  attrs: {
13150
- title: data.wechat
13193
+ title: data.wechat,
13194
+ fieldKey: "wechat"
13151
13195
  }
13152
13196
  }, [h(antDesignVue.Icon, {
13153
13197
  attrs: {
@@ -13157,7 +13201,8 @@ var HrAddrBookCard = {
13157
13201
  "class": "item-info"
13158
13202
  }, [data.wechat || "-"])]), this.isShow("hobbies_interests") && h("li", {
13159
13203
  attrs: {
13160
- title: data.hobbies_interests
13204
+ title: data.hobbies_interests,
13205
+ fieldKey: "hobbies_interests"
13161
13206
  }
13162
13207
  }, [h(antDesignVue.Icon, {
13163
13208
  attrs: {
@@ -13167,7 +13212,8 @@ var HrAddrBookCard = {
13167
13212
  "class": "item-info"
13168
13213
  }, [data.hobbies_interests || "-"])]), this.isShow("political_status") && h("li", {
13169
13214
  attrs: {
13170
- title: data.political_status
13215
+ title: data.political_status,
13216
+ fieldKey: "political_status"
13171
13217
  }
13172
13218
  }, [h(antDesignVue.Icon, {
13173
13219
  attrs: {
@@ -13177,7 +13223,8 @@ var HrAddrBookCard = {
13177
13223
  "class": "item-info"
13178
13224
  }, [data.political_status || "-"])]), this.isShow("work_place") && h("li", {
13179
13225
  attrs: {
13180
- title: data.work_place
13226
+ title: data.work_place,
13227
+ fieldKey: "work_place"
13181
13228
  }
13182
13229
  }, [h(antDesignVue.Icon, {
13183
13230
  attrs: {
@@ -13187,7 +13234,8 @@ var HrAddrBookCard = {
13187
13234
  "class": "item-info"
13188
13235
  }, [data.work_place || "-"])]), this.isShow("highest_education") && h("li", {
13189
13236
  attrs: {
13190
- title: data.highest_education
13237
+ title: data.highest_education,
13238
+ fieldKey: "highest_education"
13191
13239
  }
13192
13240
  }, [h(antDesignVue.Icon, {
13193
13241
  attrs: {
@@ -13207,7 +13255,7 @@ var HrAddrBookCard = {
13207
13255
  attrs: {
13208
13256
  href: "#"
13209
13257
  }
13210
- }, [locale.viewReportRelate])])])]) : h("p", {
13258
+ }, [locale.viewReportRelate])])])])) : h("p", {
13211
13259
  "class": "info-hide"
13212
13260
  }, [locale.infoHidden]), !data.hide && h(antDesignVue.Icon, {
13213
13261
  "class": "arrow",
@@ -13215,13 +13263,38 @@ var HrAddrBookCard = {
13215
13263
  type: "down"
13216
13264
  }
13217
13265
  })])])]);
13266
+ },
13267
+ sortList: function sortList(list) {
13268
+ var _getOptionProps2 = getOptionProps(this),
13269
+ _getOptionProps2$sort = _getOptionProps2.sort,
13270
+ sort = _getOptionProps2$sort === void 0 ? [] : _getOptionProps2$sort;
13271
+ console.log(list, sort);
13272
+ if (sort.length > 0) {
13273
+ list.children.sort(function (a, b) {
13274
+ var _a$data, _b$data;
13275
+ var fieldKeyA = (a === null || a === void 0 || (_a$data = a.data) === null || _a$data === void 0 || (_a$data = _a$data.attrs) === null || _a$data === void 0 ? void 0 : _a$data.fieldKey) || -1;
13276
+ var fieldKeyB = (b === null || b === void 0 || (_b$data = b.data) === null || _b$data === void 0 || (_b$data = _b$data.attrs) === null || _b$data === void 0 ? void 0 : _b$data.fieldKey) || -1;
13277
+ var indexA = sort.indexOf(fieldKeyA);
13278
+ var indexB = sort.indexOf(fieldKeyB);
13279
+ if (indexA === -1 && indexB === -1) {
13280
+ return 0;
13281
+ } else if (indexA === -1) {
13282
+ return 1;
13283
+ } else if (indexB === -1) {
13284
+ return -1;
13285
+ } else {
13286
+ return indexA - indexB;
13287
+ }
13288
+ });
13289
+ }
13290
+ return list;
13218
13291
  }
13219
13292
  },
13220
13293
  render: function render() {
13221
13294
  var h = arguments[0];
13222
- var _getOptionProps2 = getOptionProps(this),
13223
- _getOptionProps2$data = _getOptionProps2.data,
13224
- data = _getOptionProps2$data === void 0 ? {} : _getOptionProps2$data;
13295
+ var _getOptionProps3 = getOptionProps(this),
13296
+ _getOptionProps3$data = _getOptionProps3.data,
13297
+ data = _getOptionProps3$data === void 0 ? {} : _getOptionProps3$data;
13225
13298
  return data.name ? h(HrLocaleReceiver, {
13226
13299
  attrs: {
13227
13300
  componentName: "HrAddrBookCard",