From c899edafe411420d92b6f659e80842c6141cfde3 Mon Sep 17 00:00:00 2001 From: yinweiwen Date: Tue, 1 Aug 2023 08:57:14 +0800 Subject: [PATCH] modified: client/src/layout/components/header/index.js modified: client/src/sections/meta/actions/index.js modified: client/src/sections/meta/containers/index.js modified: client/src/sections/meta/routes.js modified: client/src/utils/webapi.js modified: package.json client/src/components/DebounceSelect.js client/src/sections/meta/actions/ota.js client/src/sections/meta/containers/OTAList.js client/src/sections/meta/containers/OTAVersionModal.js --- code/web/client/assets/color.less | 19 +++++++++++++++++++ .../src/layout/components/header/index.js | 3 +++ .../client/src/sections/meta/actions/index.js | 4 +++- .../src/sections/meta/containers/index.js | 3 ++- code/web/client/src/sections/meta/routes.js | 9 +++++++++ code/web/client/src/utils/webapi.js | 5 +++++ code/web/package.json | 3 ++- 7 files changed, 43 insertions(+), 3 deletions(-) diff --git a/code/web/client/assets/color.less b/code/web/client/assets/color.less index 7d440a3..15f3674 100644 --- a/code/web/client/assets/color.less +++ b/code/web/client/assets/color.less @@ -1147,10 +1147,17 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;} .ant-menu-item-danger.ant-menu-item {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;} +<<<<<<< Updated upstream .ant-menu-item-danger.ant-menu-item:active {background: #fff1f0;} .ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: #fff1f0;} +======= +.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{component-background}", 3)`);} +.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} +.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} +.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{component-background}", 3)`);} +>>>>>>> Stashed changes .ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;} .ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;} .ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;} @@ -1727,11 +1734,19 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;} .ant-tag-checkable-checked {background-color: @primary-color;} .ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);} +<<<<<<< Updated upstream .ant-tag-pink {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;} .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-magenta {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-red {color: #cf1322;background: #fff1f0;border-color: #ffa39e;} +======= +.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{timeline-color}", 1)`);border-color: #ffadd2;} +.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} +.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{timeline-color}", 1)`);border-color: #ffadd2;} +.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} +.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{component-background}", 3)`);border-color: #ffa39e;} +>>>>>>> Stashed changes .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} @@ -1751,7 +1766,11 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} .ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{progress-steps-item-bg}", 2)`);border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} +<<<<<<< Updated upstream .ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{table-header-sort-active-bg}", 1)`);border-color: #d3adf7;} +======= +.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{input-number-handler-active-bg}", 1)`);border-color: #d3adf7;} +>>>>>>> Stashed changes .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-success {color: #52c41a;background: @success-color-deprecated-bg;border-color: @success-color-deprecated-border;} .ant-tag-processing {color: @primary-color;background: @info-color-deprecated-bg;border-color: @info-color-deprecated-border;} diff --git a/code/web/client/src/layout/components/header/index.js b/code/web/client/src/layout/components/header/index.js index 430a755..effee49 100644 --- a/code/web/client/src/layout/components/header/index.js +++ b/code/web/client/src/layout/components/header/index.js @@ -83,6 +83,9 @@ const Header = props => { } > 设备原型 + } > + OTA + 主题切换} > diff --git a/code/web/client/src/sections/meta/actions/index.js b/code/web/client/src/sections/meta/actions/index.js index b4b50e2..d473dcb 100644 --- a/code/web/client/src/sections/meta/actions/index.js +++ b/code/web/client/src/sections/meta/actions/index.js @@ -1,7 +1,9 @@ 'use strict'; import * as meta from './meta' +import * as ota from './ota' export default { - ...meta + ...meta, + ...ota } \ No newline at end of file diff --git a/code/web/client/src/sections/meta/containers/index.js b/code/web/client/src/sections/meta/containers/index.js index d144d44..2ba933c 100644 --- a/code/web/client/src/sections/meta/containers/index.js +++ b/code/web/client/src/sections/meta/containers/index.js @@ -2,5 +2,6 @@ import FactorProfile from './FactorProfile'; import ProductsProfile from './ProductsProfile'; +import OTAList from './OTAList' -export { FactorProfile,ProductsProfile }; \ No newline at end of file +export { FactorProfile,ProductsProfile,OTAList }; \ No newline at end of file diff --git a/code/web/client/src/sections/meta/routes.js b/code/web/client/src/sections/meta/routes.js index 35f9dd9..dc012bf 100644 --- a/code/web/client/src/sections/meta/routes.js +++ b/code/web/client/src/sections/meta/routes.js @@ -1,6 +1,7 @@ 'use strict'; import { FactorProfile} from './containers'; import { ProductsProfile} from './containers'; +import { OTAList} from './containers'; export default [{ type: 'inner', @@ -18,4 +19,12 @@ export default [{ breadcrumb: '设备原型管理', component: ProductsProfile } +},{ + type: 'inner', + route: { + path: '/ota', + key: 'ota', + breadcrumb: 'OTA', + component: OTAList + } }]; \ No newline at end of file diff --git a/code/web/client/src/utils/webapi.js b/code/web/client/src/utils/webapi.js index f4c34a4..2b43541 100644 --- a/code/web/client/src/utils/webapi.js +++ b/code/web/client/src/utils/webapi.js @@ -24,6 +24,11 @@ export const ApiTable = { getProduct: 'v1/product/{productId}', getEnterprisesMembers: 'enterprises/{enterpriseId}/members', + + // OTA + getOtaMetas: 'v1/firmwareupgrade/list', + getProductMetasByModel: 'v1/products/find', + addOtaVersion: 'v1/firmwareupgrade', }; export const RouteTable = { diff --git a/code/web/package.json b/code/web/package.json index 0baf917..aa2db21 100644 --- a/code/web/package.json +++ b/code/web/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "mocha", "start": "cross-env NODE_ENV=development npm run start-params", - "start-params": "npm run color && node server -p 5000 -u http://127.0.0.1:4100", + "start-params": "npm run color && node server -p 5000 -u http://127.0.0.1:4101", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", @@ -81,6 +81,7 @@ "koa-better-http-proxy": "^0.2.5", "koa-proxy": "^1.0.0-alpha.3", "koa-view": "^2.1.4", + "lodash.debounce": "^4.0.8", "mini-dynamic-antd-theme": "^0.5.3", "moment": "^2.22.0", "npm": "^7.20.6",