vue2-client 1.4.61 → 1.4.62
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -716,6 +716,10 @@ export default {
|
|
|
716
716
|
if (!this.selectDataShow) {
|
|
717
717
|
this.delKey(this.item, 'selectType', 'selectKey', 'lazyLoad', 'selectKeyName')
|
|
718
718
|
}
|
|
719
|
+
// 删除空的关联外键字段
|
|
720
|
+
if (!this.item.selectKeyName) {
|
|
721
|
+
delete this.item.selectKeyName
|
|
722
|
+
}
|
|
719
723
|
// 默认插槽就先删除
|
|
720
724
|
if (this.item.slot && (this.item.slot.type === 'default' || !this.item.slot.type)) { delete this.item.slot }
|
|
721
725
|
// 根据数据模式处理数据
|
|
@@ -313,15 +313,17 @@
|
|
|
313
313
|
:xxl="xxl">
|
|
314
314
|
<a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
|
|
315
315
|
<a-tree-select
|
|
316
|
-
v-model="
|
|
316
|
+
v-model="treeSelectValue"
|
|
317
317
|
:disabled="disabled"
|
|
318
318
|
:tree-data="getTreeData()"
|
|
319
|
-
:tree-checkable="mode === '查询'"
|
|
319
|
+
:tree-checkable="mode === '查询' && attr.queryType !== 'RIGHT_LIKE'"
|
|
320
320
|
:placeholder="'请选择' + attr.name"
|
|
321
321
|
:dropdown-style="{ maxHeight: '400px' }"
|
|
322
322
|
tree-node-filter-prop="label"
|
|
323
|
+
:show-checked-strategy="attr.queryType === 'RIGHT_LIKE' ? 'SHOW_ALL' : undefined"
|
|
323
324
|
allow-clear
|
|
324
|
-
class="tree-select"
|
|
325
|
+
class="tree-select"
|
|
326
|
+
@change="onTreeSelectChange">
|
|
325
327
|
</a-tree-select>
|
|
326
328
|
</a-form-model-item>
|
|
327
329
|
</x-form-col>
|
|
@@ -360,7 +362,9 @@ export default {
|
|
|
360
362
|
searchResult: '',
|
|
361
363
|
yearShowOne: false,
|
|
362
364
|
// moment
|
|
363
|
-
moment
|
|
365
|
+
moment,
|
|
366
|
+
// 树形选择框选中值
|
|
367
|
+
treeSelectValue: undefined
|
|
364
368
|
}
|
|
365
369
|
},
|
|
366
370
|
props: {
|
|
@@ -504,6 +508,20 @@ export default {
|
|
|
504
508
|
this.setParentSelectable(item.children)
|
|
505
509
|
}
|
|
506
510
|
})
|
|
511
|
+
},
|
|
512
|
+
// 选中树节点
|
|
513
|
+
onTreeSelectChange (value, label, extra) {
|
|
514
|
+
if (this.attr.queryType === 'RIGHT_LIKE') {
|
|
515
|
+
// 获取可用于模糊查询的组织机构字符串
|
|
516
|
+
let node = extra.triggerNode.$parent
|
|
517
|
+
while (node && node.label) {
|
|
518
|
+
label = node.label + '.' + label
|
|
519
|
+
node = node.$parent
|
|
520
|
+
}
|
|
521
|
+
this.form[this.attr.model] = label
|
|
522
|
+
} else {
|
|
523
|
+
this.form[this.attr.model] = value
|
|
524
|
+
}
|
|
507
525
|
}
|
|
508
526
|
}
|
|
509
527
|
}
|