ol-base-components 3.2.1 → 3.2.2
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
package/src/App.vue
CHANGED
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
// timer: [],
|
|
140
140
|
// range: [10, 200],
|
|
141
141
|
},
|
|
142
|
-
|
|
142
|
+
tableSearch1: [
|
|
143
143
|
// {
|
|
144
144
|
// label: "数字区间",
|
|
145
145
|
// value: "range",
|
|
@@ -277,6 +277,81 @@ export default {
|
|
|
277
277
|
// inputType: "text"
|
|
278
278
|
// }
|
|
279
279
|
],
|
|
280
|
+
tableSearch: [
|
|
281
|
+
{
|
|
282
|
+
label: "选项1",
|
|
283
|
+
value: "code1",
|
|
284
|
+
inputType: "text",
|
|
285
|
+
compare: "contains",
|
|
286
|
+
children: [],
|
|
287
|
+
props: {},
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
label: "选项2",
|
|
291
|
+
value: "code2",
|
|
292
|
+
inputType: "number",
|
|
293
|
+
compare: "eq",
|
|
294
|
+
children: [],
|
|
295
|
+
props: {},
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
label: "选项3",
|
|
299
|
+
value: "code3",
|
|
300
|
+
inputType: "select",
|
|
301
|
+
compare: "eq",
|
|
302
|
+
children: [
|
|
303
|
+
{
|
|
304
|
+
key: 0,
|
|
305
|
+
value: "货位点",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
key: 1,
|
|
309
|
+
value: "环线载货通道点",
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
key: 2,
|
|
313
|
+
value: "其它载货通道点",
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
key: 3,
|
|
317
|
+
value: "提升机点",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
key: 4,
|
|
321
|
+
value: "充电点",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
key: 5,
|
|
325
|
+
value: "暂停位点",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
key: 6,
|
|
329
|
+
value: "提升机等待位",
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
key: 7,
|
|
333
|
+
value: "入库口",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
key: 8,
|
|
337
|
+
value: "出库口",
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
key: 9,
|
|
341
|
+
value: "地图外",
|
|
342
|
+
},
|
|
343
|
+
],
|
|
344
|
+
props: {},
|
|
345
|
+
optionSource: {
|
|
346
|
+
sourceType: "dict",
|
|
347
|
+
dictKey: "pointType",
|
|
348
|
+
apiUrl: "",
|
|
349
|
+
valueField: "id",
|
|
350
|
+
labelField: "name",
|
|
351
|
+
options: [],
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
],
|
|
280
355
|
customs: [
|
|
281
356
|
{
|
|
282
357
|
name: "选项1",
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
size="small"
|
|
60
60
|
placeholder="请选择类型"
|
|
61
61
|
@change="handleTypeChange(scope.row)"
|
|
62
|
-
disabled
|
|
62
|
+
:disabled="['number', 'picker'].includes(scope.row.inputType)"
|
|
63
63
|
>
|
|
64
64
|
<el-option label="文本输入" value="text" />
|
|
65
|
-
<el-option label="数字输入" value="number" />
|
|
65
|
+
<el-option label="数字输入" value="number" disabled />
|
|
66
66
|
<el-option label="下拉选择" value="select" />
|
|
67
|
-
<el-option label="日期选择" value="picker" />
|
|
67
|
+
<el-option label="日期选择" value="picker" disabled />
|
|
68
68
|
</el-select>
|
|
69
69
|
</template>
|
|
70
70
|
</el-table-column>
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
</el-select>
|
|
188
188
|
</el-form-item>
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
<el-form-item v-if="currentOptionConfig.sourceType === 'api'" label="文本字段">
|
|
191
191
|
<el-input v-model="currentOptionConfig.labelField" placeholder="如:name" />
|
|
192
192
|
</el-form-item>
|
|
193
193
|
|
|
@@ -447,6 +447,7 @@ export default {
|
|
|
447
447
|
}
|
|
448
448
|
this.$emit("save", this.configList);
|
|
449
449
|
this.dialogVisible = false;
|
|
450
|
+
console.log(`\x1b[36m\x1b[4mol插件-动态搜索框配置数据`, this.configList);
|
|
450
451
|
},
|
|
451
452
|
async loadItemOptionsForSave(item) {
|
|
452
453
|
if (!item.optionSource) return;
|
|
@@ -495,10 +495,15 @@ export default {
|
|
|
495
495
|
const filterConditions = [];
|
|
496
496
|
Object.keys(formSearch).forEach(key => {
|
|
497
497
|
const tempItem = this.formSearchData.tableSearch.find(item => item.value === key);
|
|
498
|
-
if (
|
|
498
|
+
if (
|
|
499
|
+
formSearch[key] !== undefined &&
|
|
500
|
+
formSearch[key] !== null &&
|
|
501
|
+
formSearch[key] !== "" &&
|
|
502
|
+
formSearch[key] != []
|
|
503
|
+
) {
|
|
499
504
|
filterConditions.push({
|
|
500
505
|
key: key,
|
|
501
|
-
|
|
506
|
+
values: Array.isArray(formSearch[key]) ? formSearch[key] : [formSearch[key]], //必须包数组,后端会统一处理
|
|
502
507
|
compare: tempItem && tempItem.compare ? tempItem.compare : "",
|
|
503
508
|
});
|
|
504
509
|
}
|
|
@@ -546,6 +551,7 @@ export default {
|
|
|
546
551
|
} else {
|
|
547
552
|
// 转成接口需要的结构filterConditions
|
|
548
553
|
const filterConditions = this.setFilterConditionsByFormSearch(this.formSearch) || [];
|
|
554
|
+
|
|
549
555
|
// 动态模式
|
|
550
556
|
this.$emit("handleSearch", this.formSearch, { filterConditions });
|
|
551
557
|
console.log(`\x1b[36m\x1b[4mol插件-动态搜索框查询`, this.formSearch, { filterConditions });
|
package/src/package/index.js
CHANGED
|
@@ -210,8 +210,6 @@ const components = [OlTable, OlSearch, OlCustomSearch, Dialog, OlForm, OlNumberR
|
|
|
210
210
|
const install = async function (Vue) {
|
|
211
211
|
// 设置全局数据
|
|
212
212
|
components.map(item => {
|
|
213
|
-
console.log(777, item);
|
|
214
|
-
|
|
215
213
|
Vue.component(`ol-${item.name}`, item);
|
|
216
214
|
});
|
|
217
215
|
consoleTooltip();
|