fix: 运维管理 证书管理修复部分bug,远程升级修复部分bug
This commit is contained in:
parent
b11d8eaa0d
commit
f85bb9fc82
|
|
@ -225,9 +225,9 @@ const changeValue = (index: number, type: string) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeCheckbox = (index: number, type: string) => {
|
const changeCheckbox = async (index: number, type: string) => {
|
||||||
// console.log(1, getTargetData(index, type).check,getTargetData(index, type));
|
// console.log(1, getTargetData(index, type).check,getTargetData(index, type));
|
||||||
//如果不使用setTimeout,会导致值更新不及时
|
//Dom未更新完成,需要用 setTimeout 或者 await nextTick() 处理
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// console.log(2, getTargetData(index, type).check,getTargetData(index, type));
|
// console.log(2, getTargetData(index, type).check,getTargetData(index, type));
|
||||||
let startIndex = 0;
|
let startIndex = 0;
|
||||||
|
|
@ -235,8 +235,8 @@ const changeCheckbox = (index: number, type: string) => {
|
||||||
const currentCheck = getTargetData(index, type).check;
|
const currentCheck = getTargetData(index, type).check;
|
||||||
if (!currentCheck) return;
|
if (!currentCheck) return;
|
||||||
for (let i = index; i >= 0; i--) {
|
for (let i = index; i >= 0; i--) {
|
||||||
const preDatCheck = getTargetData(i, type).check;
|
const preDataCheck = getTargetData(i, type).check;
|
||||||
if (!preDatCheck) {
|
if (!preDataCheck) {
|
||||||
startIndex = i;
|
startIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ 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) {
|
||||||
Promise.reject(res.result ? '版本序号已存在' : '');
|
return Promise.reject(res.result ? '版本序号已存在' : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
>
|
>
|
||||||
<Search
|
<pro-search
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
target="search"
|
target="search"
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
|
|
@ -44,6 +44,7 @@
|
||||||
>
|
>
|
||||||
<template #headerTitle>
|
<template #headerTitle>
|
||||||
<j-checkbox
|
<j-checkbox
|
||||||
|
v-if="checkAllData.length !== 0"
|
||||||
v-model:checked="state.checkAll"
|
v-model:checked="state.checkAll"
|
||||||
:indeterminate="state.indeterminate"
|
:indeterminate="state.indeterminate"
|
||||||
@change="onCheckAllChange"
|
@change="onCheckAllChange"
|
||||||
|
|
@ -194,7 +195,11 @@ const onCheckAllChange = (e: any) => {
|
||||||
_selectedRowKeys.value = state.checkedList;
|
_selectedRowKeys.value = state.checkedList;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSelectChange = (record: T[], selected: boolean, selectedRows: T[]) => {
|
const onSelectChange = (
|
||||||
|
record: T[any],
|
||||||
|
selected: boolean,
|
||||||
|
selectedRows: T[any],
|
||||||
|
) => {
|
||||||
_selectedRowKeys.value = selected
|
_selectedRowKeys.value = selected
|
||||||
? [...getSetRowKey(selectedRows)]
|
? [...getSetRowKey(selectedRows)]
|
||||||
: _selectedRowKeys.value.filter((item: T) => item !== record?.id);
|
: _selectedRowKeys.value.filter((item: T) => item !== record?.id);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<page-container>
|
<page-container>
|
||||||
<Search :columns="columns" target="search" @search="handleSearch" />
|
<pro-search :columns="columns" target="search" @search="handleSearch" />
|
||||||
<j-pro-table
|
<j-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
model="TABLE"
|
model="TABLE"
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,35 @@
|
||||||
<template>
|
<template>
|
||||||
<j-spin :spinning="loading">
|
<j-spin :spinning="loading">
|
||||||
<div>
|
<j-textarea
|
||||||
<j-textarea
|
:rows="4"
|
||||||
:rows="4"
|
@change="textChange"
|
||||||
@change="textChange"
|
v-model:value="keystoreBase64"
|
||||||
v-model:value="keystoreBase64"
|
:placeholder="placeholder"
|
||||||
:placeholder="placeholder"
|
/>
|
||||||
/>
|
<j-upload
|
||||||
<j-upload
|
accept=".pem"
|
||||||
accept=".pem"
|
listType="text"
|
||||||
listType="text"
|
:action="NETWORK_CERTIFICATE_UPLOAD"
|
||||||
:action="NETWORK_CERTIFICATE_UPLOAD"
|
:headers="{
|
||||||
:headers="{
|
[TOKEN_KEY]: LocalStore.get(TOKEN_KEY),
|
||||||
[TOKEN_KEY]: LocalStore.get(TOKEN_KEY),
|
}"
|
||||||
}"
|
:showUploadList="false"
|
||||||
:showUploadList="false"
|
@change="handleChange"
|
||||||
@change="handleChange"
|
>
|
||||||
|
<j-button style="margin-top: 10px">
|
||||||
|
<AIcon type="UploadOutlined" />
|
||||||
|
上传文件</j-button
|
||||||
>
|
>
|
||||||
<j-button style="margin-top: 10px">
|
</j-upload>
|
||||||
<upload-outlined />
|
|
||||||
上传文件</j-button
|
|
||||||
>
|
|
||||||
</j-upload>
|
|
||||||
</div>
|
|
||||||
</j-spin>
|
</j-spin>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="CertificateFile">
|
<script setup lang="ts" name="CertificateFile">
|
||||||
import { UploadOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import { NETWORK_CERTIFICATE_UPLOAD } from '@/api/link/certificate';
|
import { NETWORK_CERTIFICATE_UPLOAD } from '@/api/link/certificate';
|
||||||
import type { UploadProps } from 'ant-design-vue';
|
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change']);
|
const emit = defineEmits(['update:modelValue', 'change']);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
</j-radio-button>
|
</j-radio-button>
|
||||||
</j-radio-group>
|
</j-radio-group>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
|
|
||||||
<j-form-item
|
<j-form-item
|
||||||
label="证书名称"
|
label="证书名称"
|
||||||
v-bind="validateInfos.name"
|
v-bind="validateInfos.name"
|
||||||
|
|
@ -154,9 +153,9 @@ const onSubmit = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const response =
|
const response =
|
||||||
id === ':id'
|
id === ':id'
|
||||||
? await save(params)
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...params, id });
|
: await update({ ...params, id }).catch(() => {});
|
||||||
if (response.status === 200) {
|
if (response?.status === 200) {
|
||||||
message.success('操作成功');
|
message.success('操作成功');
|
||||||
router.push('/iot/link/certificate');
|
router.push('/iot/link/certificate');
|
||||||
}
|
}
|
||||||
|
|
@ -180,9 +179,9 @@ const handleChange = (info: UploadChangeParam) => {
|
||||||
const detail = async (id: string) => {
|
const detail = async (id: string) => {
|
||||||
if (id !== ':id') {
|
if (id !== ':id') {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await queryDetail(id);
|
const res: any = await queryDetail(id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const result = res.result as FormDataType;
|
const result: any = res.result;
|
||||||
const type = result.type.value as TypeObjType;
|
const type = result.type.value as TypeObjType;
|
||||||
formData.value = {
|
formData.value = {
|
||||||
...result,
|
...result,
|
||||||
|
|
@ -207,12 +206,6 @@ detail(id);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.form-upload-button {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.form-submit {
|
|
||||||
background-color: @primary-color !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc {
|
.doc {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<page-container>
|
<page-container>
|
||||||
<div>
|
<div>
|
||||||
<Search :columns="columns" target="search" @search="handleSearch" />
|
<pro-search
|
||||||
|
:columns="columns"
|
||||||
|
target="search"
|
||||||
|
@search="handleSearch"
|
||||||
|
/>
|
||||||
<j-pro-table
|
<j-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
model="TABLE"
|
model="TABLE"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue