mirror of
https://github.com/certd/certd.git
synced 2026-05-17 22:07:34 +08:00
fix: 修复阿里云证书订单翻页问题
This commit is contained in:
@@ -43,6 +43,7 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
pager?: boolean;
|
pager?: boolean;
|
||||||
component?: any;
|
component?: any;
|
||||||
value?: any;
|
value?: any;
|
||||||
|
pageSize?: number;
|
||||||
}) {
|
}) {
|
||||||
const title = opts?.title || "请选择";
|
const title = opts?.title || "请选择";
|
||||||
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
|
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
|
||||||
@@ -71,6 +72,7 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
search,
|
search,
|
||||||
pager,
|
pager,
|
||||||
multi,
|
multi,
|
||||||
|
pageSize: opts?.pageSize,
|
||||||
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
||||||
...opts.component,
|
...opts.component,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ const props = defineProps<
|
|||||||
search?: boolean;
|
search?: boolean;
|
||||||
pager?: boolean;
|
pager?: boolean;
|
||||||
multi?: boolean;
|
multi?: boolean;
|
||||||
|
pageSize?: number;
|
||||||
} & ComponentPropsType
|
} & ComponentPropsType
|
||||||
>();
|
>();
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ const loading = ref(false);
|
|||||||
const pagerRef: Ref = ref({
|
const pagerRef: Ref = ref({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 100,
|
pageSize: props.pageSize || 100,
|
||||||
});
|
});
|
||||||
const getOptions = async () => {
|
const getOptions = async () => {
|
||||||
if (loading.value) {
|
if (loading.value) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { SiteInfoService } from '../../../modules/monitor/index.js';
|
|||||||
import { HistoryService } from '../../../modules/pipeline/service/history-service.js';
|
import { HistoryService } from '../../../modules/pipeline/service/history-service.js';
|
||||||
import { PipelineService } from '../../../modules/pipeline/service/pipeline-service.js';
|
import { PipelineService } from '../../../modules/pipeline/service/pipeline-service.js';
|
||||||
import { AuthService } from '../../../modules/sys/authority/service/auth-service.js';
|
import { AuthService } from '../../../modules/sys/authority/service/auth-service.js';
|
||||||
|
import { PipelineEntity } from '../../../modules/pipeline/entity/pipeline.js';
|
||||||
|
|
||||||
|
|
||||||
const pipelineExample = `
|
const pipelineExample = `
|
||||||
@@ -183,21 +184,15 @@ export class PipelineController extends CrudController<PipelineService> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @Post('/add', { description: Constants.per.authOnly })
|
@Post('/add', { description: Constants.per.authOnly })
|
||||||
// async add(@Body(ALL) bean: PipelineEntity) {
|
async add(@Body(ALL) bean: PipelineEntity) {
|
||||||
// const { projectId, userId } = await this.getProjectUserIdWrite()
|
return await this.save(bean as any);
|
||||||
// bean.userId = userId
|
}
|
||||||
// bean.projectId = projectId
|
|
||||||
// return super.add(bean);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Post('/update', { description: Constants.per.authOnly })
|
@Post('/update', { description: Constants.per.authOnly })
|
||||||
// async update(@Body(ALL) bean) {
|
async update(@Body(ALL) bean) {
|
||||||
// await this.checkOwner(this.getService(), bean.id,"write",true);
|
return await this.save(bean);
|
||||||
// delete bean.userId;
|
}
|
||||||
// delete bean.projectId;
|
|
||||||
// return super.update(bean);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Post('/save', { description: Constants.per.authOnly, summary: '新增/更新流水线' })
|
@Post('/save', { description: Constants.per.authOnly, summary: '新增/更新流水线' })
|
||||||
async save(@Body() bean: PipelineSaveDTO) {
|
async save(@Body() bean: PipelineSaveDTO) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
|
|||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "更新天数",
|
title: "更新天数",
|
||||||
|
value:20,
|
||||||
component: {
|
component: {
|
||||||
name: "a-input-number",
|
name: "a-input-number",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
|
|||||||
+43
-4
@@ -28,11 +28,36 @@ export class CertApplyGetFormAliyunPlugin extends CertApplyBasePlugin {
|
|||||||
})
|
})
|
||||||
accessId!: string;
|
accessId!: string;
|
||||||
|
|
||||||
|
|
||||||
|
@TaskInput(
|
||||||
|
{
|
||||||
|
title:"订单类型",
|
||||||
|
value:"CPACK",
|
||||||
|
component:{
|
||||||
|
name:"a-select",
|
||||||
|
vModel:"value",
|
||||||
|
options:[
|
||||||
|
{
|
||||||
|
label:"资源虚拟订单(一般选这个)",
|
||||||
|
value:"CPACK",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"售卖订单",
|
||||||
|
value:"BUY",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
orderType!: string;
|
||||||
|
|
||||||
|
|
||||||
@TaskInput(
|
@TaskInput(
|
||||||
createRemoteSelectInputDefine({
|
createRemoteSelectInputDefine({
|
||||||
title: "证书订单ID",
|
title: "证书订单ID",
|
||||||
helper: "订阅模式的证书订单Id",
|
helper: "订阅模式的证书订单Id",
|
||||||
typeName: "CertApplyGetFormAliyun",
|
typeName: "CertApplyGetFormAliyun",
|
||||||
|
pageSize: 50,
|
||||||
component: {
|
component: {
|
||||||
name: "RemoteSelect",
|
name: "RemoteSelect",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
@@ -140,6 +165,7 @@ export class CertApplyGetFormAliyunPlugin extends CertApplyBasePlugin {
|
|||||||
pathname: `/`,
|
pathname: `/`,
|
||||||
data: {
|
data: {
|
||||||
query: {
|
query: {
|
||||||
|
OrderType: this.orderType,
|
||||||
Status: "ISSUED",
|
Status: "ISSUED",
|
||||||
CurrentPage: pager.pageNo,
|
CurrentPage: pager.pageNo,
|
||||||
ShowSize : pager.pageSize,
|
ShowSize : pager.pageSize,
|
||||||
@@ -151,14 +177,27 @@ export class CertApplyGetFormAliyunPlugin extends CertApplyBasePlugin {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
return list.map((item: any) => {
|
const total = res.TotalCount || 0;
|
||||||
const label = `${item.Domain}<${item.OrderId}>`;
|
|
||||||
|
const records = list.map((item: any) => {
|
||||||
|
let value = item.OrderId;
|
||||||
|
let domain = item.Domain;
|
||||||
|
let label = `${item.Domain}<${item.OrderId}>`;
|
||||||
|
if (!item.OrderId) {
|
||||||
|
label = `${item.CommonName}<${item.Name}>`;
|
||||||
|
value = item.Name;
|
||||||
|
domain = item.CommonName;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
label: label,
|
label: label,
|
||||||
value: item.OrderId,
|
value: value,
|
||||||
Domain: item.Domain,
|
Domain: domain,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
return {
|
||||||
|
list:records,
|
||||||
|
total,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user