diff --git a/src/views/configManage/softwareManage/components/software-history.vue b/src/views/configManage/softwareManage/components/software-history.vue
index b7c600db..34e5de31 100644
--- a/src/views/configManage/softwareManage/components/software-history.vue
+++ b/src/views/configManage/softwareManage/components/software-history.vue
@@ -78,41 +78,38 @@ let tableState: TabeStateType = reactive({
/**表格字段列 */
let tableColumns: ColumnsType = [
{
- title:t('views.configManage.softwareManage.neType'),
+ title: t('views.configManage.softwareManage.neType'),
dataIndex: 'neType',
align: 'center',
- width: 2,
+ width: 100,
},
{
title: t('views.configManage.neManage.neId'),
dataIndex: 'neId',
align: 'center',
- width: 2,
+ width: 200,
},
{
title: t('views.configManage.softwareManage.versions'),
dataIndex: 'version',
align: 'center',
- width: 2,
},
{
title: t('views.configManage.softwareManage.upVersions'),
dataIndex: 'preVersion',
align: 'center',
- width: 2,
},
{
- title:t('views.configManage.softwareManage.backVersions'),
+ title: t('views.configManage.softwareManage.backVersions'),
dataIndex: 'newVersion',
align: 'center',
- width: 2,
},
{
title: t('views.configManage.softwareManage.status'),
dataIndex: 'status',
key: 'status',
align: 'center',
- width: 2,
+ width: 100,
},
{
title: t('views.configManage.softwareManage.letUpTime'),
@@ -122,7 +119,7 @@ let tableColumns: ColumnsType = [
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
- width: 2,
+ width: 200,
},
];
@@ -158,7 +155,7 @@ let tablePagination = reactive({
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
- if(pageNum){
+ if (pageNum) {
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
@@ -197,7 +194,8 @@ watch(
-
+
-
+
-
-
+
+
-
+
@@ -260,7 +257,7 @@ watch(
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
- :scroll="{ x: 1200, y: 400 }"
+ :scroll="{ x: true }"
:pagination="tablePagination"
>
@@ -272,3 +269,22 @@ watch(
padding: 0 24px;
}
+
+
diff --git a/src/views/configManage/softwareManage/index.vue b/src/views/configManage/softwareManage/index.vue
index bd632b3d..3bd9df11 100644
--- a/src/views/configManage/softwareManage/index.vue
+++ b/src/views/configManage/softwareManage/index.vue
@@ -64,8 +64,8 @@ type TabeStateType = {
/**表格状态 */
let tableState: TabeStateType = reactive({
loading: false,
- size: 'middle',
- seached: true,
+ size: 'small',
+ seached: false,
data: [],
selectedRowKeys: [],
});
@@ -185,7 +185,7 @@ let fileModalState: FileStateType = reactive({
neId: undefined,
},
backFrom: {
- ne:undefined,
+ ne: undefined,
neType: undefined,
neId: undefined,
version: '',
@@ -646,9 +646,14 @@ function fnBeforeUploadFile(file: FileType) {
return false;
}
// 根据给定的软件名取版本号 ims-r2.2312.x-ub22.deb
- const nameArr = fileName.split('.');
- if (nameArr.length > 3) {
- modalState.from.version = nameArr[1];
+ const regex = /r\d+\.\d+(\.\d+)?/;
+ const matches = fileName.match(regex);
+ if (matches) {
+ modalState.from.version = matches[0];
+ }
+ const neTypeIndex = fileName.indexOf('-');
+ if (neTypeIndex !== -1) {
+ modalState.from.neType = fileName.substring(0, neTypeIndex).toUpperCase();
}
return true;
}
@@ -761,14 +766,14 @@ onMounted(() => {
{{ t('common.uploadText') }}
+
+
+ {{ t('views.configManage.softwareManage.backBtn') }}
+
{{ t('views.configManage.softwareManage.historyBtn') }}
-
-
- {{ t('views.configManage.softwareManage.backBtn') }}
-
@@ -776,11 +781,15 @@ onMounted(() => {
- {{ t('common.searchBarText') }}
+ {{
+ tableState.seached
+ ? t('common.switch.show')
+ : t('common.switch.hide')
+ }}
@@ -853,7 +862,7 @@ onMounted(() => {
-
+
{{ t('common.moreText') }}
{
- {
-
+