This commit is contained in:
xiaojunnuo
2025-01-15 22:58:11 +08:00
parent 6877b865a7
commit 87620b9072
13 changed files with 130 additions and 68 deletions

View File

@@ -126,32 +126,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
show: false
}
},
"pipeline.title": {
title: "已关联流水线",
search: { show: false },
type: "link",
form: {
show: false
},
column: {
width: 280,
sorter: true,
component: {}
}
},
applyTime: {
title: "申请时间",
search: {
show: false
},
type: "datetime",
form: {
show: false
},
column: {
sorter: true
}
},
expiresTime: {
title: "过期时间",
search: {
@@ -175,18 +149,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}
}
},
fromType: {
title: "来源",
search: {
show: true
},
type: "text",
form: { show: false },
column: {
width: 100,
sorter: true
}
},
certProvider: {
title: "证书颁发机构",
search: {
@@ -197,7 +159,33 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
show: false
},
column: {
width: 400
width: 200
}
},
applyTime: {
title: "申请时间",
search: {
show: false
},
type: "datetime",
form: {
show: false
},
column: {
sorter: true
}
},
"pipeline.title": {
title: "已关联流水线",
search: { show: false },
type: "link",
form: {
show: false
},
column: {
width: 350,
sorter: true,
component: {}
}
}
}

View File

@@ -42,10 +42,11 @@ export function createApi() {
params: { id }
});
},
async ListAll() {
async GetApiToken(id: number) {
return await request({
url: apiPrefix + "/all",
method: "post"
url: apiPrefix + "/getApiToken",
method: "post",
data: { id }
});
}
};

View File

@@ -72,13 +72,30 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}
},
rowHandle: {
width: 200,
width: 300,
fixed: "right",
buttons: {
view: { show: true },
copy: { show: false },
edit: { show: false },
remove: { show: true }
remove: { show: true },
gen: {
text: "测试ApiToken",
async click({ row }) {
const apiToken = await api.GetApiToken(row.id);
Modal.info({
title: "ApiToken",
content: () => {
return (
<div>
<div>ApiKey如下3使</div>
<div>{apiToken}</div>
</div>
);
}
});
}
}
}
},
columns: {