cnhis-design-vue 0.1.40 → 0.1.42

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 (44) hide show
  1. package/es/big-table/index.js +74 -67
  2. package/es/big-table/style.css +1 -1
  3. package/es/button/index.js +2 -2
  4. package/es/color-picker/index.js +1 -1
  5. package/es/color-picker/style.css +1 -1
  6. package/es/fabric-chart/index.js +4 -4
  7. package/es/fabric-chart/style.css +1 -1
  8. package/es/index/index.js +42 -42
  9. package/es/index/style.css +2 -2
  10. package/es/modal/index.js +4 -4
  11. package/es/select/index.js +7 -7
  12. package/es/select/style.css +1 -1
  13. package/es/table-filter/index.js +22 -22
  14. package/es/table-filter/style.css +1 -1
  15. package/lib/cui.common.js +4223 -1783
  16. package/lib/cui.umd.js +4223 -1783
  17. package/lib/cui.umd.min.js +52 -52
  18. package/package.json +1 -1
  19. package/packages/big-table/index.js +6 -0
  20. package/packages/big-table/src/BigTable.vue +11 -94
  21. package/packages/big-table/src/Fieldset.vue +4 -4
  22. package/packages/big-table/src/utils/bigTableProps.js +82 -0
  23. package/packages/color-picker/src/color-picker.vue +14 -2
  24. package/packages/color-picker/src/style.less +1 -1
  25. package/packages/fabric-chart/src/FabricChart.vue +0 -1
  26. package/packages/fabric-chart/src/const/defaultVaule.js +20 -1
  27. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +39 -43
  28. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +46 -37
  29. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +169 -109
  30. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +111 -51
  31. package/packages/fabric-chart/src/fabric-chart2/FabricCenter.vue +8 -12
  32. package/packages/fabric-chart/src/mixins/{polylineCommon.js → eventCommon.js} +13 -3
  33. package/packages/index.js +6 -7
  34. package/packages/modal/index.js +6 -2
  35. package/packages/modal/src/Modal.js +7 -0
  36. package/packages/select/src/TableSelect/index.vue +138 -75
  37. package/packages/table-filter/src/base-search-com/BaseSearch.vue +30 -22
  38. package/packages/table-filter/src/classification/Classification-com.vue +6 -2
  39. package/packages/table-filter/src/components/multi-select/multi-select.vue +1 -1
  40. package/packages/table-filter/src/components/search-condition/SearchCondition.vue +2 -0
  41. package/packages/table-filter/src/quick-search/QuickSearch.vue +25 -22
  42. package/src/style/style.less +2 -2
  43. package/src/utils/clickoutside.js +14 -13
  44. package/docs_20211021.zip +0 -0
@@ -8,7 +8,7 @@
8
8
  }
9
9
  "
10
10
  > -->
11
- <div class="table-select" @mousedown="mousedown($event)">
11
+ <div class="table-select" @mousedown="mousedown($event)" :id="id">
12
12
  <a-select
13
13
  ref="selectBox"
14
14
  v-on="$listeners"
@@ -24,7 +24,6 @@
24
24
  @focus="isSearch = true"
25
25
  @search="search"
26
26
  @change="valueChange"
27
- @dropdownVisibleChange="dropdownVisibleChange"
28
27
  :getPopupContainer="
29
28
  triggerNode => {
30
29
  return triggerNode.parentNode || document.body;
@@ -54,6 +53,7 @@
54
53
  :data="tableData"
55
54
  :radio-config="{ trigger: 'row', checkRowKey: defaultSelecteRow }"
56
55
  :edit-config="{ trigger: 'click', mode: 'cell' }"
56
+ :edit-rules="validRules"
57
57
  @radio-change="radioChangeEvent"
58
58
  @cell-click="cellClick"
59
59
  >
@@ -61,6 +61,25 @@
61
61
  <span class="opt-btn" @click="deleteRow(row)">删除</span>
62
62
  </template>
63
63
 
64
+ <!-- <template v-for="item in colSelectList" #[item.slots.edit]="scope">
65
+ <a-select
66
+ :key="item.slots.edit"
67
+ show-search
68
+ :placeholder="`请选择${item.title}`"
69
+ style="width: 100%"
70
+ :default-active-first-option="false"
71
+ :filter-option="false"
72
+ :not-found-content="null"
73
+ :defaultValue="scope.row[item.field]"
74
+ v-model="scope.row[item.field]"
75
+ @change="$refs.xTable.updateStatus(scope)"
76
+ >
77
+ <a-select-option :key="option.value" :value="option.value" v-for="option in item.editRender.options">
78
+ {{option.label}}
79
+ </a-select-option>
80
+ </a-select>
81
+ </template> -->
82
+
64
83
  <template #empty>
65
84
  <span>
66
85
  <p class="no-data">暂无数据</p>
@@ -74,7 +93,7 @@
74
93
  <a-button type="primary" style="margin-right: auto" @click="addRow">新增</a-button>
75
94
  <span v-show="!isOk" class="tips">请完善表格信息</span>
76
95
  <span v-show="isOk && isRepeat" class="tips">表格信息不能重复</span>
77
- <a-button style="margin-right: 10px" @click="isOpen = false">取消</a-button>
96
+ <a-button style="margin-right: 10px" @click="cancel">取消</a-button>
78
97
  <a-button type="primary" @click="saveRow">确定</a-button>
79
98
  </template>
80
99
  </div>
@@ -121,9 +140,13 @@ export default create({
121
140
  type: String,
122
141
  default: 'noEdit'
123
142
  },
143
+ id: {
144
+ type: String,
145
+ default: `tableSelect${Date.now()}`
146
+ },
124
147
  columns: {
125
148
  type: Array,
126
- default: () => []
149
+ require: true
127
150
  },
128
151
  data: {
129
152
  type: Array,
@@ -140,13 +163,20 @@ export default create({
140
163
  fetching: {
141
164
  type: Boolean,
142
165
  default: false
166
+ },
167
+ validRules: {
168
+ type: Object,
169
+ default: () => {}
143
170
  }
144
171
  },
145
172
  computed: {
146
173
  mode() {
147
174
  const obj = this.columns.find(v => v.type);
148
175
  return obj?.type === 'checkbox' || this.type === 'edit' ? 'multiple' : 'default';
149
- }
176
+ },
177
+ // colSelectList() {
178
+ // return this.columns.filter(v => v.slots?.edit);
179
+ // },
150
180
  },
151
181
  beforeCreate() {
152
182
  Vue.use(Select).use(Icon).use(Spin).use(Pagination).use(Button);
@@ -179,13 +209,15 @@ export default create({
179
209
  handler(value) {
180
210
  if (value) {
181
211
  this.tableData = JSON.parse(JSON.stringify(this.data));
212
+ const { defaultValue = '' } = this.$attrs;
182
213
  // 默认值相关
183
- if (this.tableData.length && this.type === 'noEdit' && this.setDefaultValue && this.$attrs.defaultValue) {
184
- this.value = this.$attrs.defaultValue;
185
- this.defaultSelecteRow = this.tableData.find(v => v[this.selectAttr] === this.$attrs.defaultValue).id;
214
+ if (this.tableData.length && this.type === 'noEdit' && this.setDefaultValue && defaultValue) {
215
+ this.value = defaultValue;
216
+ this.defaultSelecteRow = this.tableData.find(v => v[this.selectAttr] === defaultValue).id;
186
217
  this.setDefaultValue = false;
187
218
  }
188
- if (this.type === 'edit' && this.setDefaultValue) {
219
+
220
+ if (this.type === 'edit' && this.tableData.length) {
189
221
  this.setValues(this.tableData);
190
222
  }
191
223
  }
@@ -195,19 +227,8 @@ export default create({
195
227
  }
196
228
  },
197
229
  mounted() {
198
- this.$nextTick(() => {
199
- // document.onclick = e => {
200
- // console.log(e.path);
201
- // const focusCondition = e.path.some(v => v.innerHTML.includes('table-select') && v.innerHTML.includes('ant-select-selection__rendered'));
202
- // if (focusCondition) {
203
- // console.log('应该获取焦点');
204
- // this.$refs.selectBox.focus();
205
- // }
206
- // if (!e.path.some(v => v.className === 'ant-select-dropdown-content' || v.className === 'table-select')) {
207
- // this.isOpen = false;
208
- // this.$refs.selectBox.blur();
209
- // }
210
- // };
230
+ this.$nextTick().then(() => {
231
+ document.addEventListener('mouseup', this.handlerMouseUp, true);
211
232
  });
212
233
  },
213
234
  created() {
@@ -215,27 +236,42 @@ export default create({
215
236
  },
216
237
  methods: {
217
238
  mousedown(e) {
218
- // console.log(e);
219
239
  this.isOpen = true;
220
240
  if (e.target?.className === 'ant-select-selection__rendered') {
221
- this.isSearch = true;
222
- this.onSearch('');
241
+ if (this.type === 'noEdit') {
242
+ this.isSearch = true;
243
+ // 展开就搜索会导致当前选中行显示错误
244
+ // this.onSearch('');
245
+ }
223
246
  e.preventDefault();
224
247
  }
225
248
  },
249
+ handlerMouseUp(e) {
250
+ const currentDom = document.getElementById(this.id);
251
+ if (this.isOpen) {
252
+ if (!currentDom?.contains(e.target) && !e.target?.className?.includes('vxe-select-option')) {
253
+ if (this.type === 'noEdit') {
254
+ this.isOpen = false;
255
+ } else {
256
+ this.cancel();
257
+ }
258
+ }
259
+ }
260
+ },
226
261
  init() {
227
262
  this.debounceSearch = debounce(this.onSearch, 500);
263
+
264
+ // this.setValidRules();
228
265
  },
229
- dropdownVisibleChange(open) {
230
- // console.log('展开下拉菜单-》', open);
231
- // if (open) {
232
- // // this.isOpen = true;
233
- // this.$refs.selectBox.focus();
234
- // } else {
235
- // // this.isOpen = false;
236
- // this.$refs.selectBox.blur();
237
- // }
238
- },
266
+ // setValidRules() {
267
+ // if (Object.keys(this.validRules).length && this.type === 'edit') {
268
+ // const rules = {};
269
+ // this.columns.forEach(v => {
270
+ // v.field && (rules[v.field] = [{ required: true, message: `请填入${v.title}` }]);
271
+ // });
272
+ // validRules = rules;
273
+ // }
274
+ // },
239
275
  search(value) {
240
276
  if (this.type === 'noEdit') {
241
277
  // 防抖
@@ -243,7 +279,8 @@ export default create({
243
279
  }
244
280
  },
245
281
  onSearch(value) {
246
- if (this.isSearch) { // 防止离开焦点时触发paginationchange
282
+ if (this.isSearch) {
283
+ // 防止离开焦点时触发paginationchange
247
284
  this.$emit('update:fetching', true);
248
285
  this.page = 1;
249
286
  this.$emit('paginationchange', { page: 1, selectAttrVal: value });
@@ -278,7 +315,7 @@ export default create({
278
315
  const $table = this.$refs.xTable;
279
316
  const tableData = $table.getTableData().tableData;
280
317
  let record = {
281
- id: tableData.length ? parseInt(tableData[tableData.length - 1].id) + 1 : '1'
318
+ id: tableData.length ? +(tableData[tableData.length - 1]?.id || 0) + 1 + '' : '1'
282
319
  };
283
320
  // if (this.tableData.length) {
284
321
  // const row = this.tableData[0];
@@ -298,36 +335,55 @@ export default create({
298
335
  const $table = this.$refs.xTable;
299
336
  const index = $table.getRowIndex(row);
300
337
  await $table.remove(row);
301
- this.value.splice(index, 1);
338
+ !!~index && this.value.splice(index, 1);
302
339
  },
303
- saveRow() {
340
+ async cancel() {
341
+ this.isOpen = false;
342
+ const index = this.value?.length || 0;
304
343
  const $table = this.$refs.xTable;
305
344
  const tableData = $table.getTableData().tableData;
306
- // 校验全部值不能为空
307
- const isOk = tableData.every(v => {
308
- return Object.values(v).every(k => k !== '' || v.length);
309
- });
345
+ const invalidTableData = tableData.slice(index);
346
+ index !== tableData.length && (await $table.remove(invalidTableData));
347
+ },
348
+ async saveRow() {
349
+ const $table = this.$refs.xTable;
350
+ const tableData = $table.getTableData().tableData;
351
+ // 校验已经填入数据的行全部值不能为空
352
+ const effectiveTableData = tableData.filter(v => Object.keys(v).some(k => k !== 'id' && (v[k] !== '' || v[k].length)));
353
+ const invalidTableData = tableData.filter(v => !Object.keys(v).some(k => k !== 'id' && (v[k] !== '' || v[k].length))); // 失效的数据,即新增全部为空的
354
+
355
+ let isOk = false;
356
+ if (Object.keys(this.validRules).length && this.type === 'edit') {
357
+ const errMap = await $table.validate(effectiveTableData).catch(errMap => errMap);
358
+ isOk = !errMap ? true : false;
359
+ } else {
360
+ isOk = effectiveTableData.every(v => Object.values(v).every(k => k !== '' || v.length));
361
+ }
362
+
310
363
  if (isOk) {
311
364
  this.isOk = true;
312
- if (this.selectAttr) {
313
- this.value = tableData.map(v => v[this.selectAttr]);
314
- this.isOpen = false;
315
- } else {
316
- this.setValues(tableData);
317
- // 表格信息不能重复,否则会报警告
318
- let newArr = this.value.reduce((pre, cur) => {
319
- if (!pre.includes(cur)) {
320
- return pre.concat(cur);
321
- } else {
322
- return pre;
323
- }
324
- }, []);
325
- if (newArr.length !== this.value.length) {
326
- this.isRepeat = true;
365
+ this.setValues(effectiveTableData);
366
+ $table.remove(invalidTableData);
367
+ // 去重 表格信息不能重复,否则会报警告
368
+ let newArr = effectiveTableData.reduce((pre, cur) => {
369
+ let newCur = { ...cur };
370
+ newCur.id && delete newCur.id;
371
+ const index = pre.findIndex(v => {
372
+ let newV = { ...v };
373
+ newV.id && delete newV.id;
374
+ return JSON.stringify(newV) === JSON.stringify(newCur);
375
+ });
376
+ if (!~index) {
377
+ return pre.concat(cur);
327
378
  } else {
328
- this.isRepeat = false;
329
- this.isOpen = false;
379
+ return pre;
330
380
  }
381
+ }, []);
382
+ if (newArr.length !== this.value.length) {
383
+ this.isRepeat = true;
384
+ } else {
385
+ this.isRepeat = false;
386
+ this.isOpen = false;
331
387
  }
332
388
  } else {
333
389
  this.isOk = false;
@@ -336,10 +392,18 @@ export default create({
336
392
  setValues(tableData) {
337
393
  this.value = tableData.map(v => {
338
394
  let newV = { ...v };
339
- Object.keys(v).map(k => {
340
- const cellObj = this.columns.find(j => j.field === k);
341
- if (cellObj?.editRender?.name.includes('select')) {
342
- newV[k] = cellObj.editRender.options.find(q => q.value == v[k]).label;
395
+ Object.keys(v).forEach(k => {
396
+ if (!this.selectAttr || this.selectAttr.includes(k)) {
397
+ const cellObj = this.columns.find(j => j.field === k);
398
+ if (cellObj?.editRender?.name.includes('select')) {
399
+ newV[k] = cellObj.editRender.options.find(q => q.value == v[k])?.label || '';
400
+ }
401
+ if (cellObj?.slots?.edit) {
402
+ newV[k] = cellObj.editRender.options.find(q => q.value == v[k])?.label || '';
403
+ }
404
+ }
405
+ if (this.selectAttr && !this.selectAttr.includes(k)) {
406
+ delete newV[k];
343
407
  }
344
408
  });
345
409
  if (newV.id) delete newV.id;
@@ -354,6 +418,9 @@ export default create({
354
418
  await $table.remove(tableData[index]);
355
419
  this.value = value;
356
420
  }
421
+ },
422
+ beforeDestroy() {
423
+ document.removeEventListener('mouseup', this.handlerMouseUp, true);
357
424
  }
358
425
  });
359
426
  </script>
@@ -404,6 +471,13 @@ export default create({
404
471
  font-size: 14px;
405
472
  }
406
473
  }
474
+
475
+ .ant-select-selection--single {
476
+ height: 28px;
477
+ .ant-select-selection__rendered {
478
+ line-height: 28px;
479
+ }
480
+ }
407
481
  }
408
482
  .vxe-cell .vxe-default-input,
409
483
  .vxe-cell .vxe-default-select,
@@ -415,17 +489,6 @@ export default create({
415
489
  height: 28px;
416
490
  }
417
491
  }
418
- // @{deep} .ant-pagination-prev,
419
- // @{deep} .ant-pagination-next,
420
- // @{deep} .ant-pagination-jump-prev,
421
- // @{deep} .ant-pagination-item,
422
- // @{deep} .ant-pagination-options-quick-jumper,
423
- // @{deep} .ant-select-selection--single,
424
- // @{deep} .ant-pagination-jump-next {
425
- // min-width: 30px;
426
- // height: 30px;
427
- // line-height: 30px;
428
- // }
429
492
  @{deep} .table-select .ant-pagination-item-active a {
430
493
  color: #5585f5 !important;
431
494
  }
@@ -139,7 +139,8 @@
139
139
  @input="$emit('input', $event.target.value)"
140
140
  >
141
141
  <a-button slot="enterButton" type="primary">
142
- <svg-icon icon-class="xitongtubiaosousuo"></svg-icon>
142
+ <a-icon type="search" />
143
+ <!-- <svg-icon icon-class="xitongtubiaosousuo"></svg-icon> -->
143
144
  </a-button>
144
145
  </a-input-search>
145
146
  </li>
@@ -218,7 +219,6 @@
218
219
  <template v-if="item.type == 'ADD' || item.type == 'BATCH'">
219
220
  <a-button
220
221
  v-show="visibleBtn(item) && !item.isHide"
221
- v-preventReClick
222
222
  @click.prevent.stop="showDrawer(item, j)"
223
223
  class="btn-custom-class"
224
224
  style="margin: 0 8px 8px 0"
@@ -250,7 +250,6 @@
250
250
  <template v-else-if="isShowRowTileBtnItem(item)">
251
251
  <a-button
252
252
  v-show="visibleBtn(item) && !item.isHide"
253
- v-preventReClick
254
253
  @click.prevent.stop="clickBtn(clickRowData, item, clickRowData.my_index, undefined, j)"
255
254
  class="btn-custom-class"
256
255
  style="margin: 0 8px 8px 0"
@@ -337,7 +336,6 @@
337
336
  <!-- 行内编辑对应生成的(保存、取消)按钮 -->
338
337
  <template v-if="visibleInlineOperateBtn">
339
338
  <a-button
340
- v-preventReClick
341
339
  :style="{ display: isInlineOperating ? 'inline-block' : 'none' }"
342
340
  @click="inlineEditClick"
343
341
  class="btn-custom-class"
@@ -346,7 +344,7 @@
346
344
  >
347
345
  保存
348
346
  </a-button>
349
- <a-button v-preventReClick :style="{ display: isInlineOperating ? 'inline-block' : 'none' }" @click="inlineEditCancel" class="btn-custom-class" style="margin: 0 8px 8px 0">
347
+ <a-button :style="{ display: isInlineOperating ? 'inline-block' : 'none' }" @click="inlineEditCancel" class="btn-custom-class" style="margin: 0 8px 8px 0">
350
348
  取消
351
349
  </a-button>
352
350
  </template>
@@ -373,6 +371,9 @@
373
371
  * 3、右侧快速弹框保存搜索函数onSave(obj);
374
372
  * 完整例子:<BaseSearch :onSearch='onSearch' @changeSearch='changeSearch' @onSave='onSave'/>
375
373
  */
374
+ import moment from 'moment';
375
+ import 'moment/locale/zh-cn';
376
+
376
377
  import _ from 'lodash';
377
378
  import vexutils from '@/utils/vexutils';
378
379
  import { Button, Icon, Dropdown, Select, Upload, DatePicker, Input, Menu } from 'ant-design-vue';
@@ -423,6 +424,18 @@ const EVALUATEList = [
423
424
  }
424
425
  ];
425
426
 
427
+ const BTNOBJ = {
428
+ // 按钮icon 映射
429
+ copy: 'copy',
430
+ pencil: 'edit',
431
+ delete: 'delete',
432
+ add: 'plus-circle',
433
+ download: 'download',
434
+ label: 'tag',
435
+ queding: 'check',
436
+ del: 'close'
437
+ };
438
+
426
439
  export default create({
427
440
  name: 'base-search',
428
441
  mixins: [durationMixin, $utils, filterApiFn, tableSearchCon],
@@ -439,7 +452,10 @@ export default create({
439
452
  paramsData: Object,
440
453
  // downLoad: Function,
441
454
  showButtonTop: [String, Number],
442
- showSettings: Object,
455
+ showSettings: {
456
+ type: Object,
457
+ default: ()=>({})
458
+ },
443
459
  clickRowData: Object,
444
460
  value: String,
445
461
  searchFieldList: {
@@ -559,6 +575,7 @@ export default create({
559
575
  [Select.name]: Select,
560
576
  [Upload.name]: Upload,
561
577
  [DatePicker.name]: DatePicker,
578
+ [DatePicker.RangePicker.name]: DatePicker.RangePicker,
562
579
  [Input.name]: Input,
563
580
  [Input.Search.name]: Input.Search,
564
581
  [Menu.name]: Menu,
@@ -659,7 +676,7 @@ export default create({
659
676
  return function(item) {
660
677
  if (!item.showTime) return false;
661
678
  return {
662
- defaultValue: [this.$moment('00:00:00', 'HH:mm:ss'), this.$moment('23:59:59', 'HH:mm:ss')]
679
+ defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')]
663
680
  };
664
681
  };
665
682
  },
@@ -755,7 +772,8 @@ export default create({
755
772
  printPrevFinish: false,
756
773
  printBtnPrevFnWatchTimeoutTimer: null,
757
774
  printBtn: {},
758
- groupBtnObj: {}
775
+ groupBtnObj: {},
776
+ btnObj: BTNOBJ
759
777
  };
760
778
  },
761
779
  created() {
@@ -1077,7 +1095,6 @@ export default create({
1077
1095
  _type_: btn.type
1078
1096
  };
1079
1097
  this.$emit('btnEvent', btnData);
1080
- this.handleTopBtnTracher(btn, j);
1081
1098
  },
1082
1099
 
1083
1100
  // 筛选分类相关的
@@ -1126,7 +1143,6 @@ export default create({
1126
1143
  return;
1127
1144
  }
1128
1145
  this.$emit('clickBtn', data, item, index);
1129
- this.handleTopBtnTracher(item, j);
1130
1146
  },
1131
1147
  clickGroupBtn(btn, j) {
1132
1148
  this.clickBtn(this.clickRowData, btn, this.clickRowData.my_index, undefined, j);
@@ -1174,18 +1190,6 @@ export default create({
1174
1190
  this.$nextTick(() => {
1175
1191
  this.formatRowBtnList();
1176
1192
  });
1177
-
1178
- if (f != -1) {
1179
- let cur = this.viewList[f];
1180
- // 埋点
1181
- this.$_handleTracherLog('切换列表视图', {
1182
- 列表ID: this.tableId || '',
1183
- 列表名称: this.tableName || this.$attrs?.tableName || '',
1184
- 列表视图ID: cur?.id,
1185
- 列表视图名称: cur?.name,
1186
- 列表视图位置顺序: f
1187
- });
1188
- }
1189
1193
  },
1190
1194
  isShowSetting(v) {
1191
1195
  if (v == 'hideSettingBtn') {
@@ -1629,6 +1633,10 @@ export default create({
1629
1633
  if (!Array.isArray(arr)) return;
1630
1634
  arr.forEach(el => {
1631
1635
  el.setting = typeof el.setting == 'string' ? JSON.parse(el.setting) : el.setting;
1636
+ // 兼容处理
1637
+ if(!el.settingObj && typeof el.setting === 'object'){
1638
+ el.settingObj = el.setting
1639
+ }
1632
1640
  const attr = el?.settingObj?.attr || '';
1633
1641
  // 映射优先级最高
1634
1642
  if (el.setting?.showSetting?.length) {
@@ -382,11 +382,13 @@
382
382
  v-if="hideConditionChangeBtn != 1"
383
383
  >
384
384
  <a-icon type="swap" />
385
- {{ $t("1.1.5.2") }}
385
+ <!-- {{ $t("1.1.5.2") }} -->
386
+ 切换
386
387
  </span>
387
388
  <span @click="handleSettingShow" v-if="hideConditionChangeSetting != 1">
388
389
  <a-icon type="setting" />
389
- {{ $t("1.1.5.3") }}
390
+ <!-- {{ $t("1.1.5.3") }} -->
391
+ 设置
390
392
  </span>
391
393
  </div>
392
394
  </div>
@@ -987,6 +989,8 @@ export default create({
987
989
  this.tabConditionList = conditionMapTemp.tabConditionList || []; // 获取页签tab
988
990
  this.tabIndex = conditionMapTemp.tabConditionList && conditionMapTemp.tabConditionList.findIndex(item => item.isDefault); // 查询默认选中的标签
989
991
  // }
992
+ // TODO:
993
+ // this.getTableCondiTionList()
990
994
  if (this.$attrs.tableOptions?.filterCondition?.displayCategory && first) {
991
995
  resolve({
992
996
  name: this.$attrs.tableOptions?.filterCondition?.name,
@@ -7,7 +7,7 @@
7
7
  :maxTagCount="handleMaxTagCount"
8
8
  :maxTagPlaceholder="handleMaxTag(item)"
9
9
  showSearch
10
- :filterOption="$utils.filterOption"
10
+ :filterOption="filterOption"
11
11
  v-model="item.value"
12
12
  @search="handleWordBookSearch($event, item)"
13
13
  @dropdownVisibleChange="dropdownVisibleChange($event, item)"
@@ -237,8 +237,10 @@ import utils from '@/utils/utils-map';
237
237
  import FIELDTYPELIST from './fieldTypeList';
238
238
  import svgIcon from '@/component/svg/index.vue';
239
239
  import create from '@/core/create';
240
+ import { filterApiFn } from '~/table-filter/src/mixins/mixins';
240
241
  export default create({
241
242
  name: 'search-condition',
243
+ mixins: [filterApiFn],
242
244
  props: {
243
245
  isSee: Boolean,
244
246
  visible: Boolean,
@@ -1088,7 +1088,7 @@ export default create({
1088
1088
  wordbookType: wordbookType || "WORDBOOK",
1089
1089
  ...obj
1090
1090
  };
1091
- return this.axios.post(url, this.$qs.stringify(params)).then(res => {
1091
+ return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
1092
1092
  return res;
1093
1093
  });
1094
1094
  },
@@ -1411,14 +1411,6 @@ export default create({
1411
1411
  };
1412
1412
  this.saveTableCondiTion(params);
1413
1413
 
1414
- // 埋点
1415
- this.$_handleTracherLog("列表高级搜索保存到分类", {
1416
- 列表ID: this.$attrs?.tableId || "",
1417
- 列表名称: this.tableName || this.$attrs?.tableName || "",
1418
- 父级分类名称: displayCategory,
1419
- 子级分类名称: values.classname,
1420
- 查询条件: conObj
1421
- });
1422
1414
  });
1423
1415
  },
1424
1416
  handleParentNamesAdd(e) {
@@ -1472,19 +1464,30 @@ export default create({
1472
1464
  this.$message.error("该分类下有已有数据,请删除该分类下的筛选集后重试!");
1473
1465
  },
1474
1466
  // 7.12保存列表搜索分类
1475
- saveTableCondiTion(params) {
1476
- let url = `/tableList/saveTableCondiTion`;
1477
- this.axios.post(url, this.$qs.stringify(params)).then(({ data }) => {
1478
- if (data.result == "SUCCESS") {
1479
- this.showInner = false;
1480
- this.formInner.resetFields();
1481
- this.$emit("updateTableCondiTion");
1482
- this.clearData();
1483
- this.closeModal();
1484
- } else {
1485
- this.$message.error(data.resultMsg);
1486
- }
1487
- });
1467
+ async saveTableCondiTion(params) {
1468
+ // let url = `/tableList/saveTableCondiTion`;
1469
+ // this.axios.post(url, this.$qs.stringify(params)).then(({ data }) => {
1470
+ // if (data.result == "SUCCESS") {
1471
+ // this.showInner = false;
1472
+ // this.formInner.resetFields();
1473
+ // this.$emit("updateTableCondiTion");
1474
+ // this.clearData();
1475
+ // this.closeModal();
1476
+ // } else {
1477
+ // this.$message.error(data.resultMsg);
1478
+ // }
1479
+ // });
1480
+ try {
1481
+ let res = await this.handleGetConfigApi(params, 'requestSaveTableCondiTion');
1482
+ if (!res) return;
1483
+ this.showInner = false;
1484
+ this.formInner.resetFields();
1485
+ this.$emit("updateTableCondiTion");
1486
+ this.clearData();
1487
+ this.closeModal();
1488
+ } catch (error) {
1489
+ console.log(error)
1490
+ }
1488
1491
  },
1489
1492
  cancelSaveToCalss() {
1490
1493
  this.showInner = false;
@@ -15,8 +15,8 @@ h3,
15
15
  h4,
16
16
  p,
17
17
  pre {
18
- margin: 0;
19
- padding: 0;
18
+ // margin: 0;
19
+ // padding: 0;
20
20
  }
21
21
  body {
22
22
  font-size: 14px;