fix: 资产分配权限为空问题

* fix: 资产分配权限为空问题

* fix: bug#17557、17299
This commit is contained in:
qiaochuLei 2023-08-16 17:22:52 +08:00 committed by GitHub
parent 5970fa368f
commit 402057b1d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 5 deletions

View File

@ -11,9 +11,14 @@
> >
<j-form layout="vertical" :model="inputData" ref="formRef"> <j-form layout="vertical" :model="inputData" ref="formRef">
<j-form-item <j-form-item
v-if="inputData.status"
label="kafka地址" label="kafka地址"
name="address" name="address"
:rules="[ :rules="[
{
required: true,
message: '请输入topic',
},
{ {
max: 64, max: 64,
message: '最多输入64个字符', message: '最多输入64个字符',
@ -26,9 +31,14 @@
></j-input> ></j-input>
</j-form-item> </j-form-item>
<j-form-item <j-form-item
v-if="inputData.status"
label="topic" label="topic"
name="topic" name="topic"
:rules="[ :rules="[
{
required: true,
message: '请输入topic',
},
{ {
max: 64, max: 64,
message: '最多输入64个字符', message: '最多输入64个字符',

View File

@ -312,8 +312,8 @@ const table: any = {
(perResp: any) => { (perResp: any) => {
data.forEach((item) => { data.forEach((item) => {
item.permissionList = perResp.result item.permissionList = perResp.result
.find((f: any) => f.assetId === item.id) .find((f: any) => f?.assetId === item.id)
.permissionInfoList?.map((m: any) => ({ ?.permissionInfoList?.map((m: any) => ({
label: m.name, label: m.name,
value: m.id, value: m.id,
disabled: true, disabled: true,
@ -321,13 +321,13 @@ const table: any = {
item.selectPermissions = ['read']; item.selectPermissions = ['read'];
// //
item.permissionList = item.permissionList item.permissionList = item.permissionList
.map((m: any) => { ?.map((m: any) => {
return { return {
...m, ...m,
idx: idxMap[m.value], idx: idxMap[m.value],
}; };
}) })
.sort((a: any, b: any) => a.idx - b.idx); ?.sort((a: any, b: any) => a.idx - b.idx);
// //
if (props.assetType === 'product') { if (props.assetType === 'product') {
item.state = { item.state = {

View File

@ -165,7 +165,6 @@ const search = debounce(() => {
function dig(_data: any[]): any { function dig(_data: any[]): any {
const pIds: string[] = []; const pIds: string[] = [];
expandedKeys.value = []
if (!_data.length) return; if (!_data.length) return;
_data.forEach((item) => { _data.forEach((item) => {
if (treeMap.has(item)) { if (treeMap.has(item)) {