ol-base-components 3.2.8 → 3.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-base-components",
3
- "version": "3.2.8",
3
+ "version": "3.2.10",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
package/src/App.vue CHANGED
@@ -278,101 +278,42 @@ export default {
278
278
  // inputType: "text"
279
279
  // }
280
280
  ],
281
- tableSearch: [
282
- {
283
- label: "选项1",
284
- value: "code1",
285
- inputType: "text",
286
- compare: "contains",
287
- children: [],
288
- props: {},
289
- },
290
- {
291
- label: "选项2",
292
- value: "code2",
293
- inputType: "number",
294
- compare: "eq",
295
- children: [],
296
- props: {},
297
- },
298
- {
299
- label: "选项3",
300
- value: "code3",
301
- inputType: "select",
302
- compare: "eq",
303
- children: [
304
- {
305
- key: 0,
306
- value: "货位点",
307
- },
308
- {
309
- key: 1,
310
- value: "环线载货通道点",
311
- },
312
- {
313
- key: 2,
314
- value: "其它载货通道点",
315
- },
316
- {
317
- key: 3,
318
- value: "提升机点",
319
- },
320
- {
321
- key: 4,
322
- value: "充电点",
323
- },
324
- {
325
- key: 5,
326
- value: "暂停位点",
327
- },
328
- {
329
- key: 6,
330
- value: "提升机等待位",
331
- },
332
- {
333
- key: 7,
334
- value: "入库口",
335
- },
336
- {
337
- key: 8,
338
- value: "出库口",
339
- },
340
- {
341
- key: 9,
342
- value: "地图外",
343
- },
344
- ],
345
- props: {},
346
- optionSource: {
347
- sourceType: "dict",
348
- dictKey: "pointType",
349
- apiUrl: "",
350
- valueField: "id",
351
- labelField: "name",
352
- options: [],
353
- },
354
- },
355
- ],
281
+ tableSearch: [],
356
282
  customs: [
357
283
  {
358
- name: "选项1",
359
- key: "code1",
284
+ name: "库位编码",
360
285
  keyType: 1,
286
+ key: "WarehouseLocationCode",
287
+ enumName: null,
288
+ custom: false,
361
289
  },
362
290
  {
363
- name: "选项2",
364
- key: "code2",
365
- keyType: 2,
291
+ name: "使用状态",
292
+ keyType: 3,
293
+ key: "UsageStatus",
294
+ enumName: "usageStatusEnum",
295
+ custom: false,
366
296
  },
367
297
  {
368
- name: "选项3",
369
- key: "code3",
370
- keyType: 3,
298
+ name: "是否启用",
299
+ keyType: 1,
300
+ key: "Enabled",
301
+ enumName: null,
302
+ custom: false,
371
303
  },
372
304
  {
373
- name: "选项4",
374
- key: "code4",
305
+ name: "创建时间",
375
306
  keyType: 4,
307
+ key: "CreationTime",
308
+ enumName: null,
309
+ custom: false,
310
+ },
311
+ {
312
+ name: "备注",
313
+ keyType: 1,
314
+ key: "Remark",
315
+ enumName: null,
316
+ custom: false,
376
317
  },
377
318
  ],
378
319
  },
@@ -12,6 +12,10 @@
12
12
  export default {
13
13
  name: "customSearch",
14
14
  props: {
15
+ menuId: {
16
+ type: String,
17
+ default: "",
18
+ },
15
19
  formSearchData: {
16
20
  type: Object,
17
21
  default: () => {
@@ -63,10 +67,12 @@ export default {
63
67
  const menus = SET_MENUS;
64
68
  this.currentPageItem = handleMenu(menus, this);
65
69
 
70
+ const targetMenuId = this.menuId || (this.currentPageItem && this.currentPageItem.id);
71
+
66
72
  this.get({
67
73
  url: `/api/app/menu-search-setting/by-menu`,
68
74
  data: {
69
- sysMenuId: this.currentPageItem && this.currentPageItem.id,
75
+ sysMenuId: targetMenuId,
70
76
  },
71
77
  }).then(res => {
72
78
  if (res.code !== 200) return;
@@ -79,10 +85,12 @@ export default {
79
85
  },
80
86
  //保存
81
87
  onSave(configList) {
88
+ const targetMenuId = this.menuId || (this.currentPageItem && this.currentPageItem.id);
89
+
82
90
  this.post({
83
91
  url: `/api/app/menu-search-setting`,
84
92
  data: {
85
- sysMenuId: this.currentPageItem && this.currentPageItem.id,
93
+ sysMenuId: targetMenuId,
86
94
  settingJson: JSON.stringify(configList),
87
95
  },
88
96
  }).then(res => {
@@ -541,6 +541,13 @@ export default {
541
541
  row.props = {};
542
542
  }
543
543
  this.updateDatePickerProps(row);
544
+
545
+ const rangeTypes = ["daterange", "datetimerange", "monthrange"];
546
+ if (rangeTypes.includes(row.dateType)) {
547
+ row.compare = "range";
548
+ } else {
549
+ row.compare = "eq";
550
+ }
544
551
  },
545
552
  updateDatePickerProps(row) {
546
553
  const dateType = row.dateType || "date";
@@ -853,6 +860,11 @@ export default {
853
860
  valueFormat: "yyyy-MM-dd",
854
861
  format: "yyyy/MM/dd",
855
862
  };
863
+ } else if (custom.keyType === 3) {
864
+ newItem.optionSource = {
865
+ sourceType: "dict",
866
+ dictKey: custom.enumName,
867
+ };
856
868
  }
857
869
 
858
870
  this.configList.push(newItem);