This commit is contained in:
RB 2025-08-31 15:52:16 +08:00
parent 293e4c12fa
commit 323e031326
4 changed files with 11 additions and 6 deletions

2
@rbv

@ -1 +1 @@
Subproject commit 56d0fd01a7dca52bebcaed76f4083d4abba17eef
Subproject commit 653879f9b8c8cc59876618091fa14265edf7ece8

View file

@ -42,7 +42,7 @@ class DlgAssign extends RbModalHandler {
<div className="form-group row">
<label className="col-sm-3 col-form-label text-sm-right">{$L('选择相关记录')}</label>
<div className="col-sm-7">
<select className="form-control form-control-sm" ref={(c) => (this._$cascades = c)}>
<select className="form-control form-control-sm" ref={(c) => (this._$cascades = c)} multiple>
{(this.state.cascadesEntity || []).map((item) => {
if ($isSysMask(item[1])) return null
return (
@ -90,8 +90,10 @@ class DlgAssign extends RbModalHandler {
$(this._$cascades)
.select2({
multiple: true,
placeholder: $L('选择'),
language: {
noResults: () => $L('无'),
},
})
.val(defaultSelected)
.trigger('change')

View file

@ -225,7 +225,7 @@ class DeleteConfirm extends RbAlert {
<span className="custom-control-label"> {$L('同时删除相关记录')}</span>
</label>
<div className={this.state.enableCascade ? '' : 'hide'}>
<select className="form-control form-control-sm" ref={(c) => (this._cascades = c)} multiple>
<select className="form-control form-control-sm" ref={(c) => (this._$cascades = c)} multiple>
{(this.state.cascadesEntity || []).map((item) => {
if ($isSysMask(item[1])) return null
return (
@ -259,10 +259,13 @@ class DeleteConfirm extends RbAlert {
if (!this.state.cascadesEntity) {
$.get(`/commons/metadata/references?entity=${this.props.entity}&permission=D`, (res) => {
this.setState({ cascadesEntity: res.data }, () => {
this.__select2 = $(this._cascades)
this.__select2 = $(this._$cascades)
.select2({
placeholder: $L('选择'),
width: '88%',
language: {
noResults: () => $L('无'),
},
})
.val(null)
.trigger('change')

View file

@ -3582,7 +3582,7 @@ class RbFormRefform extends React.Component {
$.get(`/app/${props.entity}/view-model?id=${props.id}&layout=${this.props.speclayout || ''}`, (res) => {
// 有错误
if (res.error_code > 0 || !!res.data.error) {
const err = res.data.error || res.error_msg
const err = (res.data || {}).error || res.error_msg
this.setState({ formComponent: <div className="text-danger">{err}</div> })
return
}