fix: bug#10729、10738、10745、10734修复远程升级部分bug
This commit is contained in:
parent
470877eac6
commit
cde14681e7
|
@ -237,6 +237,8 @@ const emit = defineEmits(['change']);
|
|||
|
||||
const id = props.data.id;
|
||||
const VersionOrder = props.data.versionOrder;
|
||||
const VersionSign = props.data.sign;
|
||||
const VersionUrl = props.data.url;
|
||||
|
||||
const formData: any = ref({
|
||||
name: '',
|
||||
|
@ -254,12 +256,14 @@ const extraValue: any = ref({});
|
|||
|
||||
const validatorSign = async (_: Record<string, any>, value: string) => {
|
||||
const { signMethod, url } = formData.value;
|
||||
if (value && !!signMethod && !!url && !extraValue.value) {
|
||||
return extraValue.value[signMethod] !== value
|
||||
? Promise.reject('签名不一致,请检查文件是否上传正确')
|
||||
: Promise.resolve();
|
||||
} else {
|
||||
if (id && VersionSign === value && VersionUrl === url) {
|
||||
return Promise.resolve();
|
||||
} else {
|
||||
if (value && !!signMethod && !!url && !!extraValue.value) {
|
||||
return extraValue.value[signMethod] !== value
|
||||
? Promise.reject('签名不一致,请检查文件是否上传正确')
|
||||
: Promise.resolve();
|
||||
}
|
||||
}
|
||||
};
|
||||
const validatorVersionOrder = async (_: Record<string, any>, value: string) => {
|
||||
|
@ -270,7 +274,9 @@ const validatorVersionOrder = async (_: Record<string, any>, value: string) => {
|
|||
if (value && !!signMethod && productId) {
|
||||
const res = await validateVersion(productId, value);
|
||||
if (res.status === 200) {
|
||||
return Promise.reject(res.result ? '版本序号已存在' : '');
|
||||
return res.result
|
||||
? Promise.reject('版本序号已存在')
|
||||
: Promise.resolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,7 +280,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
if (!data) {
|
||||
return [];
|
||||
}
|
||||
const Actions = [
|
||||
const Actions: any = [
|
||||
{
|
||||
key: 'view',
|
||||
text: '查看',
|
||||
|
@ -292,7 +292,11 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
handlEye(data.errorReason);
|
||||
},
|
||||
},
|
||||
{
|
||||
];
|
||||
|
||||
const { state, mode } = data;
|
||||
if (mode.value === 'push' && state.value === 'failed') {
|
||||
Actions.push({
|
||||
key: 'update',
|
||||
text: '重试',
|
||||
tooltip: {
|
||||
|
@ -305,8 +309,9 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
handlTry(data.id);
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
return Actions;
|
||||
};
|
||||
|
||||
|
|
|
@ -208,10 +208,4 @@ watch(
|
|||
);
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.form {
|
||||
.form-submit {
|
||||
background-color: @primary-color !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
@ -143,7 +143,7 @@ const columns = [
|
|||
key: 'createTime',
|
||||
dataIndex: 'createTime',
|
||||
search: {
|
||||
type: 'time',
|
||||
type: 'date',
|
||||
},
|
||||
width: 200,
|
||||
scopedSlots: true,
|
||||
|
@ -197,6 +197,9 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
|||
{
|
||||
key: 'delete',
|
||||
text: '删除',
|
||||
tooltip: {
|
||||
title: '删除',
|
||||
},
|
||||
popConfirm: {
|
||||
title: '确认删除?',
|
||||
okText: ' 确定',
|
||||
|
|
Loading…
Reference in New Issue