cnhis-design-vue 0.1.88-beta → 0.1.92-beta

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.
Files changed (50) hide show
  1. package/es/age/index.js +2 -2
  2. package/es/big-table/index.js +51 -45
  3. package/es/big-table/style.css +1 -1
  4. package/es/button/index.js +2 -2
  5. package/es/captcha/index.js +3 -3
  6. package/es/checkbox/index.js +1 -1
  7. package/es/color-picker/index.js +1 -1
  8. package/es/drag-layout/index.js +3 -3
  9. package/es/editor/index.js +24 -24
  10. package/es/editor/style.css +1 -1
  11. package/es/fabric-chart/index.js +9 -9
  12. package/es/index/index.js +394 -371
  13. package/es/index/style.css +1 -1
  14. package/es/input/index.js +1 -1
  15. package/es/map/index.js +1 -1
  16. package/es/multi-chat/index.js +138 -128
  17. package/es/multi-chat/style.css +1 -1
  18. package/es/multi-chat-client/index.js +103 -93
  19. package/es/multi-chat-client/style.css +1 -1
  20. package/es/multi-chat-history/index.js +4 -4
  21. package/es/multi-chat-record/index.js +4 -4
  22. package/es/multi-chat-setting/index.js +29 -22
  23. package/es/multi-chat-sip/index.js +1 -1
  24. package/es/radio/index.js +1 -1
  25. package/es/scale-view/index.js +45 -45
  26. package/es/scale-view/style.css +1 -1
  27. package/es/select/index.js +3 -3
  28. package/es/select-label/index.js +2 -2
  29. package/es/select-person/index.js +2 -2
  30. package/es/table-filter/index.js +85 -78
  31. package/es/table-filter/style.css +1 -1
  32. package/es/tag/index.js +1 -1
  33. package/es/utils/utils-map.js +3 -1
  34. package/es/verification-code/index.js +2 -2
  35. package/package.json +1 -1
  36. package/packages/big-table/src/BigTable.vue +4 -2
  37. package/packages/editor/src/Editor.vue +1 -1
  38. package/packages/multi-chat/chat/chatHeader.vue +2 -2
  39. package/packages/multi-chat/chat/index.vue +3 -3
  40. package/packages/multi-chat/chat/scrollList.vue +31 -31
  41. package/packages/multi-chat/components/chat-tabs-header.vue +1 -1
  42. package/packages/multi-chat/components/user-status.vue +123 -56
  43. package/packages/multi-chat/store/getters.js +3 -0
  44. package/packages/multi-chat/store/mutation.js +4 -1
  45. package/packages/multi-chat/store/state.js +2 -1
  46. package/packages/scale-view/scaleView.vue +1 -1
  47. package/packages/table-filter/src/classification/Classification-com.vue +1 -1
  48. package/packages/table-filter/src/components/multi-select/multi-select.vue +1 -1
  49. package/packages/table-filter/src/quick-search/QuickSearch.vue +11 -4
  50. package/src/utils/utils-map.js +6 -6
@@ -1,58 +1,89 @@
1
1
  <template>
2
- <a-dropdown
3
- :placement="type === 'right-top' ? 'bottomCenter' : 'topLeft'"
4
- :getPopupContainer="
5
- triggerNode => {
6
- return triggerNode.parentNode || document.body;
7
- }
8
- "
9
- >
10
- <a-button v-if="type === 'right-top'">
11
- <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
12
- <img v-else :src="getImg(status)" height="16" />
13
- {{ statusDesc }}
14
- <a-icon type="down" />
15
- </a-button>
16
- <div v-else class="status-btn">
17
- <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
18
- <img v-else :src="getImg(status)" height="16" />
19
- {{ statusDesc }}
20
- <a-icon type="right" />
21
- </div>
22
- <a-menu slot="overlay">
23
- <a-menu-item v-for="{ title, status, description, icon } in statusList" :key="status" @click="handleStatusChange(status)">
24
- <template v-if="description">
25
- <a-tooltip placement="right">
26
- <template slot="title">
27
- <span>{{ description }}</span>
28
- </template>
29
- <a>
2
+ <div>
3
+ <a-dropdown
4
+ v-if="type === 'right-top'"
5
+ placement="bottomCenter"
6
+ :getPopupContainer="
7
+ triggerNode => {
8
+ return triggerNode.parentNode || document.body;
9
+ }
10
+ "
11
+ >
12
+ <a-button>
13
+ <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
14
+ <img v-else :src="getImg(status)" height="16" />
15
+ {{ statusDesc }}
16
+ <a-icon type="down" />
17
+ </a-button>
18
+ <a-menu slot="overlay">
19
+ <a-menu-item v-for="{ title, status, description, icon } in statusList" :key="status" @click="handleStatusChange(status)">
20
+ <template v-if="description">
21
+ <a-tooltip placement="right">
22
+ <template slot="title">
23
+ <span>{{ description }}</span>
24
+ </template>
25
+ <a>
26
+ <svg-icon v-if="icon" :icon-class="icon" style="font-size: 16px"></svg-icon>
27
+
28
+ <img v-else :src="getImg(status)" height="16" />
29
+ {{ title }}
30
+ </a>
31
+ </a-tooltip>
32
+ </template>
33
+ <template v-else
34
+ ><a>
30
35
  <svg-icon v-if="icon" :icon-class="icon" style="font-size: 16px"></svg-icon>
31
36
 
32
37
  <img v-else :src="getImg(status)" height="16" />
33
38
  {{ title }}
34
- </a>
35
- </a-tooltip>
36
- </template>
37
- <template v-else
38
- ><a>
39
- <svg-icon v-if="icon" :icon-class="icon" style="font-size: 16px"></svg-icon>
39
+ </a></template
40
+ >
41
+ </a-menu-item>
42
+ </a-menu>
43
+ </a-dropdown>
44
+ <template v-else>
45
+ <div class="status-btn">
46
+ <svg-icon v-if="statusIcon" :icon-class="statusIcon" style="font-size: 16px"></svg-icon>
47
+ <img v-else :src="getImg(status)" height="16" />
48
+ {{ statusDesc }}
49
+ <a-icon type="right" />
50
+ <ul class="status-list">
51
+ <li v-for="{ title, status, description, icon } in statusList" :key="status" @click="handleStatusChange(status)">
52
+ <template v-if="description">
53
+ <a-tooltip placement="right">
54
+ <template slot="title">
55
+ <span>{{ description }}</span>
56
+ </template>
57
+ <a>
58
+ <svg-icon v-if="icon" :icon-class="icon" style="font-size: 16px"></svg-icon>
40
59
 
41
- <img v-else :src="getImg(status)" height="16" />
42
- {{ title }}
43
- </a></template
44
- >
45
- </a-menu-item>
46
- </a-menu>
47
- </a-dropdown>
60
+ <img v-else :src="getImg(status)" height="16" />
61
+ {{ title }}
62
+ </a>
63
+ </a-tooltip>
64
+ </template>
65
+ <template v-else
66
+ ><a>
67
+ <svg-icon v-if="icon" :icon-class="icon" style="font-size: 16px"></svg-icon>
68
+
69
+ <img v-else :src="getImg(status)" height="16" />
70
+ {{ title }}
71
+ </a></template
72
+ >
73
+ </li>
74
+ </ul>
75
+ </div>
76
+ </template>
77
+ </div>
48
78
  </template>
49
79
  <script>
50
80
  import { Tooltip, Dropdown, Icon, Menu } from 'ant-design-vue';
51
81
  import SvgIcon from '@/component/svg/index.vue';
52
82
  import fetch, { qs } from '@/utils/chatFetch';
83
+ import { mapGetters, mapMutations } from '../store/helper';
53
84
 
54
85
  export default {
55
- inject: ['i18nText'],
86
+ inject: ['store', 'i18nText'],
56
87
  components: {
57
88
  [Tooltip.name]: Tooltip,
58
89
  [Dropdown.name]: Dropdown,
@@ -66,16 +97,13 @@ export default {
66
97
  type: String,
67
98
  default: 'right-top'
68
99
  },
69
- assemblyId: {
70
- type: String,
71
- require: true
72
- },
73
- statusList: {
74
- type: Array,
75
- default: () => []
76
- }
77
100
  },
78
101
  computed: {
102
+ ...mapGetters([
103
+ 'assemblyId',
104
+ 'statusList',
105
+ 'userStatus',
106
+ ]),
79
107
  statusObj() {
80
108
  return this.statusList.find(item => item.status === this.status);
81
109
  },
@@ -84,14 +112,19 @@ export default {
84
112
  },
85
113
  statusDesc() {
86
114
  return this.statusObj?.title;
115
+ },
116
+ status() {
117
+ return this.userStatus || 'ON-LINE' // 客服状态
87
118
  }
88
119
  },
89
120
  data() {
90
121
  return {
91
- status: 'ON-LINE' // 客服状态
92
122
  };
93
123
  },
94
124
  methods: {
125
+ ...mapMutations([
126
+ 'setUserStatus'
127
+ ]),
95
128
  getImg(name) {
96
129
  try {
97
130
  return require(`../img/${name}.png`);
@@ -100,7 +133,7 @@ export default {
100
133
  }
101
134
  },
102
135
  handleStatusChange(status) {
103
- this.status = status;
136
+ this.setUserStatus(status);
104
137
  let params = {
105
138
  assemblyId: this.assemblyId,
106
139
  status
@@ -116,11 +149,45 @@ export default {
116
149
  </script>
117
150
  <style lang="less" scoped>
118
151
  .status-btn {
152
+ position: relative;
153
+ padding-right: 10px;
119
154
  height: 26px;
120
155
  line-height: 26px;
121
- }
122
- .dropdown-status {
123
- left: 92px !important;
124
- top: 706px !important;
156
+ cursor: pointer;
157
+ .status-list {
158
+ position: absolute;
159
+ right: -85px;
160
+ bottom: 8px;
161
+ z-index: 2;
162
+ display: none;
163
+ padding: 4px 0;
164
+ outline: none;
165
+ list-style-type: none;
166
+ border-radius: 4px;
167
+ box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
168
+ background-color: #fff;
169
+ transition: all .5s;
170
+ li {
171
+ height: 32px;
172
+ line-height: 32px;
173
+ padding: 0 16px;
174
+ display: flex;
175
+ align-items: center;
176
+ cursor: pointer;
177
+ background: #fff;
178
+ a {
179
+ padding-right: 8px;
180
+ color: rgba(0, 0, 0, 0.65);
181
+ }
182
+ &:hover {
183
+ background: #f2f2f2;
184
+ }
185
+ }
186
+ }
187
+ &:hover {
188
+ .status-list {
189
+ display: block;
190
+ }
191
+ }
125
192
  }
126
193
  </style>
@@ -337,5 +337,8 @@ export default {
337
337
  },
338
338
  isRecorderVoice(state) {
339
339
  return state.isRecorderVoice;
340
+ },
341
+ userStatus(state) {
342
+ return state.userStatus;
340
343
  }
341
344
  };
@@ -262,5 +262,8 @@ export default {
262
262
  },
263
263
  setUserInfo(state, userInfo) {
264
264
  state.userInfo = userInfo;
265
- }
265
+ },
266
+ setUserStatus(state, userStatus) {
267
+ state.userStatus = userStatus;
268
+ },
266
269
  };
@@ -102,6 +102,7 @@ export default () => {
102
102
  curScrollItem: null,
103
103
  isQuickReply: false,
104
104
  isRecorderVoice: false,
105
- msgRecordCache: {} // 消息已读记录缓存
105
+ msgRecordCache: {}, // 消息已读记录缓存
106
+ userStatus: ''
106
107
  };
107
108
  };
@@ -869,7 +869,7 @@ export default create({
869
869
  const results = list.map(item => {
870
870
  const key = this.formKey(item);
871
871
  let title = (key || "").replace(/\n/g, "");
872
- this.$set(item, "showTitle", title);
872
+ this.$set(item, "showTitle", item.title);
873
873
  // 表单校验rule prop如果有 . 会报错, 替换成 ~-~
874
874
  if (title.includes(".")) {
875
875
  let newTitle = title.replace(/\./g, "~-~");
@@ -851,7 +851,7 @@ export default create({
851
851
  Object.assign(params, this.handleParams()); // 额外条件暂时隐藏,需要等后端确定是否需要该额外条件
852
852
  let res = await this.handleGetConfigApi(params, 'requestTableCondiTionDigital');
853
853
  this.handleConditionDiaital(res);
854
- return Promise.resolve();
854
+ return Promise.resolve(res);
855
855
  } catch (error) {
856
856
  console.log(error, 'getTableCondiTionDigital');
857
857
  }
@@ -8,7 +8,7 @@
8
8
  :maxTagCount="handleMaxTagCount(item)"
9
9
  :maxTagPlaceholder="handleMaxTag(item)"
10
10
  showSearch
11
- :filterOption="filterOption"
11
+ :filterOption="false"
12
12
  v-model="item.value"
13
13
  @search="handleWordBookSearch($event, item)"
14
14
  @dropdownVisibleChange="dropdownVisibleChange($event, item)"
@@ -56,7 +56,7 @@
56
56
  v-model="v.isSelect"
57
57
  @change="handleLabelChange($event, v, item)"
58
58
  :key="i"
59
- :style="$utils.handleLabelColor(v)"
59
+ :style="handleLabelColor(v)"
60
60
  >
61
61
  <a-tooltip placement="topLeft">
62
62
  <template slot="title">
@@ -297,7 +297,7 @@
297
297
  v-model="item.BIRTHDAY.unit"
298
298
  defaultValue="YEAR"
299
299
  showSearch
300
- :filterOption="$utils.filterOption"
300
+ :filterOption="filterOption"
301
301
  allowClear
302
302
  >
303
303
  <a-select-option
@@ -395,7 +395,7 @@
395
395
  v-model="v.isSelect"
396
396
  @change="handleLabelChange($event, v, item)"
397
397
  :key="i"
398
- :class="['label-tag-' + handleLabelColor(v)]"
398
+ :class="['label-tag-' + handleLabelColorClass(v)]"
399
399
  >
400
400
  <a-tooltip placement="topLeft">
401
401
  <template slot="title">
@@ -717,6 +717,7 @@ import { durationMixin, $utils, filterApiFn } from '../mixins/mixins';
717
717
  import vexutils from '@/utils/vexutils';
718
718
  import wordBookutils from '../mixins/wordBookutils';
719
719
  import create from '@/core/create';
720
+ import utils from '@/utils/utils-map';
720
721
  export default create({
721
722
  name: "quick-search",
722
723
  mixins: [durationMixin, $utils, filterApiFn, tableSearchCon],
@@ -896,6 +897,12 @@ export default create({
896
897
  },
897
898
  created() {},
898
899
  methods: {
900
+ filterOption(...arg) {
901
+ return utils.filterOption(...arg);
902
+ },
903
+ handleLabelColor(...arg) {
904
+ return utils.handleLabelColor(...arg);
905
+ },
899
906
  init() {
900
907
  this.quickSearch = [];
901
908
  this.relationQuickSearch = [];
@@ -1620,7 +1627,7 @@ export default create({
1620
1627
  this.$set(el, 'labelList', labelList);
1621
1628
  },
1622
1629
 
1623
- handleLabelColor(item) {
1630
+ handleLabelColorClass(item) {
1624
1631
  return item?.color?.split("-")[1] || "yellow";
1625
1632
  },
1626
1633
 
@@ -45,7 +45,7 @@ export default {
45
45
  return _toString.call(val) === '[object Number]';
46
46
  },
47
47
 
48
- parseCondition() {},
48
+ parseCondition() { },
49
49
 
50
50
  toDateString(time, format) {
51
51
  return moment(time).format(format);
@@ -89,7 +89,7 @@ export default {
89
89
  },
90
90
 
91
91
  filterOption(input, option) {
92
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
92
+ return option.componentOptions.children[0]?.text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
93
93
  },
94
94
 
95
95
  // color 获取 alpha
@@ -262,7 +262,7 @@ export default {
262
262
  let result = [];
263
263
  let resultStr = '';
264
264
  const getVal = (t, i, r) => {
265
- return t.replace(r, function() {
265
+ return t.replace(r, function () {
266
266
  let pKey = arguments[1];
267
267
  return list[i][pKey] || '';
268
268
  });
@@ -291,7 +291,7 @@ export default {
291
291
  };
292
292
  const that = this;
293
293
  const getVal = (t, r, k) => {
294
- return t.replace(r, function() {
294
+ return t.replace(r, function () {
295
295
  var pKey = arguments[1];
296
296
  var pls = pKey.split('!');
297
297
  var plsList = pls.slice(1);
@@ -381,7 +381,7 @@ export default {
381
381
  debounce(func, wait, immediate) {
382
382
  let timeout, args, context, timestamp, result;
383
383
 
384
- const later = function() {
384
+ const later = function () {
385
385
  // 据上一次触发时间间隔
386
386
  const last = +new Date() - timestamp;
387
387
 
@@ -398,7 +398,7 @@ export default {
398
398
  }
399
399
  };
400
400
 
401
- return function(...args) {
401
+ return function (...args) {
402
402
  context = this;
403
403
  timestamp = +new Date();
404
404
  const callNow = immediate && !timeout;