|
|
@ -34,7 +34,10 @@ |
|
|
|
:primary-col="parentPrimaryCol" |
|
|
|
:primary-col="parentPrimaryCol" |
|
|
|
:primary-key="parentPrimaryKey" |
|
|
|
:primary-key="parentPrimaryKey" |
|
|
|
:api="parentApi" |
|
|
|
:api="parentApi" |
|
|
|
:query-params="parentQueryParams" |
|
|
|
:query-params="{ |
|
|
|
|
|
|
|
...parentQueryParams, |
|
|
|
|
|
|
|
where: isNew ? null :`~not(${parentPrimaryKey},eq,${parentId})~or(${parentPrimaryKey},is,null)`, |
|
|
|
|
|
|
|
}" |
|
|
|
:is-public="isPublic" |
|
|
|
:is-public="isPublic" |
|
|
|
:tn="bt && bt.rtn" |
|
|
|
:tn="bt && bt.rtn" |
|
|
|
:password="password" |
|
|
|
:password="password" |
|
|
@ -165,13 +168,24 @@ export default { |
|
|
|
// : null |
|
|
|
// : null |
|
|
|
}, |
|
|
|
}, |
|
|
|
parentId() { |
|
|
|
parentId() { |
|
|
|
return this.pid ?? (this.value && this.parentMeta && this.parentMeta.columns.filter(c => c.pk).map(c => this.value[c._cn]).join('___')) |
|
|
|
return this.pid ?? |
|
|
|
|
|
|
|
((this.parentMeta.columns |
|
|
|
|
|
|
|
.filter(c => c._cn === (this.parentMeta && (this.parentMeta.columns.find(c => c.cn === this.bt.cn) || {})._cn)) |
|
|
|
|
|
|
|
.map(c => this.value[c._cn]).join('___')) || |
|
|
|
|
|
|
|
(this.value && this.parentMeta && this.parentMeta.columns.filter(c => c.pk).map(c => this.value[c._cn]).join('___'))) |
|
|
|
}, |
|
|
|
}, |
|
|
|
parentPrimaryCol() { |
|
|
|
parentPrimaryCol() { |
|
|
|
return this.parentMeta && (this.parentMeta.columns.find(c => c.pv) || {})._cn |
|
|
|
return this.parentMeta && (this.parentMeta.columns.find(c => c.pv) || {})._cn |
|
|
|
}, |
|
|
|
}, |
|
|
|
parentPrimaryKey() { |
|
|
|
parentPrimaryKey() { |
|
|
|
return this.parentMeta && (this.parentMeta.columns.find(c => c.pk) || {})._cn |
|
|
|
// ((this.parentMeta.columns |
|
|
|
|
|
|
|
// .filter(c => c._cn === (this.parentMeta && (this.parentMeta.columns.find(c => c.cn === this.bt.cn) || {})._cn)) |
|
|
|
|
|
|
|
// .map(c => this.value[c._cn]).join('___')) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log((this.parentMeta && (this.parentMeta.columns.find(c => c.cn === this.bt.cn) || {})._cn) || |
|
|
|
|
|
|
|
(this.parentMeta && (this.parentMeta.columns.find(c => c.pk) || {})._cn)) |
|
|
|
|
|
|
|
return (this.parentMeta && (this.parentMeta.columns.find(c => c.cn === this.bt.cn) || {})._cn) || |
|
|
|
|
|
|
|
(this.parentMeta && (this.parentMeta.columns.find(c => c.pk) || {})._cn) |
|
|
|
}, |
|
|
|
}, |
|
|
|
parentQueryParams() { |
|
|
|
parentQueryParams() { |
|
|
|
if (!this.parentMeta) { |
|
|
|
if (!this.parentMeta) { |
|
|
|