This commit is contained in:
六如
2024-10-17 09:41:34 +08:00
parent 35b3e6489d
commit 17bc2d5ca8
15 changed files with 330 additions and 98 deletions

View File

@@ -38,7 +38,7 @@
<commons-logging.version>1.2</commons-logging.version> <commons-logging.version>1.2</commons-logging.version>
<validation-api.version>2.0.1.Final</validation-api.version> <validation-api.version>2.0.1.Final</validation-api.version>
<hibernate-validator.version>6.0.13.Final</hibernate-validator.version> <hibernate-validator.version>6.0.13.Final</hibernate-validator.version>
<fastmybatis.version>3.0.10</fastmybatis.version> <fastmybatis.version>3.0.11</fastmybatis.version>
</properties> </properties>
<dependencies> <dependencies>

View File

@@ -0,0 +1,26 @@
package com.gitee.sop.adminbackend.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Objects;
/**
* @author 六如
*/
@AllArgsConstructor
@Getter
public enum YesOrNoEnum {
YES(1),
NO(0);
private final int value;
public static YesOrNoEnum of(Integer value) {
return Objects.equals(value, YES.value) ? YES : NO;
}
public static YesOrNoEnum of(Boolean value) {
return Objects.equals(value, true) ? YES : NO;
}
}

View File

@@ -1,6 +1,7 @@
package com.gitee.sop.adminbackend.controller.isv; package com.gitee.sop.adminbackend.controller.isv;
import com.gitee.fastmybatis.core.PageInfo; import com.gitee.fastmybatis.core.PageInfo;
import com.gitee.fastmybatis.core.query.LambdaQuery;
import com.gitee.fastmybatis.core.query.Query; import com.gitee.fastmybatis.core.query.Query;
import com.gitee.fastmybatis.core.query.param.PageParam; import com.gitee.fastmybatis.core.query.param.PageParam;
import com.gitee.sop.adminbackend.common.RSATool; import com.gitee.sop.adminbackend.common.RSATool;
@@ -8,10 +9,13 @@ import com.gitee.sop.adminbackend.common.dto.StatusUpdateDTO;
import com.gitee.sop.adminbackend.common.req.StatusUpdateParam; import com.gitee.sop.adminbackend.common.req.StatusUpdateParam;
import com.gitee.sop.adminbackend.common.resp.Result; import com.gitee.sop.adminbackend.common.resp.Result;
import com.gitee.sop.adminbackend.controller.isv.req.IsvInfoAddParam; import com.gitee.sop.adminbackend.controller.isv.req.IsvInfoAddParam;
import com.gitee.sop.adminbackend.controller.isv.req.IsvInfoUpdateParam;
import com.gitee.sop.adminbackend.controller.isv.req.IsvKeysGenParam; import com.gitee.sop.adminbackend.controller.isv.req.IsvKeysGenParam;
import com.gitee.sop.adminbackend.dao.entity.IsvInfo; import com.gitee.sop.adminbackend.dao.entity.IsvInfo;
import com.gitee.sop.adminbackend.service.isv.IsvInfoService; import com.gitee.sop.adminbackend.service.isv.IsvInfoService;
import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoAddDTO; import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoAddDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoUpdateDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvKeysDTO; import com.gitee.sop.adminbackend.service.isv.dto.IsvKeysDTO;
import com.gitee.sop.adminbackend.util.CopyUtil; import com.gitee.sop.adminbackend.util.CopyUtil;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@@ -35,7 +39,6 @@ public class IsvInfoController {
private IsvInfoService isvInfoService; private IsvInfoService isvInfoService;
/** /**
* 分页查询 * 分页查询
* *
@@ -43,10 +46,10 @@ public class IsvInfoController {
* @return * @return
*/ */
@GetMapping("/page") @GetMapping("/page")
public Result<PageInfo<IsvInfo>> page(PageParam param) { public Result<PageInfo<IsvInfoDTO>> page(PageParam param) {
Query query = param.toQuery(); LambdaQuery<IsvInfo> query = param.toLambdaQuery(IsvInfo.class);
PageInfo<IsvInfo> pageInfo = isvInfoService.page(query); PageInfo<IsvInfoDTO> isvInfoDTOPageInfo = isvInfoService.doPage(query);
return Result.ok(pageInfo); return Result.ok(isvInfoDTOPageInfo);
} }
/** /**
@@ -92,12 +95,13 @@ public class IsvInfoController {
/** /**
* 修改记录 * 修改记录
* *
* @param user 表单数据 * @param param 表单数据
* @return 返回影响行数 * @return 返回影响行数
*/ */
@PostMapping("/update") @PostMapping("/update")
public Result<Integer> update(@Validated @RequestBody IsvInfo user) { public Result<Integer> update(@Validated @RequestBody IsvInfoUpdateParam param) {
return Result.ok(isvInfoService.update(user)); IsvInfoUpdateDTO isvInfoUpdateDTO = CopyUtil.copyBean(param, IsvInfoUpdateDTO::new);
return Result.ok(isvInfoService.update(isvInfoUpdateDTO));
} }
/** /**

View File

@@ -3,8 +3,6 @@ package com.gitee.sop.adminbackend.controller.isv.req;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@@ -14,13 +12,6 @@ import javax.validation.constraints.NotNull;
@Data @Data
public class IsvInfoAddParam { public class IsvInfoAddParam {
/**
* 秘钥格式1PKCS8(JAVA适用)2PKCS1(非JAVA适用)
*/
@Min(value = 1, message = "秘钥格式错误")
@Max(value = 2, message = "秘钥格式错误")
private Integer keyFormat;
/** /**
* 1启用2禁用 * 1启用2禁用
*/ */

View File

@@ -1,26 +1,34 @@
package com.gitee.sop.adminbackend.service.isv; package com.gitee.sop.adminbackend.service.isv;
import com.gitee.fastmybatis.core.PageInfo;
import com.gitee.fastmybatis.core.query.LambdaQuery;
import com.gitee.fastmybatis.core.support.LambdaService; import com.gitee.fastmybatis.core.support.LambdaService;
import com.gitee.sop.adminbackend.common.RSATool; import com.gitee.sop.adminbackend.common.RSATool;
import com.gitee.sop.adminbackend.common.dto.StatusUpdateDTO; import com.gitee.sop.adminbackend.common.dto.StatusUpdateDTO;
import com.gitee.sop.adminbackend.common.enums.StatusEnum; import com.gitee.sop.adminbackend.common.enums.StatusEnum;
import com.gitee.sop.adminbackend.common.enums.YesOrNoEnum;
import com.gitee.sop.adminbackend.dao.entity.IsvInfo; import com.gitee.sop.adminbackend.dao.entity.IsvInfo;
import com.gitee.sop.adminbackend.dao.entity.IsvKeys; import com.gitee.sop.adminbackend.dao.entity.IsvKeys;
import com.gitee.sop.adminbackend.dao.entity.PermIsvRole; import com.gitee.sop.adminbackend.dao.entity.PermIsvRole;
import com.gitee.sop.adminbackend.dao.mapper.IsvInfoMapper; import com.gitee.sop.adminbackend.dao.mapper.IsvInfoMapper;
import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoAddDTO; import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoAddDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvInfoUpdateDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvKeysDTO; import com.gitee.sop.adminbackend.service.isv.dto.IsvKeysDTO;
import com.gitee.sop.adminbackend.service.isv.dto.IsvKeysGenDTO; import com.gitee.sop.adminbackend.service.isv.dto.IsvKeysGenDTO;
import com.gitee.sop.adminbackend.util.CopyUtil; import com.gitee.sop.adminbackend.util.CopyUtil;
import com.gitee.sop.adminbackend.util.IdGen; import com.gitee.sop.adminbackend.util.IdGen;
import org.apache.dubbo.common.utils.CollectionUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -35,6 +43,38 @@ public class IsvInfoService implements LambdaService<IsvInfo, IsvInfoMapper> {
@Resource @Resource
private PermIsvRoleService permIsvRoleService; private PermIsvRoleService permIsvRoleService;
public PageInfo<IsvInfoDTO> doPage(LambdaQuery<IsvInfo> query) {
PageInfo<IsvInfo> page = this.page(query);
List<IsvInfo> list = page.getList();
if (CollectionUtils.isEmpty(list)) {
return page.convert(isvInfo -> new IsvInfoDTO());
}
List<Long> idList = list.stream()
.map(IsvInfo::getId).collect(Collectors.toList());
Map<Long, IsvKeys> isvIdMap = isvKeysService.query()
.in(IsvKeys::getIsvId, idList)
.map(IsvKeys::getIsvId, Function.identity());
// 格式转换
return page.convert(isvInfo -> {
IsvInfoDTO isvInfoDTO = CopyUtil.copyBean(isvInfo, IsvInfoDTO::new);
boolean hasKey = false;
Optional<IsvKeys> isvKeysOpt = Optional.ofNullable(isvIdMap.get(isvInfo.getId()));
if (isvKeysOpt.isPresent()) {
IsvKeys isvKeys = isvKeysOpt.get();
hasKey = !StringUtils.isAllBlank(
isvKeys.getPrivateKeyIsv(),
isvKeys.getPrivateKeyPlatform(),
isvKeys.getPublicKeyIsv(),
isvKeys.getPublicKeyPlatform()
);
}
isvInfoDTO.setHasKeys(YesOrNoEnum.of(hasKey).getValue());
return isvInfoDTO;
});
}
public RSATool.KeyStore createKeys(RSATool.KeyFormat keyFormat) throws Exception { public RSATool.KeyStore createKeys(RSATool.KeyFormat keyFormat) throws Exception {
if (keyFormat == null) { if (keyFormat == null) {
keyFormat = RSATool.KeyFormat.PKCS8; keyFormat = RSATool.KeyFormat.PKCS8;
@@ -45,36 +85,31 @@ public class IsvInfoService implements LambdaService<IsvInfo, IsvInfoMapper> {
/** /**
* 添加ISV * 添加ISV
*
* @param isvInfoAddDTO * @param isvInfoAddDTO
* @return * @return 返回id
* @throws Exception
*/ */
@Transactional(rollbackFor = Exception.class) public long add(IsvInfoAddDTO isvInfoAddDTO) {
public long add(IsvInfoAddDTO isvInfoAddDTO) throws Exception {
IsvInfo rec = CopyUtil.copyBean(isvInfoAddDTO, IsvInfo::new); IsvInfo rec = CopyUtil.copyBean(isvInfoAddDTO, IsvInfo::new);
String appKey = new SimpleDateFormat("yyyyMMdd").format(new Date()) + IdGen.nextId(); String appKey = new SimpleDateFormat("yyyyMMdd").format(new Date()) + IdGen.nextId();
rec.setAppId(appKey); rec.setAppId(appKey);
rec.setStatus(StatusEnum.ENABLE.getStatus()); rec.setStatus(StatusEnum.ENABLE.getStatus());
this.save(rec); this.save(rec);
if (CollectionUtils.isNotEmpty(isvInfoAddDTO.getRoleCodes())) {
this.saveIsvRole(rec, isvInfoAddDTO.getRoleCodes());
}
// 生成秘钥
RSATool.KeyFormat keyFormat = RSATool.KeyFormat.of(isvInfoAddDTO.getKeyFormat());
IsvKeysGenDTO isvKeysGenVO = this.createIsvKeys(keyFormat);
IsvKeys isvKeys = new IsvKeys();
isvKeys.setIsvId(rec.getId());
CopyUtil.copyPropertiesIgnoreNull(isvKeysGenVO, isvKeys);
isvKeysService.save(isvKeys);
return rec.getId(); return rec.getId();
} }
public int update(IsvInfoUpdateDTO isvInfoUpdateDTO) {
return this.query()
.eq(IsvInfo::getId, isvInfoUpdateDTO.getId())
.set(IsvInfo::getStatus, isvInfoUpdateDTO.getStatus())
.set(IsvInfo::getRemark, isvInfoUpdateDTO.getRemark())
.update();
}
private void saveIsvRole(IsvInfo isvInfo, List<String> roleCodeList) { private void saveIsvRole(IsvInfo isvInfo, List<String> roleCodeList) {
Long isvId = isvInfo.getId(); Long isvId = isvInfo.getId();
permIsvRoleService.query() permIsvRoleService.deleteByColumn(PermIsvRole::getIsvId, isvId);
.eq(PermIsvRole::getIsvId, isvId)
.delete();
List<PermIsvRole> tobeSaveList = roleCodeList.stream() List<PermIsvRole> tobeSaveList = roleCodeList.stream()
.map(roleCode -> { .map(roleCode -> {

View File

@@ -3,10 +3,7 @@ package com.gitee.sop.adminbackend.service.isv.dto;
import lombok.Data; import lombok.Data;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List;
/** /**
@@ -15,13 +12,6 @@ import java.util.List;
@Data @Data
public class IsvInfoAddDTO { public class IsvInfoAddDTO {
/**
* 秘钥格式1PKCS8(JAVA适用)2PKCS1(非JAVA适用)
*/
@Min(value = 1, message = "秘钥格式错误")
@Max(value = 2, message = "秘钥格式错误")
private Integer keyFormat;
/** /**
* 1启用2禁用 * 1启用2禁用
*/ */
@@ -34,9 +24,4 @@ public class IsvInfoAddDTO {
@Length(max = 500) @Length(max = 500)
private String remark; private String remark;
/**
* 角色code
*/
private List<String> roleCodes;
} }

View File

@@ -0,0 +1,45 @@
package com.gitee.sop.adminbackend.service.isv.dto;
import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.PkStrategy;
import com.gitee.fastmybatis.annotation.Table;
import lombok.Data;
import java.time.LocalDateTime;
/**
*
* @author 六如
*/
@Data
public class IsvInfoDTO {
private Long id;
/**
* appKey
*/
private String appId;
/**
* 1启用2禁用
*/
private Integer status;
/**
* 是否有秘钥
*/
private Integer hasKeys;
/**
* 备注
*/
private String remark;
private LocalDateTime addTime;
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,13 @@
package com.gitee.sop.adminbackend.service.isv.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author 六如
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class IsvInfoUpdateDTO extends IsvInfoAddDTO {
private Long id;
}

View File

@@ -1,11 +1,11 @@
export type Result = { export interface Result {
success: boolean; success: boolean;
data: object; data: object;
msg: ""; msg: "";
code: ""; code: "";
}; }
export type PageResult = { export interface PageResult {
success: boolean; success: boolean;
msg: ""; msg: "";
code: ""; code: "";
@@ -13,4 +13,4 @@ export type PageResult = {
total: 0; total: 0;
list: Array<any>; list: Array<any>;
}; };
}; }

View File

@@ -1,8 +1,7 @@
import { computed, type Ref, ref } from "vue"; import { ref } from "vue";
import { import {
type ButtonsCallBackParams, type ButtonsCallBackParams,
type FieldValues, type FieldValues,
type OptionsRow,
type PageInfo, type PageInfo,
type PlusColumn, type PlusColumn,
useTable useTable
@@ -10,6 +9,7 @@ import {
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { KeyFormatEnum, StatusEnum } from "@/model/enums"; import { KeyFormatEnum, StatusEnum } from "@/model/enums";
import { api } from "@/api/isvList"; import { api } from "@/api/isvList";
import { settingKeys } from "@/views/isv/list/isvKeys";
const isAdd = ref(false); const isAdd = ref(false);
@@ -17,10 +17,8 @@ const isAdd = ref(false);
// 查询表单对象 // 查询表单对象
export const searchFormData = ref({ export const searchFormData = ref({
id: "",
appId: "", appId: "",
status: "", status: "",
remark: "",
pageIndex: 1, pageIndex: 1,
pageSize: 10 pageSize: 10
}); });
@@ -121,7 +119,6 @@ actionButtons.value = [
props: { props: {
type: "primary" type: "primary"
}, },
show: computed(() => true),
onClick(params: ButtonsCallBackParams) { onClick(params: ButtonsCallBackParams) {
isAdd.value = false; isAdd.value = false;
editFormData.value = Object.assign({}, params.row); editFormData.value = Object.assign({}, params.row);
@@ -129,6 +126,16 @@ actionButtons.value = [
dlgShow.value = true; dlgShow.value = true;
} }
}, },
{
text: "设置秘钥",
code: "edit",
props: {
type: "primary"
},
onClick(params: ButtonsCallBackParams) {
settingKeys(params.row);
}
},
{ {
// 启用/禁用 // 启用/禁用
text: row => (row.status === StatusEnum.ENABLE ? "禁用" : "启用"), text: row => (row.status === StatusEnum.ENABLE ? "禁用" : "启用"),
@@ -177,15 +184,6 @@ const editFormDataGen = () => {
export const editFormData = ref<FieldValues>(editFormDataGen()); export const editFormData = ref<FieldValues>(editFormDataGen());
export const editFormRules = {}; export const editFormRules = {};
// options推荐写法
// 1. 定义一个 `ref`数组
const roleList: Ref<OptionsRow[]> = ref([]);
// 2. 异步函数获取到值赋值到 `ref`
const loadRole = async () => {
//
};
loadRole();
// 表单内容 // 表单内容
export const editFormColumns: PlusColumn[] = [ export const editFormColumns: PlusColumn[] = [
{ {
@@ -197,29 +195,29 @@ export const editFormColumns: PlusColumn[] = [
placeholder: "自动生成" placeholder: "自动生成"
} }
}, },
{ // {
label: "秘钥格式", // label: "秘钥格式",
prop: "keyFormat", // prop: "keyFormat",
valueType: "radio", // valueType: "radio",
options: [ // options: [
{ // {
label: "PKCS8(Java适用)", // label: "PKCS8(Java适用)",
value: KeyFormatEnum.PKCS8 // value: KeyFormatEnum.PKCS8
}, // },
{ // {
label: "PKCS1(非Java适用)", // label: "PKCS1(非Java适用)",
value: KeyFormatEnum.PKCS1 // value: KeyFormatEnum.PKCS1
} // }
] // ]
}, // },
{ // {
label: "角色", // label: "角色",
prop: "roleCodes", // prop: "roleCodes",
valueType: "checkbox", // valueType: "checkbox",
// options推荐写法 // // options推荐写法
// 3. 用 computed 返回 ref 的 value // // 3. 用 computed 返回 ref 的 value
options: computed(() => roleList.value) // options: computed(() => roleList.value)
}, // },
{ {
label: "状态", label: "状态",
prop: "status", prop: "status",

View File

@@ -23,6 +23,11 @@ import {
showKeysFormData, showKeysFormData,
viewKeys viewKeys
} from "./showKeys"; } from "./showKeys";
import {
dlgKeysSetting,
settingKeysFormColumns,
settingKeysFormData
} from "@/views/isv/list/isvKeys";
</script> </script>
<template> <template>
<el-card shadow="never"> <el-card shadow="never">
@@ -39,7 +44,7 @@ import {
<PlusTable <PlusTable
:columns="tableColumns" :columns="tableColumns"
:table-data="tableData" :table-data="tableData"
:action-bar="{ buttons: actionButtons, width: 120 }" :action-bar="{ buttons: actionButtons, width: 190 }"
:pagination="{ :pagination="{
total, total,
modelValue: pageInfo, modelValue: pageInfo,
@@ -52,7 +57,14 @@ import {
<el-button type="primary" @click="handleAdd">新增</el-button> <el-button type="primary" @click="handleAdd">新增</el-button>
</template> </template>
<template #plus-cell-keys="scoped"> <template #plus-cell-keys="scoped">
<el-link type="primary" @click="viewKeys(scoped.row)">查看</el-link> <el-link
v-if="scoped.row.hasKeys"
type="primary"
@click="viewKeys(scoped.row)"
>
查看
</el-link>
<span v-else>未设置</span>
</template> </template>
</PlusTable> </PlusTable>
<PlusDialogForm <PlusDialogForm
@@ -68,12 +80,40 @@ import {
}" }"
@confirm="handleSave" @confirm="handleSave"
/> />
<!-- 查看秘钥 -->
<PlusDialogForm <PlusDialogForm
v-model:visible="dlgKeysShow" v-model:visible="dlgKeysShow"
v-model="showKeysFormData" v-model="showKeysFormData"
:dialog="{ title: '秘钥' }" :dialog="{ title: '秘钥' }"
:form="{ group: showKeysFormColumns, labelPosition: 'right' }" :form="{ group: showKeysFormColumns, labelPosition: 'right' }"
> >
<template #plus-field-privateKeyIsv>
<el-input
v-model="showKeysFormData.privateKeyIsv"
readonly
placeholder=""
/>
<el-button style="margin-top: 20px">重置ISV秘钥</el-button>
</template>
<template #dialog-footer="{ handleCancel }">
<el-button type="primary" @click="handleCancel">关闭</el-button>
</template>
</PlusDialogForm>
<!-- 设置秘钥 -->
<PlusDialogForm
v-model:visible="dlgKeysSetting"
v-model="settingKeysFormData"
:dialog="{ title: '秘钥' }"
:form="{ group: settingKeysFormColumns, labelPosition: 'right' }"
>
<template #plus-field-privateKeyIsv>
<el-input
v-model="showKeysFormData.privateKeyIsv"
readonly
placeholder=""
/>
<el-button style="margin-top: 20px">重置ISV秘钥</el-button>
</template>
<template #dialog-footer="{ handleCancel }"> <template #dialog-footer="{ handleCancel }">
<el-button type="primary" @click="handleCancel">关闭</el-button> <el-button type="primary" @click="handleCancel">关闭</el-button>
</template> </template>

View File

@@ -0,0 +1,12 @@
// options推荐写法
// 1. 定义一个 `ref`数组
import { type Ref, ref } from "vue";
import { type OptionsRow } from "plus-pro-components";
const groupList: Ref<OptionsRow[]> = ref([]);
// 2. 异步函数获取到值赋值到 `ref`
const loadGroup = async () => {
//
console.log(groupList);
};
loadGroup();

View File

@@ -0,0 +1,83 @@
import { ref } from "vue";
import type { PlusFormGroupRow } from "plus-pro-components";
import { CreditCard } from "@element-plus/icons-vue";
import { api } from "@/api/isvList";
// 弹窗显示
export const dlgKeysSetting = ref(false);
export const settingKeysFormData = ref<any>({
publicKeyIsv: "",
privateKeyIsv: "",
publicKeyPlatform: "",
privateKeyPlatform: ""
});
// 表单内容
export const settingKeysFormColumns: PlusFormGroupRow[] = [
{
title: "ISV公私钥 - 标识☆分配给开发者",
icon: CreditCard,
columns: [
{
label: "ISV公钥",
prop: "publicKeyIsv",
valueType: "textarea",
labelWidth: 100,
fieldProps: {
showWordLimit: false,
placeholder: "",
readonly: true,
autosize: { minRows: 2, maxRows: 4 }
}
},
{
label: "☆ISV私钥",
prop: "privateKeyIsv",
valueType: "textarea",
labelWidth: 100,
fieldProps: {
showWordLimit: false,
placeholder: "",
autosize: { minRows: 2, maxRows: 4 }
}
}
]
},
{
title: "平台公私钥 - 标识☆分配给开发者",
icon: CreditCard,
columns: [
{
label: "☆平台公钥",
prop: "publicKeyPlatform",
valueType: "textarea",
labelWidth: 100,
fieldProps: {
showWordLimit: false,
placeholder: "",
autosize: { minRows: 2, maxRows: 4 }
}
},
{
label: "平台私钥",
prop: "privateKeyPlatform",
valueType: "textarea",
labelWidth: 100,
fieldProps: {
showWordLimit: false,
placeholder: "",
autosize: { minRows: 2, maxRows: 4 }
}
}
]
}
];
export const settingKeys = (row: any) => {
const params = {
isvId: row.id
};
api.viewKeys(params).then(resp => {
settingKeysFormData.value = resp.data;
dlgKeysSetting.value = true;
});
};

View File

@@ -5,7 +5,7 @@ import { api } from "@/api/isvList";
// 弹窗显示 // 弹窗显示
export const dlgKeysShow = ref(false); export const dlgKeysShow = ref(false);
export const showKeysFormData = ref<object>({ export const showKeysFormData = ref<any>({
publicKeyIsv: "", publicKeyIsv: "",
privateKeyIsv: "", privateKeyIsv: "",
publicKeyPlatform: "", publicKeyPlatform: "",

View File

@@ -38,7 +38,7 @@
<commons-logging.version>1.2</commons-logging.version> <commons-logging.version>1.2</commons-logging.version>
<validation-api.version>2.0.1.Final</validation-api.version> <validation-api.version>2.0.1.Final</validation-api.version>
<hibernate-validator.version>6.0.13.Final</hibernate-validator.version> <hibernate-validator.version>6.0.13.Final</hibernate-validator.version>
<fastmybatis.version>3.0.10</fastmybatis.version> <fastmybatis.version>3.0.11</fastmybatis.version>
</properties> </properties>
<dependencies> <dependencies>