cnhis-design-vue 0.2.20-beta → 0.2.24-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 (144) hide show
  1. package/lib/cui.common.js +1231 -2422
  2. package/lib/cui.umd.js +1231 -2422
  3. package/lib/cui.umd.min.js +63 -63
  4. package/package.json +2 -2
  5. package/packages/big-table/src/BigTable.vue +1 -0
  6. package/packages/big-table/src/assets/style/table-base.less +5 -0
  7. package/packages/big-table/src/components/TextOverTooltip.vue +1 -1
  8. package/packages/multi-chat/chat/index.vue +1 -1
  9. package/packages/multi-chat/components/user-status.vue +1 -1
  10. package/packages/scale-view/answerParse.vue +4 -4
  11. package/packages/select-label/label-classify.vue +129 -0
  12. package/packages/select-label/labelFormContent.vue +263 -130
  13. package/packages/select-label/select-label.vue +111 -18
  14. package/packages/table-filter/src/base-search-com/BaseSearch.vue +2 -1
  15. package/packages/table-filter/src/components/search-modal/set-classification.vue +19 -1
  16. package/packages/table-filter/src/mixins/mixins.js +10 -2
  17. package/packages/table-filter/src/quick-search/QuickSearch.vue +16 -7
  18. package/es/affix/index.js +0 -3008
  19. package/es/age/index.js +0 -3767
  20. package/es/age/style.css +0 -1
  21. package/es/alert/index.js +0 -3008
  22. package/es/anchor/index.js +0 -3021
  23. package/es/auto-complete/index.js +0 -3008
  24. package/es/avatar/index.js +0 -3008
  25. package/es/back-top/index.js +0 -3008
  26. package/es/badge/index.js +0 -3008
  27. package/es/base/index.js +0 -2896
  28. package/es/big-table/index.js +0 -19626
  29. package/es/big-table/style.css +0 -1
  30. package/es/breadcrumb/index.js +0 -3032
  31. package/es/button/index.js +0 -9128
  32. package/es/button/style.css +0 -1
  33. package/es/calendar/index.js +0 -3008
  34. package/es/captcha/index.js +0 -3618
  35. package/es/captcha/style.css +0 -1
  36. package/es/card/index.js +0 -3032
  37. package/es/carousel/index.js +0 -3008
  38. package/es/cascader/index.js +0 -3008
  39. package/es/checkbox/index.js +0 -3344
  40. package/es/checkbox/style.css +0 -1
  41. package/es/col/index.js +0 -3009
  42. package/es/collapse/index.js +0 -3021
  43. package/es/color-picker/index.js +0 -3532
  44. package/es/color-picker/style.css +0 -1
  45. package/es/comment/index.js +0 -3008
  46. package/es/config-provider/index.js +0 -3008
  47. package/es/date-picker/index.js +0 -3043
  48. package/es/descriptions/index.js +0 -3021
  49. package/es/divider/index.js +0 -3008
  50. package/es/drag-layout/index.js +0 -4814
  51. package/es/drag-layout/style.css +0 -1
  52. package/es/drawer/index.js +0 -3008
  53. package/es/dropdown/index.js +0 -3008
  54. package/es/editor/index.js +0 -3273
  55. package/es/editor/style.css +0 -1
  56. package/es/empty/index.js +0 -3008
  57. package/es/fabric-chart/index.js +0 -9844
  58. package/es/fabric-chart/style.css +0 -1
  59. package/es/form/index.js +0 -3019
  60. package/es/form-model/index.js +0 -3018
  61. package/es/grid/index.js +0 -3776
  62. package/es/icon/index.js +0 -2962
  63. package/es/img/calling.ba1a517f.png +0 -0
  64. package/es/img/failure.96c6f004.png +0 -0
  65. package/es/img/no-permission.3aa0dddb.png +0 -0
  66. package/es/img/nodata.bbccf960.png +0 -0
  67. package/es/index/index.js +0 -110944
  68. package/es/index/style.css +0 -1
  69. package/es/input/index.js +0 -4384
  70. package/es/input/style.css +0 -1
  71. package/es/input-number/index.js +0 -3008
  72. package/es/keep-cache/index.js +0 -3288
  73. package/es/layout/index.js +0 -3054
  74. package/es/list/index.js +0 -3032
  75. package/es/locale-provider/index.js +0 -3008
  76. package/es/map/index.js +0 -3677
  77. package/es/map/style.css +0 -1
  78. package/es/media/msgTip.6865f0c7.mp3 +0 -0
  79. package/es/mentions/index.js +0 -3021
  80. package/es/menu/index.js +0 -3054
  81. package/es/message/index.js +0 -2896
  82. package/es/modal/index.js +0 -2962
  83. package/es/multi-chat/index.js +0 -24268
  84. package/es/multi-chat/style.css +0 -1
  85. package/es/multi-chat-client/index.js +0 -18293
  86. package/es/multi-chat-client/style.css +0 -1
  87. package/es/multi-chat-history/index.js +0 -4571
  88. package/es/multi-chat-history/style.css +0 -1
  89. package/es/multi-chat-record/index.js +0 -4831
  90. package/es/multi-chat-record/style.css +0 -1
  91. package/es/multi-chat-setting/index.js +0 -13452
  92. package/es/multi-chat-setting/style.css +0 -1
  93. package/es/multi-chat-sip/index.js +0 -3313
  94. package/es/multi-chat-sip/style.css +0 -1
  95. package/es/notification/index.js +0 -2896
  96. package/es/page-header/index.js +0 -3008
  97. package/es/pagination/index.js +0 -3008
  98. package/es/popconfirm/index.js +0 -3008
  99. package/es/popover/index.js +0 -3008
  100. package/es/progress/index.js +0 -3008
  101. package/es/radio/index.js +0 -3335
  102. package/es/radio/style.css +0 -1
  103. package/es/rate/index.js +0 -3008
  104. package/es/result/index.js +0 -3008
  105. package/es/row/index.js +0 -3008
  106. package/es/scale-view/index.js +0 -18009
  107. package/es/scale-view/style.css +0 -1
  108. package/es/select/index.js +0 -4567
  109. package/es/select/style.css +0 -1
  110. package/es/select-label/index.js +0 -5226
  111. package/es/select-label/style.css +0 -1
  112. package/es/select-person/index.js +0 -5427
  113. package/es/select-person/style.css +0 -1
  114. package/es/skeleton/index.js +0 -3008
  115. package/es/slider/index.js +0 -3008
  116. package/es/space/index.js +0 -3008
  117. package/es/spin/index.js +0 -3008
  118. package/es/statistic/index.js +0 -3021
  119. package/es/steps/index.js +0 -3021
  120. package/es/switch/index.js +0 -3008
  121. package/es/table-filter/index.js +0 -24120
  122. package/es/table-filter/style.css +0 -1
  123. package/es/tabs/index.js +0 -3021
  124. package/es/tag/index.js +0 -3909
  125. package/es/tag/style.css +0 -1
  126. package/es/time-picker/index.js +0 -3008
  127. package/es/timeline/index.js +0 -3018
  128. package/es/tooltip/index.js +0 -3008
  129. package/es/transfer/index.js +0 -3008
  130. package/es/tree/index.js +0 -3021
  131. package/es/tree-select/index.js +0 -3021
  132. package/es/upload/index.js +0 -3008
  133. package/es/utils/UniRTCv2.js +0 -586
  134. package/es/utils/chatFetch.js +0 -85
  135. package/es/utils/clickoutside.js +0 -76
  136. package/es/utils/crypto.js +0 -40
  137. package/es/utils/kty-sdk.js +0 -1030
  138. package/es/utils/kty.min-1.0.0.js +0 -6
  139. package/es/utils/sip-device.js +0 -112
  140. package/es/utils/time-domain.js +0 -195
  141. package/es/utils/utils-map.js +0 -530
  142. package/es/utils/vexutils.js +0 -963
  143. package/es/verification-code/index.js +0 -3487
  144. package/es/verification-code/style.css +0 -1
@@ -4,17 +4,36 @@
4
4
  <a-tag v-for="v in labelSelectedList" :key="v.labelId" :style="handleLabelColor(v, true)" :closable="item_is_edit" @close="closeTag(v)">
5
5
  {{ v.labelName }}
6
6
  </a-tag>
7
- <span class="form-add-icon form-add-icon-label" @click="handleEditLabel" :class="{ disable: isLock }" v-show="item_is_edit">
7
+ <span v-if="!explicit" class="form-add-icon form-add-icon-label" @click="handleEditLabel" :class="{ disable: isLock }" v-show="item_is_edit">
8
8
  <a-icon class="add-icon" type="plus-circle" />
9
9
  新增
10
10
  </span>
11
11
  </div>
12
- <div class="common-label" v-if="sourceType == 'form' && commonLabelList.length && item_is_edit">
12
+ <div class="common-label" v-if="sourceType == 'form' && commonLabelList.length && item_is_edit && !explicit">
13
13
  <span>常用</span>
14
14
  <a-checkable-tag v-for="(item, i) in commonLabelList" v-model="item.isSelect" @change="handleCommonLabelChange($event, item)" :key="i" :style="handleLabelColor(item)">
15
15
  {{ item.labelName }}
16
16
  </a-checkable-tag>
17
17
  </div>
18
+ <div v-if="explicit">
19
+ <labelFormContent
20
+ :explicit="explicit"
21
+ v-bind="$attrs"
22
+ ref="labelFormContent"
23
+ :labelVisible="labelVisible"
24
+ :item="item"
25
+ :isEdit="isEdit"
26
+ :isLock="isLock"
27
+ :labelSelectedList="labelSelectedList"
28
+ :isChangeWindow="isChangeWindow"
29
+ :labelOptions="editLabelItem.labelObj"
30
+ :sourceType="sourceType"
31
+ @updateLabelData="updateLabelData"
32
+ @explicitOnChange="explicitOnChange"
33
+ ></labelFormContent>
34
+ </div>
35
+
36
+ <!-- 弹窗 -->
18
37
  <a-modal
19
38
  class="label-form-modal-wrap modal-wrap standard-modal standard-modal-white"
20
39
  v-model="labelVisible"
@@ -58,6 +77,7 @@
58
77
  </div>
59
78
  </template>
60
79
  <labelFormContent
80
+ :explicit="explicit"
61
81
  v-bind="$attrs"
62
82
  ref="labelFormContent"
63
83
  :labelVisible="labelVisible"
@@ -105,7 +125,8 @@ export default create({
105
125
  modalWidth: '763px',
106
126
  modalHeight: '404px',
107
127
  maxHeight: '404px',
108
- commonLabelList: []
128
+ commonLabelList: [],
129
+ multipleChoiceConfig: {}
109
130
  };
110
131
  },
111
132
  props: {
@@ -139,6 +160,16 @@ export default create({
139
160
  type: Function,
140
161
  default: () => Promise.resolve({ rows: [] })
141
162
  },
163
+
164
+ explicit:{ // 标签选择外显
165
+ type: Boolean,
166
+ default: false
167
+ },
168
+
169
+ explicitHeiht:{
170
+ type: String,
171
+ default: ""
172
+ }
142
173
  },
143
174
  computed: {
144
175
  item_is_edit() {
@@ -146,6 +177,16 @@ export default create({
146
177
  return (item.is_edit == 1 || item.isShow) && !this.isDetail;
147
178
  }
148
179
  },
180
+ mounted() {
181
+ // 外显初始化
182
+ if(this.explicit){
183
+ this.handleEditLabel();
184
+ } else {
185
+ // 获取标签分类
186
+ this.handleGetMultipleChoiceConfig(this.item);
187
+ }
188
+
189
+ },
149
190
  watch: {
150
191
  selectedList: {
151
192
  immediate: true,
@@ -189,13 +230,19 @@ export default create({
189
230
  selectedList.splice(fdIndex, 1);
190
231
  }
191
232
  this.handleEmit(selectedList);
233
+ this.hanldeSetLabelItem(d.labelId, false);
192
234
  },
193
235
  handleCommonLabelChange(v, d) {
194
- const selectedList = this.labelSelectedList || [];
236
+ let multipleChoiceConfig = this.multipleChoiceConfig;
237
+ let selectedList = this.labelSelectedList || [];
195
238
  if (v) {
196
239
  if (selectedList.some(n => n.labelId == d.labelId)) {
197
240
  return;
198
241
  }
242
+ // 不允许多选的类型,先删除,再新增
243
+ if('2' == multipleChoiceConfig[d.typeId]){
244
+ selectedList = selectedList.filter(item => item.typeId !== d.typeId);
245
+ }
199
246
  selectedList.push(d);
200
247
  } else {
201
248
  const fdIndex = selectedList.findIndex(n => n.labelId == d.labelId);
@@ -215,12 +262,16 @@ export default create({
215
262
  }
216
263
  });
217
264
  },
218
- handleEditLabel() {
265
+ handleEditLabel(type) {
219
266
  if (this.isLock) return;
220
- this.labelVisible = true;
267
+ if(!this.explicit && type !== 'init') {
268
+ this.labelVisible = true;
269
+ }
221
270
  this.handleGetLabelData(this.item)
222
271
  },
223
272
  handleLabelCancel() {
273
+ if(this.explicit) return;
274
+
224
275
  this.$refs.labelFormContent?.resetShowAdd();
225
276
  this.editLabelItem.showAdd = false;
226
277
  this.editLabelItem = {};
@@ -258,7 +309,7 @@ export default create({
258
309
 
259
310
  async handleGetLabelData(v, update) {
260
311
  const { rows, results } = await this.getLabelList(v);
261
- console.log(rows, results)
312
+ // console.log(rows, results)
262
313
  const labelList = rows || [];
263
314
  const labelObj = {};
264
315
  const cacheKey = `${v.val_key}_${v.name}`;
@@ -271,6 +322,7 @@ export default create({
271
322
  * typeName 按照分类处理
272
323
  * 没有分类创建分类,有则添加
273
324
  */
325
+ this.$set(n,'isSelect',false)
274
326
  if (labelObj[n.typeName]) {
275
327
  labelObj[n.typeName].itemList.push({ ...n });
276
328
  } else {
@@ -299,48 +351,60 @@ export default create({
299
351
  setLabelTypeStatus(results) {
300
352
  if (!results) return false;
301
353
  let keys = Object.keys(results);
302
-
354
+ let multipleChoiceConfig ={};
303
355
  let choiceTypes = (results.typeList || []).reduce((obj, item) => {
304
- obj[item.typeName] = item.multipleChoice;
356
+ multipleChoiceConfig[item.typeId] = item.multipleChoice
357
+
358
+ obj[item.typeName] = {
359
+ multipleChoice:item.multipleChoice,
360
+ parentColor: item.parentColor,
361
+ allowCreateByPersonal:item.allowCreateByPersonal
362
+ }
305
363
  return obj;
306
364
  }, {});
365
+
366
+ if(this.explicit){
367
+ this.multipleChoiceConfig = multipleChoiceConfig;
368
+ }
307
369
  keys.forEach(key => {
308
370
  if (key === 'typeList') return;
309
371
  // 空,允许
310
372
  if (key === 'emptyTypes') {
311
373
  results[key].forEach(item => {
312
- this.$set(this.editLabelItem.labelObj, item.typeName, {
313
- multipleChoice: choiceTypes[item.typeName],
374
+ this.$set(this.editLabelItem.labelObj, item.typeName, Object.assign({
314
375
  addVal: '',
315
376
  showAdd: false,
316
377
  itemList: [],
317
378
  typeId: item.typeId,
318
379
  typeName: item.typeName
319
- });
380
+ },choiceTypes[item.typeName] || {}));
320
381
  });
321
382
  return;
322
383
  }
323
384
  if (utils.isPlainObject(results[key])) {
324
385
  // 空,不允许
325
386
  if (!this.editLabelItem.labelObj[key]) {
326
- this.$set(this.editLabelItem.labelObj, key, {
327
- multipleChoice: choiceTypes[key],
387
+ this.$set(this.editLabelItem.labelObj, key, Object.assign({
328
388
  addVal: '',
329
389
  showAdd: false,
330
390
  itemList: false,
331
391
  typeId: '',
332
392
  typeName: key
333
- });
393
+ },{...(choiceTypes[key] || {})}));
334
394
  } else {
335
395
  // 非空,不允许
336
396
  this.$set(this.editLabelItem.labelObj[key], 'isNoAdd', true);
337
- this.$set(this.editLabelItem.labelObj[key], 'multipleChoice', choiceTypes[key]);
397
+ this.$set(this.editLabelItem.labelObj[key], 'multipleChoice', choiceTypes[key]?.multipleChoice);
398
+ this.$set(this.editLabelItem.labelObj[key], 'allowCreateByPersonal', choiceTypes[key]?.allowCreateByPersonal);
399
+ this.$set(this.editLabelItem.labelObj[key], 'parentColor', choiceTypes[key]?.parentColor);
338
400
  }
339
401
  } else {
340
- this.$set(this.editLabelItem.labelObj[key], 'multipleChoice', choiceTypes[key]);
402
+ this.$set(this.editLabelItem.labelObj[key], 'multipleChoice', choiceTypes[key]?.multipleChoice);
403
+ this.$set(this.editLabelItem.labelObj[key], 'allowCreateByPersonal', choiceTypes[key]?.allowCreateByPersonal);
404
+ this.$set(this.editLabelItem.labelObj[key], 'parentColor', choiceTypes[key]?.parentColor);
341
405
  }
342
406
  });
343
- },
407
+ },
344
408
 
345
409
  updateLabelData(){
346
410
  this.handleGetLabelData(this.item, true)
@@ -360,6 +424,31 @@ export default create({
360
424
  this.getCommonlabelsList(this.item.label_type);
361
425
  });
362
426
  }
427
+ },
428
+
429
+ // 标签外显发生变化
430
+ explicitOnChange(){
431
+ this.handleSaveLabel();
432
+ },
433
+
434
+ hanldeSetLabelItem(id, state){
435
+ if(this.explicit){
436
+ this.$nextTick(()=>{
437
+ this.$refs.labelFormContent?.hanldeSetLabelItem(id, state);
438
+ })
439
+ }
440
+ },
441
+
442
+ async handleGetMultipleChoiceConfig(v){
443
+ const { rows, results } = await this.getLabelList(v);
444
+ if (!results) return false;
445
+ let multipleChoiceConfig = (results.typeList || []).reduce((obj, item) => {
446
+ obj[item.typeId] = item.multipleChoice
447
+ return obj;
448
+ }, {});
449
+
450
+ this.multipleChoiceConfig = multipleChoiceConfig;
451
+ this.$set(this,'multipleChoiceConfig',multipleChoiceConfig);
363
452
  }
364
453
  }
365
454
  });
@@ -391,6 +480,10 @@ export default create({
391
480
  .tag-label {
392
481
  /deep/ .ant-tag {
393
482
  margin-bottom: 4px;
483
+ border: 1px solid #f1f1f1;
484
+ .anticon-close {
485
+ color: #fff;
486
+ }
394
487
  }
395
488
  }
396
489
  .common-label {
@@ -2091,7 +2091,8 @@ export default create({
2091
2091
  this.showPlaceholderPrefix = false;
2092
2092
  let dom = this.$refs.baseSearchPlaceholderSpan;
2093
2093
  if(!dom) return;
2094
- let w = dom.offsetWidth;
2094
+ // input 框有padding 32px ...显示需要多预留一些宽度12px
2095
+ let w = dom.offsetWidth + 45;
2095
2096
  console.log(w, "wwww");
2096
2097
  let maxW = this.showOutSearch ? 284 : 244;
2097
2098
  this.inputSearchW = w > maxW ? 300 : w < 200 ? 200 : w;
@@ -7,7 +7,7 @@
7
7
  @handleOk="oneSave"
8
8
  @close="oneCancel"
9
9
  @changeData="changeData"
10
- @resetPopconfirm="e => $emit('resetPopconfirm', e)"
10
+ @resetPopconfirm="resetPopconfirm"
11
11
  :edit="edit"
12
12
  :copy="copy"
13
13
  :delItem="delItem"
@@ -218,6 +218,24 @@ export default {
218
218
  },
219
219
  setOneVisible(flag) {
220
220
  this.$emit('setClassifyModal', flag);
221
+ },
222
+ async resetPopconfirm() {
223
+ try {
224
+ let params = {
225
+ id: this.settingId,
226
+ tableId: this.$attrs.tableId,
227
+ type: 'SEARCH_CATEGORY'
228
+ };
229
+ // TODO:api
230
+ let res = await this.handleGetConfigApi(params, 'requestResetDefaultSetting');
231
+ if (res) {
232
+ this.$emit('CondiTionListInit');
233
+
234
+ this.setOneVisible(false);
235
+ }
236
+ } catch (error) {
237
+ console.log(error);
238
+ }
221
239
  }
222
240
  }
223
241
  };
@@ -383,7 +383,15 @@ export const outQuickSearchFn = {
383
383
  arr.forEach(el => {
384
384
  el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
385
385
  const attr = el?.settingObj?.attr || "";
386
+ const isPreciseSearch = el?.settingObj?.isPreciseSearch || "";
386
387
  const showSetting = el?.setting?.showSetting || []
388
+ /**
389
+ * NUMBER和TEXT属性字段
390
+ * 如果 开启了精准搜索,则传条件的时候 要传 EQ
391
+ * isPreciseSearch: 0/1
392
+ */
393
+ let textCon = el.fieldType == "TEXT" && isPreciseSearch == 1 ? 'EQ' : 'CL';
394
+
387
395
  // 映射优先级最高
388
396
  if (showSetting?.length) {
389
397
  let tvalue = []
@@ -484,7 +492,7 @@ export const outQuickSearchFn = {
484
492
  this.handleSetLabelOptions(el.setting.labelType, el);
485
493
  }
486
494
  } else if ("PASSWORD" === attr) {
487
- this.$set(el, "con", el.fieldType === "NUMBER" ? "EQ" : "CL");
495
+ this.$set(el, "con", el.fieldType === "NUMBER" ? "EQ" : textCon);
488
496
  this.$set(el, "comAttr", "PASSWORD");
489
497
  this.$set(el, "PASSWORDTYPE", true);
490
498
  this.$set(el, "value", "");
@@ -495,7 +503,7 @@ export const outQuickSearchFn = {
495
503
  this.$set(el, "com", "Text");
496
504
  this.$set(el, "attr", "DURATION");
497
505
  } else {
498
- this.$set(el, "con", "CL");
506
+ this.$set(el, "con", textCon);
499
507
  this.$set(el, "value", "");
500
508
  this.$set(el, "com", "Text");
501
509
  }
@@ -991,6 +991,8 @@ export default create({
991
991
  handlerInitSearchItem(arr) {
992
992
  if (!Array.isArray(arr)) return;
993
993
  arr.forEach(el => {
994
+ const isPreciseSearch = el?.settingObj?.isPreciseSearch || "";
995
+
994
996
  if (el.setting) {
995
997
  // el.seting 可能是 string / object
996
998
  el.setting = typeof el.setting == "string" ? JSON.parse(el.setting) : el.setting;
@@ -1085,8 +1087,14 @@ export default create({
1085
1087
  });
1086
1088
  }
1087
1089
  } else if (el.fieldType == "TEXT") {
1088
- this.$set(el, "con", "CL");
1089
- this.$set(el, "CL", "");
1090
+ /**
1091
+ * NUMBER和TEXT属性字段
1092
+ * 如果 开启了精准搜索,则传条件的时候 要传 EQ
1093
+ * isPreciseSearch: 0/1
1094
+ */
1095
+ let con = isPreciseSearch == 1 ? 'EQ': 'CL';
1096
+ this.$set(el, "con", con);
1097
+ this.$set(el, con, "");
1090
1098
  } else if (el.fieldType == "JSONB") {
1091
1099
  this.$set(el, "con", "EQ");
1092
1100
  this.$set(el, "EQ", "");
@@ -1783,6 +1791,7 @@ export default create({
1783
1791
  line-height: 32px;
1784
1792
  text-align: right;
1785
1793
  padding-left: 12px;
1794
+ color: #000;
1786
1795
  }
1787
1796
  .quick-item-col {
1788
1797
  padding: 0 12px;
@@ -1873,11 +1882,11 @@ export default create({
1873
1882
 
1874
1883
  // 标签
1875
1884
  .label-attr-container {
1876
- div.label-container {
1877
- // overflow: hidden;
1878
- // width: 380px;
1879
- // height: 84px;
1880
- // flex: none;
1885
+ .edit-label {
1886
+ color: #000000;
1887
+ font-size: 14px;
1888
+ line-height: 32px;
1889
+ padding-left: 0;;
1881
1890
  }
1882
1891
  .label-container-height {
1883
1892
  overflow: hidden;