fix: bug#10729、10738、10745、10734修复远程升级部分bug

This commit is contained in:
jackhoo_98 2023-03-22 20:39:03 +08:00
parent 470877eac6
commit cde14681e7
4 changed files with 26 additions and 18 deletions

View File

@ -237,6 +237,8 @@ const emit = defineEmits(['change']);
const id = props.data.id; const id = props.data.id;
const VersionOrder = props.data.versionOrder; const VersionOrder = props.data.versionOrder;
const VersionSign = props.data.sign;
const VersionUrl = props.data.url;
const formData: any = ref({ const formData: any = ref({
name: '', name: '',
@ -254,12 +256,14 @@ const extraValue: any = ref({});
const validatorSign = async (_: Record<string, any>, value: string) => { const validatorSign = async (_: Record<string, any>, value: string) => {
const { signMethod, url } = formData.value; const { signMethod, url } = formData.value;
if (value && !!signMethod && !!url && !extraValue.value) { if (id && VersionSign === value && VersionUrl === url) {
return extraValue.value[signMethod] !== value
? Promise.reject('签名不一致,请检查文件是否上传正确')
: Promise.resolve();
} else {
return Promise.resolve(); 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) => { const validatorVersionOrder = async (_: Record<string, any>, value: string) => {
@ -270,7 +274,9 @@ const validatorVersionOrder = async (_: Record<string, any>, value: string) => {
if (value && !!signMethod && productId) { if (value && !!signMethod && productId) {
const res = await validateVersion(productId, value); const res = await validateVersion(productId, value);
if (res.status === 200) { if (res.status === 200) {
return Promise.reject(res.result ? '版本序号已存在' : ''); return res.result
? Promise.reject('版本序号已存在')
: Promise.resolve();
} }
} }
} }

View File

@ -280,7 +280,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
if (!data) { if (!data) {
return []; return [];
} }
const Actions = [ const Actions: any = [
{ {
key: 'view', key: 'view',
text: '查看', text: '查看',
@ -292,7 +292,11 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
handlEye(data.errorReason); handlEye(data.errorReason);
}, },
}, },
{ ];
const { state, mode } = data;
if (mode.value === 'push' && state.value === 'failed') {
Actions.push({
key: 'update', key: 'update',
text: '重试', text: '重试',
tooltip: { tooltip: {
@ -305,8 +309,9 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
handlTry(data.id); handlTry(data.id);
}, },
}, },
}, });
]; }
return Actions; return Actions;
}; };

View File

@ -208,10 +208,4 @@ watch(
); );
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
.form {
.form-submit {
background-color: @primary-color !important;
}
}
</style>

View File

@ -143,7 +143,7 @@ const columns = [
key: 'createTime', key: 'createTime',
dataIndex: 'createTime', dataIndex: 'createTime',
search: { search: {
type: 'time', type: 'date',
}, },
width: 200, width: 200,
scopedSlots: true, scopedSlots: true,
@ -197,6 +197,9 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
{ {
key: 'delete', key: 'delete',
text: '删除', text: '删除',
tooltip: {
title: '删除',
},
popConfirm: { popConfirm: {
title: '确认删除?', title: '确认删除?',
okText: ' 确定', okText: ' 确定',