├── .deepsource.toml
├── .eslintrc
├── .gitignore
├── .prettierrc.js
├── .vscode
├── launch.json
└── st.json
├── README.md
├── craco.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
├── robots.txt
└── static
│ ├── images
│ ├── bg9.png
│ ├── login_03.png
│ └── navigation_bars.png
│ ├── js
│ └── less.min.js
│ └── style
│ ├── bg.less
│ └── theme.less
├── src
├── App.tsx
├── api
│ ├── AmiFunction
│ │ ├── abnormalMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── connectAndDisConnect
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── dcuMonitoring
│ │ │ └── type.d.ts
│ │ ├── deviceMonitoring
│ │ │ ├── index.tsx
│ │ │ └── type.d.ts
│ │ ├── firmwareUpgrade
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── index.ts
│ │ ├── meterParam
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── meterReadRate
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── netWorkMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── onDemandReading
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ └── taskMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ ├── README.md
│ ├── basicData
│ │ ├── commandScheme
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── dataDefinition
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── dcuInWareHouse
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── excelImpot
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── feederMgt
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── index.ts
│ │ ├── meterInWareHouse
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── organizationMgt
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ └── transformMgt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ ├── collectReport
│ │ ├── dcuAlarmEvent
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── frozenData
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── index.ts
│ │ ├── linelossQuery
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── loadProfileData
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ └── meterAlarmEvent
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ ├── common
│ │ ├── index.ts
│ │ └── type.d.ts
│ ├── configuration
│ │ ├── activityCalender
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── alarmConfig
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── commandConfig
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── configDcuArchive
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── configLoadProfile
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── dcuSchedule
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── index.ts
│ │ ├── lineLossAnalysis
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── meterTypeParameters
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── ntpConfig
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ ├── opreatorOnlineMgnt
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ │ └── systemParametersMgnt
│ │ │ ├── index.ts
│ │ │ └── types.d.ts
│ ├── customer&Device
│ │ ├── customerMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── dcuMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ ├── index.ts
│ │ ├── measurePointMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ │ └── meterMgnt
│ │ │ ├── index.ts
│ │ │ └── type.d.ts
│ ├── homePage
│ │ ├── index.tsx
│ │ └── type.d.ts
│ ├── http.ts
│ ├── index.ts
│ ├── lang
│ │ ├── index.ts
│ │ └── type.d.ts
│ ├── types.d.ts
│ └── user
│ │ ├── index.ts
│ │ └── type.d.ts
├── assets
│ └── imgs
│ │ └── common
│ │ ├── formlight.png
│ │ ├── logo5.png
│ │ ├── logo_login.png
│ │ └── overseas.png
├── components
│ ├── business
│ │ ├── addRowCom
│ │ │ └── index.tsx
│ │ ├── deviceTree
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── labelList
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── searchList
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── taskCom
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── terminalInfo
│ │ │ ├── content.tsx
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── transfer
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ └── uploadModal
│ │ │ └── index.tsx
│ ├── common
│ │ ├── btnList
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── columnsSelect
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── echarts
│ │ │ └── index.tsx
│ │ ├── editableCell
│ │ │ └── index.tsx
│ │ ├── icon
│ │ │ ├── customIcon.tsx
│ │ │ └── index.tsx
│ │ ├── language
│ │ │ ├── index.tsx
│ │ │ └── langLocale.ts
│ │ ├── loding
│ │ │ └── index.tsx
│ │ ├── toLoad
│ │ │ └── index.tsx
│ │ └── uploadSolt
│ │ │ └── index.tsx
│ ├── footer
│ │ └── index.tsx
│ ├── header
│ │ ├── index.less
│ │ ├── index.tsx
│ │ ├── news.tsx
│ │ └── newsNotice.tsx
│ └── menu
│ │ ├── index.less
│ │ ├── index.tsx
│ │ └── menuTabs.tsx
├── index.tsx
├── layout
│ ├── home
│ │ ├── index.less
│ │ └── index.tsx
│ ├── login
│ │ ├── index.less
│ │ └── index.tsx
│ └── refused
│ │ ├── index.tsx
│ │ ├── noAccess.tsx
│ │ └── serviceException.tsx
├── pages
│ ├── amiFunction
│ │ ├── abnormalManagement
│ │ │ └── index.tsx
│ │ ├── connectAndDisconnect
│ │ │ └── index.tsx
│ │ ├── deviceMonitoring
│ │ │ ├── dcuMonitoring.tsx
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ └── meterMonitoring.tsx
│ │ ├── firmwareUpgrade
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ ├── queryResult.tsx
│ │ │ ├── remoteUpgrade.tsx
│ │ │ └── upgradeInfo.tsx
│ │ ├── meterParam
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── meterReadingSuccessRate
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ ├── meterReadRate.tsx
│ │ │ └── noComMeterQuery.tsx
│ │ ├── networkManagement
│ │ │ ├── dataCount.tsx
│ │ │ ├── historyChart.tsx
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ ├── metertList.tsx
│ │ │ ├── modalTable.tsx
│ │ │ ├── nodeLink.tsx
│ │ │ ├── phaseCensus.tsx
│ │ │ ├── pingDialog.tsx
│ │ │ ├── pingReault.tsx
│ │ │ └── showCensus.tsx
│ │ ├── onDemandReading
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ └── taskManagement
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ ├── basicData
│ │ ├── commandScheme
│ │ │ └── index.tsx
│ │ ├── dataDefinition
│ │ │ └── index.tsx
│ │ ├── dcuInWareHouse
│ │ │ └── index.tsx
│ │ ├── excelFileImport
│ │ │ ├── excelData.tsx
│ │ │ ├── excelFile.tsx
│ │ │ └── index.tsx
│ │ ├── feederManagement
│ │ │ └── index.tsx
│ │ ├── meterInWareHouse
│ │ │ └── index.tsx
│ │ ├── organizationalStructure
│ │ │ └── index.tsx
│ │ └── transformerManagement
│ │ │ └── index.tsx
│ ├── collectReport
│ │ ├── dailyFrozenDataQuery
│ │ │ └── index.tsx
│ │ ├── dcuAlarmEvent
│ │ │ └── index.tsx
│ │ ├── lineLossQuery
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ │ ├── loadProfileDataQuery
│ │ │ └── index.tsx
│ │ ├── meterAlarmEvent
│ │ │ └── index.tsx
│ │ └── monthlyFrozenDataQuery
│ │ │ └── index.tsx
│ ├── components
│ │ ├── deviceTree
│ │ │ └── index.tsx
│ │ ├── labelList
│ │ │ └── index.tsx
│ │ ├── searchList
│ │ │ └── index.tsx
│ │ ├── table
│ │ │ ├── details
│ │ │ │ └── index.tsx
│ │ │ └── list
│ │ │ │ └── index.tsx
│ │ ├── task
│ │ │ └── index.tsx
│ │ └── transfer
│ │ │ ├── index.less
│ │ │ └── index.tsx
│ ├── configuration
│ │ ├── NTPConfig
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ ├── ntpConfig.tsx
│ │ │ └── ntpTask.tsx
│ │ ├── activityCalender
│ │ │ ├── dayProfile.tsx
│ │ │ ├── index.tsx
│ │ │ ├── schemeProfile.tsx
│ │ │ ├── seasonProfile.tsx
│ │ │ ├── task.tsx
│ │ │ └── weekProfile.tsx
│ │ ├── alarmInfoConfig
│ │ │ ├── alarmConfig.tsx
│ │ │ ├── alarmValue.tsx
│ │ │ ├── index.tsx
│ │ │ └── task.tsx
│ │ ├── commandConfig
│ │ │ ├── commandEdit.tsx
│ │ │ ├── commandStatus.tsx
│ │ │ └── index.tsx
│ │ ├── configDcuArchive
│ │ │ ├── configDcuArchive.tsx
│ │ │ ├── index.tsx
│ │ │ └── task.tsx
│ │ ├── configLoadProfile
│ │ │ ├── configure.tsx
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ └── task.tsx
│ │ ├── dcuSchedule
│ │ │ ├── index.tsx
│ │ │ ├── queryTaskResult.tsx
│ │ │ └── sheduleReadingConfig.tsx
│ │ ├── lineLossAnalysis
│ │ │ └── index.tsx
│ │ ├── meterTypeParameters
│ │ │ └── index.tsx
│ │ ├── opreatorOnlineMgnt
│ │ │ └── index.tsx
│ │ ├── specialDays
│ │ │ ├── index.tsx
│ │ │ ├── specialDaysConfig.tsx
│ │ │ └── task.tsx
│ │ └── systemParametersMgnt
│ │ │ ├── cardItem.tsx
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ └── systemParam.tsx
│ ├── customerAndDevice
│ │ ├── customerManagement
│ │ │ └── index.tsx
│ │ ├── dcuManagement
│ │ │ ├── dcuGroupMgnt.tsx
│ │ │ ├── dcuMgnt.tsx
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ ├── leftSolt.tsx
│ │ │ └── rightSolt.tsx
│ │ ├── measurePointMgnt
│ │ │ └── index.tsx
│ │ └── meterManagement
│ │ │ ├── index.less
│ │ │ ├── index.tsx
│ │ │ ├── leftSolt.tsx
│ │ │ ├── meterGroup.tsx
│ │ │ ├── meterMatch.tsx
│ │ │ └── rightSolt.tsx
│ ├── homePage
│ │ ├── homeCom
│ │ │ ├── FilesOverview.tsx
│ │ │ ├── FrozenData.tsx
│ │ │ ├── Overview.tsx
│ │ │ └── Quickperations.tsx
│ │ ├── index.less
│ │ ├── mdrHomePage
│ │ │ └── index.tsx
│ │ └── pvmsHomePage
│ │ │ └── index.tsx
│ ├── opreatorMgnt
│ │ ├── index.less
│ │ ├── roleManage
│ │ │ ├── addRole.tsx
│ │ │ └── index.tsx
│ │ └── userMange
│ │ │ └── index.tsx
│ └── others
│ │ └── langManage
│ │ └── index.tsx
├── react-app-env.d.ts
├── reportWebVitals.ts
├── router
│ ├── config
│ │ ├── amiFunction
│ │ │ └── index.ts
│ │ ├── basicData
│ │ │ └── index.ts
│ │ ├── collectReport
│ │ │ └── index.ts
│ │ ├── components
│ │ │ └── index.ts
│ │ ├── configuration
│ │ │ └── index.ts
│ │ ├── customerAndDevice
│ │ │ └── index.ts
│ │ ├── homePage
│ │ │ └── index.ts
│ │ ├── opreatorMgnt
│ │ │ └── index.ts
│ │ └── others
│ │ │ └── index.ts
│ ├── menuRouter.ts
│ ├── router.tsx
│ ├── routerWrap.tsx
│ └── types.ts
├── setupTests.ts
├── store
│ ├── common
│ │ ├── collapsed.ts
│ │ ├── language.ts
│ │ ├── menuTabs.ts
│ │ ├── news.ts
│ │ └── user.ts
│ └── index.ts
└── utils
│ ├── eventBus.ts
│ ├── function.ts
│ ├── fzytk-normal.ts
│ ├── initDynamicForm.tsx
│ ├── style
│ └── index.less
│ ├── useFetchState.ts
│ ├── utils.ts
│ └── websocket.ts
└── tsconfig.json
/.deepsource.toml:
--------------------------------------------------------------------------------
1 | version = 1
2 |
3 | [[analyzers]]
4 | name = "javascript"
5 |
6 | [analyzers.meta]
7 | plugins = ["react"]
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 | node_modules
25 |
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // 一行最多 240 字符
3 | printWidth: 240,
4 | // 使用 4 个空格缩进
5 | tabWidth: 4,
6 | // 不使用缩进符,而使用空格
7 | useTabs: false,
8 | // 行尾需要有分号
9 | semi: true,
10 | // 使用单引号
11 | singleQuote: true,
12 | // 对象的 key 仅在必要时用引号
13 | quoteProps: 'as-needed',
14 | // jsx 不使用单引号,而使用双引号
15 | jsxSingleQuote: true,
16 | // 末尾是否需要逗号
17 | trailingComma: 'es5',
18 | // 大括号内的首尾需要空格
19 | bracketSpacing: true,
20 | // jsx 标签的反尖括号需要换行
21 | jsxBracketSameLine: true,
22 | // 箭头函数,只有一个参数的时候,也需要括号
23 | arrowParens: 'avoid',
24 | // 每个文件格式化的范围是文件的全部内容
25 | rangeStart: 0,
26 | rangeEnd: Infinity,
27 | // 不需要写文件开头的 @prettier
28 | requirePragma: false,
29 | // 不需要自动在文件开头插入 @prettier
30 | insertPragma: false,
31 | // 使用默认的折行标准
32 | proseWrap: 'preserve',
33 | // 根据显示样式决定 html 要不要折行
34 | htmlWhitespaceSensitivity: 'css',
35 | // 换行符使用 lf
36 | endOfLine: 'lf',
37 | };
38 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // 使用 IntelliSense 了解相关属性。
3 | // 悬停以查看现有属性的描述。
4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 |
8 | // {
9 | // "name": "Launch via NPM",
10 |
11 | // "type": "node",
12 |
13 | // "request": "launch",
14 |
15 | // "cwd": "${workspaceRoot}",
16 |
17 | // "runtimeExecutable": "npm",
18 |
19 | // "runtimeArgs": ["run-script", "dev"]
20 | // },
21 | {
22 | "name": "Launch via NPM",
23 |
24 | "type": "node",
25 |
26 | "request": "launch",
27 |
28 | "cwd": "${workspaceRoot}",
29 |
30 | "program": "${workspaceRoot}/src/utils/utils.ts",
31 | "sourceMaps": true,
32 | "runtimeArgs": [
33 | "--nolazy",
34 | "-r",
35 | "ts-node/register"
36 | ],
37 | }
38 | ]
39 | }
40 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "admin",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@antv/g6": "^4.5.0",
7 | "@testing-library/jest-dom": "^5.11.10",
8 | "@testing-library/react": "^11.2.6",
9 | "@testing-library/user-event": "^12.8.3",
10 | "@types/jest": "^26.0.22",
11 | "@types/jspdf": "^2.0.0",
12 | "@types/lodash": "^4.14.178",
13 | "@types/node": "^12.20.7",
14 | "@types/react": "^17.0.3",
15 | "@types/react-dom": "^17.0.3",
16 | "antd": "^4.17.0",
17 | "axios": "^0.21.1",
18 | "echarts": "^5.1.2",
19 | "eslint": "^7.23.0",
20 | "eslint-plugin-typescript": "^0.14.0",
21 | "events": "^3.3.0",
22 | "jspdf": "^2.4.0",
23 | "jspdf-autotable": "^3.5.23",
24 | "lodash": "^4.17.21",
25 | "react": "^17.0.2",
26 | "react-document-title": "^2.0.3",
27 | "react-dom": "^17.0.2",
28 | "react-keepalive-router": "^1.1.3",
29 | "react-keeper": "^2.2.3",
30 | "react-redux": "^7.2.4",
31 | "react-router-dom": "^5.2.0",
32 | "react-scripts": "4.0.3",
33 | "redux": "^4.1.0",
34 | "tslib": "^2.3.1",
35 | "typescript": "^4.2.4",
36 | "typescript-eslint-parser": "^22.0.0",
37 | "web-vitals": "^1.1.1"
38 | },
39 | "scripts": {
40 | "build": "craco build",
41 | "dev": "craco start"
42 | },
43 | "eslintConfig": {
44 | "extends": [
45 | "react-app",
46 | "react-app/jest"
47 | ]
48 | },
49 | "browserslist": {
50 | "production": [
51 | ">0.2%",
52 | "not dead",
53 | "not op_mini all"
54 | ],
55 | "development": [
56 | "last 1 chrome version",
57 | "last 1 firefox version",
58 | "last 1 safari version"
59 | ]
60 | },
61 | "devDependencies": {
62 | "@craco/craco": "^6.1.1",
63 | "@types/compression-webpack-plugin": "^6.0.6",
64 | "@types/qs": "^6.9.7",
65 | "@types/uuid": "^8.3.1",
66 | "compression-webpack-plugin": "5.0.1",
67 | "craco-antd": "^1.19.0",
68 | "craco-less": "^1.17.1",
69 | "cross-env": "^7.0.3",
70 | "crypto-js": "^4.1.1",
71 | "font-awesome": "^4.7.0",
72 | "happypack": "^5.0.1",
73 | "qs": "^6.10.1",
74 | "query-string": "^7.0.0",
75 | "redux-persist": "^6.0.0",
76 | "simple-progress-webpack-plugin": "^1.1.2",
77 | "speed-measure-webpack-plugin": "^1.5.0",
78 | "terser-webpack-plugin": "^5.1.4",
79 | "uuid": "^8.3.2",
80 | "webpack-bundle-analyzer": "^4.4.2"
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Overseas Integration Platform
7 |
8 |
9 |
10 |
11 |
12 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/public/logo192.png
--------------------------------------------------------------------------------
/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/public/logo512.png
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/public/static/images/bg9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/public/static/images/bg9.png
--------------------------------------------------------------------------------
/public/static/images/login_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/public/static/images/login_03.png
--------------------------------------------------------------------------------
/public/static/images/navigation_bars.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/public/static/images/navigation_bars.png
--------------------------------------------------------------------------------
/src/api/AmiFunction/abnormalMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-04 11:14:12
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { get, post } from 'src/api/http';
15 | import types from './type.d';
16 | import {TaskResult} from 'src/api/types';
17 |
18 | class AbnormalMgnt {
19 | getNodeByLoginUser (subSysNo:string): Promise {
20 | return get('/iframe/node-login-user?subSysNo=' + subSysNo);
21 | }
22 | getMeterTypeList (dsit:string = ''): Promise {
23 | return get('/abnormal/meter-type-list?dsit=' + dsit);
24 | }
25 | getTaskByMeterType (meterType:string = ''): Promise {
26 | return get('/abnormal/task-meter-type?cstType=' + meterType);
27 | }
28 | getMeterList (data: types.MeterlistParams): Promise {
29 | return post('/abnormal/meter2-list', data);
30 | }
31 | supplementaryData (data: types.SupDataParams): Promise {
32 | return post('/abnormal/supplementary-data', data);
33 | }
34 | }
35 |
36 | export default new AbnormalMgnt();
37 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/abnormalMgnt/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-02 16:27:59
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | export type MeterlistParams = {
15 | afn: string;
16 | date: string;
17 | dstId: string;
18 | fieldValue: string;
19 | searchField: string;
20 | stationId: string;
21 | status: string;
22 | commandType: string;
23 | subsysNo: string;
24 | }
25 |
26 | export type MeterListData = {
27 | AFN_NAME: string;
28 | CHECK_POINT_NUM: string;
29 | CST_ADDR: string;
30 | CST_ID: string;
31 | DSTATUS: string;
32 | DST_ID: string;
33 | FREEZEN_VALUE: string;
34 | KEY: string;
35 | METER_ADDR: string;
36 | METER_NO: string;
37 | SN_METER: string;
38 | SN_METER_TYPE: string;
39 | SN_PROTOCOL_COMMAND_READ: string;
40 | SORT_GUID: string;
41 | };
42 |
43 | export type NodeByLoginUserData = {
44 | ID: string;
45 | NAME: string;
46 | PARENTID: string;
47 | level1: number;
48 | };
49 |
50 | export type MeterTypeList = {
51 | CST_TYPE: string;
52 | CST_TYPE_NAME: string;
53 | }
54 |
55 | export type TaskByMeterTypeData = {
56 | AFN: string;
57 | AFN_NAME: string;
58 | AFN_TYPE: string;
59 | COMMAND_TYPE: string;
60 | }
61 |
62 | export type SupDataParams = {
63 | meters: string;
64 | subsysNo: string;
65 | groupId: string;
66 | }
67 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/connectAndDisConnect/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-23 11:03:50
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { post, get } from 'src/api/http';
15 | import * as types from './type';
16 | import {TaskMess, TaskResult} from 'src/api/types.d';
17 |
18 | class RemoteControl {
19 | getMeterList (data:types.MeterListParams): Promise {
20 | return post('/remote-control/meters', data);
21 | }
22 | stateSynchronous (data:types.StateSynchronousParams): Promise {
23 | return post('/remote-control/state-synchronous', data);
24 | }
25 | getTaskGroupByRemark (data: types.TaskGroupModuleParmas): Promise {
26 | return get('/random-read/task-group-by-module', data);
27 | }
28 | gettaskList (data:types.TaskListParams): Promise {
29 | return get('/random-read/task-list', data);
30 | }
31 | getTaskListGroup (data: types.TaskListGroupParams): Promise {
32 | return get('/random-read/task-list-by-group', data);
33 | }
34 | resetTask (data:types.ResetTaskParams):Promise {
35 | return post('/random-read/reset-task', data);
36 | }
37 | confirmUser (data: types.ConfirmUserParms): Promise {
38 | return post('/remote-control/confirm-user', data);
39 | }
40 | getGuid ():Promise {
41 | return get('/remote-control/guid');
42 | }
43 | sendCmdByMeter (data:types.SendCmdByMeterParams):Promise {
44 | return post('/remote-control/send-cmd-by-meter', data);
45 | }
46 | getMeterByTask (taskId:string): Promise {
47 | return get(`/remote-control/meter-by-taskid?taskId=${taskId}`);
48 | }
49 | }
50 |
51 | export default new RemoteControl();
52 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/connectAndDisConnect/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-17 10:58:19
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | export type SelectedMeterList = {
15 | SN: string;
16 | METER_NO: string;
17 | CST_ADDR: string;
18 | METER_ADDR: string;
19 | CHECK_POINT_NUM: string;
20 | LAST_STATE: string;
21 | CST_ID: string;
22 | METER_GUID: string;
23 | METER_MODEL_NO: string;
24 | SN_METER_TYPE: string;
25 | SN_PROTOCAL: string;
26 | SN_STATUS?: string;
27 | };
28 |
29 | export type MeterListParams = {
30 | subSysNo: string;
31 | rowsList: string;
32 | page: number;
33 | rows: number;
34 | };
35 |
36 | export type MeterListData = {
37 | total: number;
38 | rows: SelectedMeterList[];
39 | };
40 |
41 | export type StateSynchronousParams = {
42 | cstStr: string;
43 | groupId: string;
44 | meterStr: string;
45 | subSysNo: string;
46 | };
47 |
48 | export type TaskGroupModuleParmas = {
49 | taskType: string;
50 | startDate: string;
51 | endDate: string;
52 | };
53 |
54 | export type TaskGroupModuleData = {
55 | GROUP_ID: string;
56 | GROUP_NAME: string;
57 | };
58 |
59 | export type TaskListParams = {
60 | page: number;
61 | rows: number;
62 | subSysNo: string;
63 | groupId: string;
64 | }
65 |
66 | export type TaskListGroupParams = {
67 | page: number;
68 | rows: number;
69 | sortName: string;
70 | sortOrder: string;
71 | groupId: string;
72 | meterNo: string;
73 | parameters: string;
74 | };
75 |
76 | export type TaskListRows = {
77 | AFN: string;
78 | AFN_NAME: string;
79 | BUILD_DATE: string;
80 | CST_NAME: string;
81 | CUSTOMER_NAME: string;
82 | CUSTOMER_NO: string;
83 | FUNC_TYPE: string | null;
84 | IS_EXECUTED: string;
85 | IS_SUCCESS: string;
86 | METER_NO: string;
87 | PARAMETERS: string;
88 | RETURN_DATA: string | null;
89 | SN: string;
90 | rn__: number;
91 | };
92 |
93 | export type TaskListData = {
94 | total: number;
95 | rows: TaskListRows[];
96 | };
97 |
98 | export type ResetTaskParams = {
99 | taskIds: string;
100 | groupId: string;
101 | }
102 |
103 | export type ConfirmUserParms = {
104 | pwd: string;
105 | }
106 |
107 | export type SendCmdByMeterParams = {
108 | subSysNo: string;
109 | xmldata: string;
110 | }
111 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/dcuMonitoring/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-26 18:35:58
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | export type DcuOnlineStatusData = {
15 | CST_ADDR: string;
16 | CST_ID: string;
17 | CST_NAME: string;
18 | CST_NO:string;
19 | DST_ID: string;
20 | FRT_PARA: number;
21 | MDL_CCID: string;
22 | NODE_NAME: string;
23 | REGISTERED_DATE: string;
24 | SN: string;
25 | SUB_SYS: string;
26 | rn__:number;
27 | }
28 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/deviceMonitoring/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-28 15:49:54
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import {post} from 'src/api/http';
15 | import * as types from './type';
16 | import {ReturnPageData} from 'src/api/types.d';
17 |
18 | class DeviceMonitor {
19 | getDcuOnlineStatus (data: types.DcuOnlineStatusParams): Promise> {
20 | return post('/dcu-online-status/list', data);
21 | }
22 | getMeterOnlineStatus (data: types.MeterOnlineStatusParams): Promise> {
23 | return post('/dcu-online-status/meter-online', data);
24 | }
25 | getDcuOnlineLog (data: types.DcuOnlineLogParams):Promise> {
26 | return post('/dcu-online-status/log', data);
27 | }
28 | }
29 |
30 | export default new DeviceMonitor();
31 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/deviceMonitoring/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-26 18:35:58
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | export type DcuOnlineStatusData = {
15 | CST_ADDR: string;
16 | CST_ID: string;
17 | CST_NAME: string;
18 | CST_NO: string;
19 | DST_ID: string;
20 | FRT_PARA: number;
21 | MDL_CCID: string;
22 | NODE_NAME: string;
23 | REGISTERED_DATE: string | number;
24 | SN: string;
25 | SUB_SYS: string;
26 | rn__: number;
27 | };
28 |
29 | export type DcuOnlineStatusParams = {
30 | fieldValue: string;
31 | page: number;
32 | rows: number;
33 | searchField: string;
34 | searchNode: string;
35 | subSysNo: string;
36 | };
37 |
38 | export type MeterOnlineStatusParams = {
39 | meterNo: string;
40 | meterStatus: string;
41 | page: number;
42 | rows: number;
43 | searchNode: string;
44 | subSysNo: string;
45 | phase: string;
46 | };
47 |
48 | export type MeterOnlineStatusData = {
49 | CST_NO: string;
50 | CT: number;
51 | CUR_LEVAL: string | null;
52 | CUSTOMER_NAME: string;
53 | CUSTOMER_NO: string;
54 | DST_NAME: string;
55 | METER_ADDR: string;
56 | METER_NO: string;
57 | NODE_NAME: string;
58 | PT: 1;
59 | SECTION_NAME: string;
60 | SN_METER: string;
61 | blankColumn: number;
62 | meterStatus: string;
63 | rn__: number;
64 | };
65 |
66 | export type DcuOnlineLogData = {
67 | CST_IP: string;
68 | CST_NO: string;
69 | CST_STATUS: string;
70 | ID: string;
71 | STATUS_DATE: string;
72 | STATUS_DATE_FF: number;
73 | STATUS_TIME: number|string;
74 | SUB_SYS: string;
75 | rn__: number;
76 | };
77 |
78 | export type DcuOnlineLogParams = {
79 | cstNo: string;
80 | endDate: string;
81 | startDate: string;
82 | page: number;
83 | rows: number;
84 | };
85 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-30 14:05:44
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | import onDemandReading from './onDemandReading';
14 | import firmwareUpgrade from './firmwareUpgrade';
15 | import remoteControl from './connectAndDisConnect';
16 | import deviceMonitor from './deviceMonitoring';
17 | import taskMgnt from './taskMgnt';
18 | import abnormalMgnt from './abnormalMgnt';
19 | import meterParamControl from './meterParam';
20 | import meterReadRate from './meterReadRate';
21 | import netWorkMgnt from './netWorkMgnt';
22 |
23 | export default {
24 | onDemandReading,
25 | firmwareUpgrade,
26 | remoteControl,
27 | deviceMonitor,
28 | taskMgnt,
29 | abnormalMgnt,
30 | meterParamControl,
31 | meterReadRate,
32 | netWorkMgnt,
33 | };
34 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/meterParam/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | /**
3 | * FileName : index.ts
4 | * ProjectName : admin
5 | * Author : terrorblade
6 | * Created Date: 2021-11-05 15:31:56
7 | * Description :
8 | * -----
9 | * Last Modified:
10 | * Modified By :
11 | * -----
12 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
13 | */
14 |
15 | import { get, post } from 'src/api/http';
16 | import { ReturnPageData, TaskMess } from 'src/api/types';
17 | import * as types from './type.d';
18 | class MeterControl {
19 | getGroupList (data: types.GroupListParams): Promise> {
20 | return post('/remote/meter/param/group-list', data);
21 | }
22 | getProgramList (programName: string): Promise> {
23 | return get('/remote/meter/param/program-list', { programName });
24 | }
25 | getMeterParamList (sn:string): Promise {
26 | return get('/remote/meter/param/list', { SN: sn });
27 | }
28 | getAreaList (): Promise {
29 | return get('/remote/meter/param/area-list');
30 | }
31 | getSetting (): Promise {
32 | return get('/remote/meter/param/setting');
33 | }
34 | getDeviceType (fileType:string): Promise {
35 | return get('/remote/meter/param/device-type', {fileType});
36 | }
37 | uploadFileImpl (data: types.SaveProgramParams): Promise {
38 | return post('/remote/meter/param/upload-file-impl', data);
39 | }
40 | delFileImpl (data:types.DelFileImplParam): Promise {
41 | return post('/remote/meter/param/del-file-impl', data);
42 | }
43 | upgradeFileIssued (data: types.UpgradeFileParams): Promise {
44 | return post('/remote/meter/param/upgrade-file-issued', data);
45 | }
46 | getTaskListAndStatusCount (data: types.TaskListParams):Promise {
47 | return post('/remote/meter/param/task-list-status-count', data);
48 | }
49 | tryFTPConn (data: types.tryFTPConnParams): Promise {
50 | return post('/remote/meter/param/try-ftp-conn', data);
51 | }
52 | resend (data: types.ResendParams): Promise {
53 | return post('/remote/meter/param/resend', data);
54 | }
55 | }
56 |
57 | export default new MeterControl();
58 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/meterReadRate/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-08 16:30:40
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { get, post } from 'src/api/http';
15 | import * as types from './type.d';
16 | import { ReturnPageData } from 'src/api/types';
17 | import { GetDstListData } from 'src/api/basicData/transformMgt/type';
18 | class MeterReadRate {
19 | getSchemetype (): Promise {
20 | return get('/reading-ratio/scheme-type');
21 | }
22 | getRatioList (data: types.RatioListParam): Promise> {
23 | return post('/reading-ratio/list', data);
24 | }
25 | getDstListJson (data: types.DstLsitParam): Promise {
26 | return get('/reading-ratio/dst-list-json', data);
27 | }
28 | getNotCommunicatingMeter (data: types.NotCommunicatingMeterParam): Promise> {
29 | return post('/reading-ratio/not-communication-meter', data);
30 | }
31 | exportSuccessRateExcelFile (data:any) {
32 | return get('/reading-ratio/export', data);
33 | }
34 | }
35 |
36 | export default new MeterReadRate();
37 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/meterReadRate/type.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | /**
3 | * FileName : type.d.ts
4 | * ProjectName : admin
5 | * Author : terrorblade
6 | * Created Date: 2021-11-08 16:25:32
7 | * Description :
8 | * -----
9 | * Last Modified:
10 | * Modified By :
11 | * -----
12 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
13 | */
14 |
15 | export type NotCommunicatingMeterData = {
16 | CREATE_TIME: string;
17 | CST_NAME: string;
18 | CST_NO: string;
19 | DST_NAME: string;
20 | DST_NO: string;
21 | METER_ADDR: string;
22 | METER_NO: string;
23 | rn__: number;
24 | };
25 |
26 | export type RatioListData = {
27 | CST_ADDR: string;
28 | CST_ID: string;
29 | CST_METER_NUM: number;
30 | CST_NAME: string;
31 | CST_NO: string;
32 | CST_TYPE: string;
33 | DST_ID: string;
34 | DST_NAME: string;
35 | DST_NO: string;
36 | FAILED_DATA_NUM: number;
37 | FROZEN_DATE: string;
38 | LOAD_METER_NUM: number;
39 | NODE_NAME: string;
40 | NODE_NO: string;
41 | SECTION_ID: string;
42 | SECTION_NAME: string;
43 | SUB_SYS: string;
44 | SUCCESS_RATIO: number;
45 | TOTAL_METER_NUM: number;
46 | VALID_DATA_NUM: number;
47 | rn__: number;
48 | };
49 |
50 | export type RatioListParam = {
51 | page: number;
52 | rows: number;
53 | sn_PROTOCOL_COMMAND: string;
54 | searchDate: string;
55 | searchField: string;
56 | fieldValue: string;
57 | searchNode: string;
58 | dstId: string;
59 | subSysNo: string;
60 | };
61 |
62 | export type SchemetypeList = {
63 | afn: string;
64 | afn_name: string;
65 | };
66 |
67 | export type DstLsitParam = {
68 | nodeNo: string;
69 | subSysNo: string;
70 | }
71 |
72 | export type NotCommunicatingMeterParam = {
73 | dstId: string;
74 | endDate: string;
75 | page: number;
76 | rows: number;
77 | startDate: string;
78 | subsys: string;
79 | }
80 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/netWorkMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-30 18:52:07
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { post } from 'src/api/http';
15 | import types from './type';
16 |
17 | class NetWorkMgnt {
18 | pingResult (data:types.PingResultParams): Promise {
19 | return post('/network-management/ping-result', data);
20 | }
21 | getLinkTimes (data: types.LinkTimesParams): Promise {
22 | return post('/network-management/link-times', data);
23 | }
24 | initData (data: types.InitDataParams): Promise {
25 | return post('/network-management/init-data', data);
26 | }
27 | getCensus (data:types.CensusParams): Promise {
28 | return post('/network-management/census', data);
29 | }
30 | getPhaseCensus (data: types.PhaseCensusParams): Promise {
31 | return post('/network-management/phase-census', data);
32 | }
33 | getMeterList (data: types.MeterListParams): Promise {
34 | return post('/network-management/meter-list', data);
35 | }
36 | getBelongToMeterList (dcuNo:string): Promise {
37 | return post(`/network-management/belong-to-meter-list?dcuNo=${dcuNo}`);
38 | }
39 | exePing (data: types.ExePingParams): Promise {
40 | return post('/network-management/exe-ping', data);
41 | }
42 | getMeterHistoryData (data: types.HistoryDataParams): Promise {
43 | return post('/network-management/meter-history-data', data);
44 | }
45 | }
46 |
47 | export default new NetWorkMgnt();
48 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/onDemandReading/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-09 09:57:37
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | import { get, post } from 'src/api/http';
14 | import * as types from './type';
15 | import { TaskMess } from 'src/api/types';
16 | import { DeviceChildParams, DeviceChildData} from 'src/api/common/type';
17 | class OnReading {
18 | getProtocolList (query: types.ProtocolListParams): Promise {
19 | return get('/random-read/protocol-list', query);
20 | }
21 | sendProtocalByCst (data: types.SendProtocalByCstParams): Promise> {
22 | return post('/random-read/send-protocal-command-by-cst', data);
23 | }
24 | batchSendCommond (data: types.SendProtocalByCstParams): Promise> {
25 | return post('/random-read/batch-repeat-send-command', data);
26 | }
27 | batchRefresh (strlist:string): Promise {
28 | return post('/random-read/batch-refresh', {strlist});
29 | }
30 | clearTaskStatus (strlist: string):Promise {
31 | return post('/random-read/clear-task-status', {strlist});
32 | }
33 | createReadeExcel (strlist: string):Promise {
34 | return post('/random-read/create-random-read-excel', {strlist});
35 | }
36 | sendProtocalCommand (data:types.ProtocalCommand): Promise {
37 | return post('/random-read/send-protocal-command', data);
38 | }
39 | getDeviceTreeChildNode (data: DeviceChildParams): Promise {
40 | return get('/random-read/device-tree-child-node', data);
41 | }
42 | getResultValue (data: types.ResultValParams): Promise {
43 | return post('/random-read/result-value', data);
44 | }
45 | }
46 |
47 | export default new OnReading();
48 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/onDemandReading/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-30 14:06:28
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | export type ProtocolListParams = {
15 | subsys: string;
16 | deviceType: string;
17 | deviceId: string;
18 | obis: string;
19 | };
20 |
21 | export type ProtocolDataList = {
22 | AFN: string;
23 | DATA_FORMAT: string | null;
24 | DATA_TYPE: string | null;
25 | DEFAULT_VALUE: string | null;
26 | FN: string;
27 | INPUT_PARAM_COUNT: string;
28 | MAX_VALUE: string | null;
29 | MIN_VALUE: string | null;
30 | NAME: string;
31 | NO: string;
32 | OUTPUT_PARAM_COUNT: string;
33 | PROTOCAL_BYTE_DESE_SN: string | null;
34 | RESULT_DATA_FORMAT: string;
35 | RESULT_DATA_TYPE: string;
36 | SCHEME_NAME: string;
37 | SN_PROTOCAL_COMMAND: string;
38 | TYPE: string;
39 | UNIT: string;
40 | };
41 | export type ProtocolData = {
42 | deviceTypeName: string;
43 | deviceTypeNo: string;
44 | flag: string;
45 | list: ProtocolDataList[];
46 | protocalNo: string;
47 | };
48 |
49 | export type SendProtocalByCstParams = {
50 | strlist: string;
51 | groupId: string;
52 | 'func_type'?: string;
53 | subSysNo: string;
54 | };
55 |
56 | export type BatchSendCommon = {
57 | sn: string;
58 | taskId: string;
59 | };
60 |
61 | interface SendProtocalByCstList extends BatchSendCommon {
62 | createTime: string;
63 | status: string;
64 | }
65 |
66 | export type SendProtocalByCstData = {
67 | flag: string;
68 | mes: string;
69 | mes2: string | null;
70 | list: T[];
71 | };
72 |
73 | export type BatchRefreshData = {
74 | flag: string;
75 | param1: string;
76 | param2: string;
77 | param3: string;
78 | param4: string;
79 | param5: string;
80 | param6: string;
81 | };
82 |
83 | export type ProtocalCommand = {
84 | cmdParameter: string;
85 | groupId: string;
86 | meterItems: string;
87 | remark: string;
88 | };
89 |
90 | export type ResultValParams = {
91 | taskId: string;
92 | result: string;
93 | isSuccess: string;
94 | completeTime: string;
95 | }
96 |
97 | export type ResultValData = {
98 | flag: boolean
99 | param1: string | null;
100 | param2: string | null;
101 | param3:string | null;
102 | param4: string | null;
103 | param5: string | null;
104 | param6: string | null;
105 | }
106 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/taskMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-01 15:49:24
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { post } from 'src/api/http';
15 | import * as types from './type';
16 | import {ReturnPageData, TaskMess} from 'src/api/types.d';
17 |
18 | class TaskMgnt {
19 | getMeterList (data: types.MeterListActionParams): Promise> {
20 | return post('/task/meter-list', data);
21 | }
22 | getOperatorList (data:types.OperateListParams): Promise {
23 | return post('/task/operator-list', data);
24 | }
25 | stopTask (data:types.TaskStopParams):Promise {
26 | return post('/task/stop', data);
27 | }
28 | changePriority (data: types.TaskPriorityParams): Promise {
29 | return post('/task/change-priority', data);
30 | }
31 | setExucuteTime (data:types.TaskSetExucuteTimeParams): Promise {
32 | return post('/task/set-execute-time', data);
33 | }
34 | }
35 |
36 |
37 | export default new TaskMgnt();
38 |
--------------------------------------------------------------------------------
/src/api/AmiFunction/taskMgnt/type.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | /**
3 | * FileName : type.d.ts
4 | * ProjectName : admin
5 | * Author : terrorblade
6 | * Created Date: 2021-10-18 18:55:18
7 | * Description :
8 | * -----
9 | * Last Modified:
10 | * Modified By :
11 | * -----
12 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
13 | */
14 |
15 |
16 | export type MeterListActionList = {
17 | AFN: string;
18 | AFN_NAME: string;
19 | BUILD_DATE: string;
20 | COMMAND_PRIORITY: number;
21 | COMPLETION_DATE: string;
22 | CST_ADDR: string;
23 | Execute_date: string;
24 | GROUP_ID: string;
25 | IS_EXECUTED: string;
26 | METER_ADDR: string;
27 | METER_NO: string;
28 | OPERATOR_NAME: string;
29 | RETURN_DATA: string;
30 | SN: string;
31 | }
32 |
33 | export type MeterListActionParams = {
34 | afn: string;
35 | dcuIds: string;
36 | endDateTime: string;
37 | excuteStatus: string;
38 | excuteResult: string;
39 | meterIds: string;
40 | operator: string;
41 | page: number;
42 | rows: number;
43 | sortName: string;
44 | sortOrder: string;
45 | startDateTime: string;
46 | taskType: string;
47 | subsysNo: string;
48 | }
49 |
50 | export type OperateListParams = {
51 | dcuIds: string;
52 | endDateTime: string;
53 | excuteStatus: string;
54 | excuteResult: string;
55 | meterIds: string;
56 | startDateTime: string;
57 | taskType: string;
58 | }
59 |
60 | export type OperateListData = {
61 | text: string;
62 | value: string;
63 | }
64 |
65 | export type TaskStopParams = {
66 | taskIdList: string;
67 | taskType: string;
68 | }
69 |
70 | export interface TaskPriorityParams extends TaskStopParams {
71 | priorityValue: string;
72 | }
73 |
74 | export interface TaskSetExucuteTimeParams extends TaskStopParams {
75 | planDateTime: string;
76 | }
77 |
--------------------------------------------------------------------------------
/src/api/README.md:
--------------------------------------------------------------------------------
1 | # 接口相关知识
2 |
3 | ## 目录结构
4 |
5 | ```HTML
6 | 目录结构按照业务模块划分,大模块,小模块,以及公共模块(目前公共组件相关接口都划分在公共模块中)。
7 | ```
8 |
9 | ## 请求方式
10 |
11 | ```html
12 | http.ts目前封装了get和post请求,解决了项目实际所需的问题。暂不支持其他请求方式,如需增加,根据业务需要增加
13 | ```
14 |
15 | ## 数据类型编写
16 |
17 | ```HTML
18 | 每个请求需要对请求的参数类型与返回类型进行编写。并对请求进行注释作用与其他相关备注;
19 | 返回类型中业务最常用的三种类型在./types.d.ts中。如果实际中有其他常用的类型,文件中未出现,可以添加,并备注
20 | ```
21 |
--------------------------------------------------------------------------------
/src/api/basicData/commandScheme/index.ts:
--------------------------------------------------------------------------------
1 | import {post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class CommandSchemeMgt {
6 | commandList (params: types.CommandParams): Promise {
7 | return post('/command/getSchemeList', params);
8 | }
9 |
10 | addCommand (params: types.UpdateCommand): Promise {
11 | return post('/command/addScheme', params);
12 | }
13 |
14 | updateCommand (params: types.UpdateCommand): Promise {
15 | return post('/command/updateScheme', params);
16 | }
17 |
18 | deleteCommand (params: any): Promise {
19 | return post('/command/delScheme', params);
20 | }
21 | }
22 |
23 | export default new CommandSchemeMgt();
24 |
--------------------------------------------------------------------------------
/src/api/basicData/commandScheme/types.d.ts:
--------------------------------------------------------------------------------
1 | type CommandData = {
2 | IS_ENABLE: string;
3 | OPERATOR: string;
4 | SCHEME_GUID: string;
5 | SCHEME_NAME: string;
6 | rn__: number;
7 | }
8 |
9 | type CommandList = {
10 | total: number;
11 | rows: CommandData[];
12 | }
13 |
14 | type CommandParams = {
15 | page: number;
16 | rows: number;
17 | schemeName?: string;
18 | }
19 |
20 | type UpdateCommand = {
21 | schemeName: string;
22 | enabled: string;
23 | schemeGuid?: string;
24 | }
25 |
26 | export {
27 | CommandData,
28 | CommandList,
29 | CommandParams,
30 | UpdateCommand,
31 | }
32 | ;
33 |
--------------------------------------------------------------------------------
/src/api/basicData/dataDefinition/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class DataDefinitionMgt {
6 | classificationList (params:types.ClassificationParams): Promise {
7 | return post('/classification/getClassificationList', params);
8 | }
9 |
10 | classificationTypeList (): Promise {
11 | return get('/classification/getClassificationType');
12 | }
13 |
14 | classificationDetailList (params:types.ClassificationParams): Promise {
15 | return post('/classification/getClassificationDetailList', params);
16 | }
17 |
18 | addClassification (params:types.AddClassification): Promise {
19 | return post('/classification/addClassification', params);
20 | }
21 |
22 | updateClassification (params:types.AddClassification): Promise {
23 | return post('/classification/updateClassification', params);
24 | }
25 |
26 | addClassificationDetail (params:types.AddClassificationDetail): Promise {
27 | return post('/classification/addClassificationDetail', params);
28 | }
29 |
30 | updateClassificationDetail (params:types.AddClassificationDetail): Promise {
31 | return post('/classification/updateClassificationDetail', params);
32 | }
33 |
34 | delClassificationDetail (params:any): Promise {
35 | return post('/classification/delClassificationDetail', params);
36 | }
37 |
38 | }
39 | export default new DataDefinitionMgt();
40 |
--------------------------------------------------------------------------------
/src/api/basicData/dataDefinition/types.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | type ClassificationType = {
3 | CLASSICAL_GUID: string;
4 | CLASSICAL_NAME: string;
5 |
6 | }
7 |
8 | type ClassificationData = {
9 | rn__: number;
10 | CLASSICAL_CODE: string;
11 | CLASSICAL_GUID: string;
12 | CLASSICAL_NAME: string;
13 | }
14 |
15 | type ClassificationList = {
16 | total: number;
17 | rows: ClassificationData[];
18 | }
19 |
20 | type ClassificationDetail = {
21 | rn__: number;
22 | CLASSICAL_DETAIL_CODE: string;
23 | CLASSICAL_DETAIL_GUID: string;
24 | CLASSICAL_DETAIL_NAME: string;
25 | CLASSICAL_GUID: string;
26 | IS_ENABLE: string;
27 |
28 | }
29 |
30 | type ClassificationDetailList = {
31 | total: number;
32 | rows: ClassificationDetail[];
33 | }
34 |
35 | type ClassificationParams = {
36 | subSysNo: string;
37 | page: number;
38 | rows: number;
39 | queryValue?: string;
40 | }
41 |
42 | type AddClassification = {
43 | subSysNo?: string;
44 | classification_name: string;
45 | classification_no: string;
46 | classification_guid?: string;
47 | }
48 |
49 | type AddClassificationDetail = {
50 | code_no: string;
51 | code_name: string;
52 | classification_detail_guid?: string;
53 | is_enable: string;
54 | classificationGuid?: string;
55 | }
56 |
57 | export {
58 | ClassificationType,
59 | ClassificationData,
60 | ClassificationList,
61 | ClassificationDetail,
62 | ClassificationDetailList,
63 | ClassificationParams,
64 | AddClassification,
65 | AddClassificationDetail,
66 | };
67 |
--------------------------------------------------------------------------------
/src/api/basicData/dcuInWareHouse/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | import {get, post} from 'src/api/http';
3 | import * as types from './types';
4 | import { TaskMess } from '../../types';
5 |
6 | class InstoreDCUMgt {
7 | instoreDCUList (params: any): Promise {
8 | return post('/stsinstore/getInstoreDCUList', params);
9 | }
10 |
11 | batchDCUList (subSysNo: string): Promise {
12 | return get('/stsinstore/dcuBatchNameJson', { subSysNo });
13 | }
14 |
15 | delDCU (params:types.DelDCUParams): Promise {
16 | return post('/stsinstore/delDcuInstore', params);
17 | }
18 |
19 | delBatch (params:types.BatchParams): Promise {
20 | return post('/stsinstore/delDcuInstoreByBatchNo', params);
21 | }
22 |
23 | dcuFactory (subSysNo:string): Promise {
24 | return get('/stsinstore/getCstFacJson', {subSysNo});
25 | }
26 |
27 | dcuType (fac_code:string): Promise {
28 | return get('/stsinstore/getCstTypeJson', {fac_code});
29 | }
30 |
31 | saveDcuStatus (params:types.UpdateDcuParams): Promise {
32 | return post('/stsinstore/saveDcuStatus', params);
33 | }
34 |
35 | saveBatchVersion (params:types.UpdateBatchParams): Promise {
36 | return post('/stsinstore/batchUpdateDcu', params);
37 | }
38 |
39 | addBatchDcu (params:types.DcuAdd): Promise {
40 | return post('/stsinstore/batchAddDcuNo', params);
41 | }
42 | }
43 | export default new InstoreDCUMgt();
44 |
--------------------------------------------------------------------------------
/src/api/basicData/dcuInWareHouse/types.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | type BatchNameJson = {
3 | ID: string;
4 | LEVEL1: number;
5 | NAME: string;
6 | PARENTID: string;
7 | key: string;
8 | title: string;
9 | }
10 |
11 | type InstoreDCUData = {
12 | BATCH_NO: string;
13 | CREATE_TIME: string;
14 | CST_ID: string;
15 | CST_NAME: string;
16 | CST_NO: string;
17 | CST_TYPE_CODE: string;
18 | CST_TYPE_NAME: string;
19 | DB_DOT: string;
20 | DB_FLAG: string;
21 | FACTORY_NO: string;
22 | IF_USED: string;
23 | MAIN_MODULE_VERSION: string;
24 | MODIFY_TIME: string;
25 | MODULE_FW_VERSION: string;
26 | PRODUCE_DATE: string;
27 | OPERATOR_NAME: string;
28 | SN_CST_TYPE: string;
29 | SOFT_VERSION: string;
30 | rn__: number;
31 | }
32 |
33 | type InstoreDCUList = {
34 | rows: InstoreDCUData[];
35 | total: number;
36 | }
37 |
38 | type DelDCUParams = {
39 | subSysNo: string;
40 | dcuNos: string;
41 | }
42 |
43 | type BatchParams = {
44 | subSysNo: string;
45 | batchNo: string;
46 | }
47 |
48 | type DcuFactory = {
49 | FAC_NAME: string;
50 | FAC_CODE: string;
51 | }
52 |
53 | type DcuType = {
54 | CST_TYPE_NAME: string;
55 | CST_TYPE: string;
56 | }
57 |
58 | interface UpdateDcuParams extends DelDCUParams {
59 | statusFlag: string;
60 | }
61 |
62 | interface UpdateBatchParams extends BatchParams {
63 | dcu_soft_version: string;
64 | dcu_module_fw_version: string;
65 | dcu_main_module_version: string;
66 | }
67 |
68 | type DcuAdd = {
69 | subSysNo: string;
70 | dcu_batch_name: string;
71 | batchAddFlag: string;
72 | dcu_meterFac: string;
73 | dcu_meterFacName: string;
74 | dcu_meterType: string;
75 | dcu_meterTypeName: string;
76 | dcu_start_meter_no: string;
77 | dcu_end_meter_no: string;
78 | dcu_start_date: string;
79 | dcu_soft_version: string;
80 | dcu_module_version: string;
81 | dcu_main_module_version: string;
82 | dcu_total_meter_num: string;
83 | dcu_meter_batch_no: string;
84 | }
85 |
86 | export {
87 | BatchNameJson,
88 | InstoreDCUData,
89 | InstoreDCUList,
90 | DelDCUParams,
91 | BatchParams,
92 | DcuFactory,
93 | DcuType,
94 | UpdateBatchParams,
95 | UpdateDcuParams,
96 | DcuAdd,
97 | }
98 | ;
99 |
--------------------------------------------------------------------------------
/src/api/basicData/excelImpot/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 |
4 | class ExcelImportMgt {
5 | getSchemeList (page:number, rows:number, subSysNo:string, schemeName:string): Promise {
6 | return get('/sts-excel/getSchemeList', {page, rows, subSysNo, schemeName});
7 | }
8 |
9 | getExcelDataList (page:number, rows:number, subSysNo:string, fileId:string, checkStatus:string, searchField:string, fieldValue:string): Promise {
10 | return get('/sts-excel/getExcelDataList', {page, rows, subSysNo, fileId, checkStatus, searchField, fieldValue});
11 | }
12 |
13 | checkName (params:any): Promise {
14 | return post('/sts-excel/checkSchemeName', params);
15 | }
16 |
17 | deleteScheme (params:any): Promise {
18 | return post('/sts-excel/deleteExcelData', params);
19 | }
20 |
21 | }
22 | export default new ExcelImportMgt();
23 |
--------------------------------------------------------------------------------
/src/api/basicData/excelImpot/types.d.ts:
--------------------------------------------------------------------------------
1 | type ExcelSchemeData = {
2 | CHECK_FAIL_ROWS: string;
3 | CHECK_SUCC_ROWS: string;
4 | CREATE_TIME: string;
5 | FILE_ID: string;
6 | FILE_TYPE: string;
7 | IMPORT_FAIL_ROWS: string;
8 | IMPORT_SUCC_ROWS: string;
9 | METER_GUID: string;
10 | METER_NO: string;
11 | NODE_NO: string;
12 | OPERATOR_GUID: string;
13 | SCHEME_NAME: string;
14 | STATUS: string;
15 | TOTAL_ROWS: string;
16 | rn__: number;
17 | }
18 |
19 | type ExcelSchemeList = {
20 | total: number;
21 | rows: ExcelSchemeData[];
22 | }
23 |
24 | type ExcelData = {
25 | CREATE_TIME: string;
26 | DST_NAME: string;
27 | FIELD_001: string;
28 | FIELD_002: string;
29 | FIELD_003: string;
30 | FIELD_004: string;
31 | FIELD_005: string;
32 | FIELD_006: string;
33 | FIELD_007: string;
34 | FIELD_008: string;
35 | FIELD_009: string;
36 | NODE_NAME: string;
37 | SECTION_ID: string;
38 | SECTION_NAME: string;
39 | SN: string;
40 | }
41 |
42 | type ExcelDataList = {
43 | total: number;
44 | rows: ExcelData[];
45 | }
46 |
47 | export {
48 | ExcelSchemeData, ExcelSchemeList, ExcelData, ExcelDataList,
49 | };
50 |
--------------------------------------------------------------------------------
/src/api/basicData/feederMgt/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types.d';
3 | import { TaskMess } from '../../types';
4 |
5 | class FeederMgt {
6 | feederList (data:types.FeederListParam): Promise {
7 | return get('/section/list', data);
8 | }
9 |
10 | feederListJson (subSysNo:string, searchNode:string): Promise {
11 | return get('/section/getSectionList', {subSysNo, searchNode});
12 | }
13 |
14 | deleteFeeder (data: types.FeederSaveParam): Promise {
15 | return post('/section/delete', data);
16 | }
17 |
18 | getMaxFeederNo (subSysNo:string): Promise {
19 | return get('/section/getMaxSectionNo', {subSysNo});
20 | }
21 |
22 | addFeeder (data: types.FeederSaveParam): Promise {
23 | return post('/section/add', data);
24 | }
25 |
26 | editFeeder (data: types.FeederSaveParam): Promise {
27 | return post('/section/edit', data);
28 | }
29 | }
30 |
31 | export default new FeederMgt();
32 |
--------------------------------------------------------------------------------
/src/api/basicData/feederMgt/types.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | type FeederData = {
3 | rn_: number;
4 | CREATE_TIME: string;
5 | NODE_NAME: string;
6 | REMARK: string;
7 | SECTION_ID: string;
8 | SECTION_NAME: string;
9 | SECTION_NO: string|'0';
10 | FEDR_SPEC: string;
11 | MODIFY_NODE_NO: string;
12 | }
13 |
14 | type FeederDataJson = {
15 | GNAME: string;
16 | ID: string;
17 | NAME: string;
18 | NODE_NO: string;
19 | }
20 |
21 | type FeederListParam = {
22 | page: number;
23 | rows: number;
24 | subSysNo: string;
25 | searchNode: string;
26 | feederId: string;
27 | }
28 |
29 | type FeederDataList = {
30 | total: number;
31 | rows: FeederData[];
32 | }
33 |
34 | type FeederSaveParam = {
35 | node_no?: string;
36 | remark?: string;
37 | guid?: string;
38 | section_name?: string;
39 | section_no?: string;
40 | fedr_spec?: string;
41 | subSysNo?:string,
42 | }
43 |
44 | export {
45 | FeederData,
46 | FeederDataList,
47 | FeederListParam,
48 | FeederSaveParam,
49 | FeederDataJson,
50 | };
51 |
--------------------------------------------------------------------------------
/src/api/basicData/index.ts:
--------------------------------------------------------------------------------
1 | import feederMgt from './feederMgt';
2 | import transformMgt from './transformMgt';
3 | import organizationMgt from './organizationMgt';
4 | import dataDefinition from './dataDefinition';
5 | import commandScheme from './commandScheme';
6 | import meterInWareHouse from './meterInWareHouse';
7 | import dcuInWareHouse from './dcuInWareHouse';
8 | import excelImpotMgt from './excelImpot';
9 |
10 | export default {
11 | feederMgt,
12 | transformMgt,
13 | organizationMgt,
14 | dataDefinition,
15 | commandScheme,
16 | meterInWareHouse,
17 | dcuInWareHouse,
18 | excelImpotMgt,
19 | };
20 |
--------------------------------------------------------------------------------
/src/api/basicData/meterInWareHouse/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class InstoreMeterMgt {
6 | instoreMeterList (params:any): Promise {
7 | return post('/stsinstore/getInstoreMeterList', params);
8 | }
9 |
10 | batchList (subSysNo:string): Promise {
11 | return get('/stsinstore/batchNameJson', {subSysNo});
12 | }
13 |
14 | saveMeterStatus (params:types.UpdateMeterParams): Promise {
15 | return post('/stsinstore/saveMeterStatus', params);
16 | }
17 |
18 | delMeter (params:types.DelMeterParams): Promise {
19 | return post('/stsinstore/delInstore', params);
20 | }
21 |
22 | batchInfo (params:types.QueryBatchInfo): Promise {
23 | return get('/stsinstore/getBatchInfo', params);
24 | }
25 |
26 | saveBatchVersion (params:types.UpdateBatchParams): Promise {
27 | return post('/stsinstore/batchUpdateMeter', params);
28 | }
29 |
30 | delBatch (params:types.BatchParams): Promise {
31 | return post('/stsinstore/delInstoreByBatchNo', params);
32 | }
33 |
34 | maxBatchNo (subSysNo:string): Promise {
35 | return get('/stsinstore/getMaxBatchNo', {subSysNo});
36 | }
37 |
38 | meterBaseType (subSysNo:string): Promise {
39 | return get('/iframe/getMeterBaseType', {subSysNo});
40 | }
41 |
42 | meterRegisterType (data:types.QueryMeterRegisterType): Promise {
43 | return get('/iframe/getMeterRegisterType', data);
44 | }
45 |
46 | meterFactory (subSysNo:string): Promise {
47 | return get('/iframe/getMeterFactory', {subSysNo});
48 | }
49 |
50 | batchCount (data:types.QueryBatchCount): Promise {
51 | return get('/stsinstore/getBatchCount', data);
52 | }
53 |
54 | addBatchMeter (params:types.MeterAdd): Promise {
55 | return post('/stsinstore/batchAddMeterNo', params);
56 | }
57 | }
58 | export default new InstoreMeterMgt();
59 |
--------------------------------------------------------------------------------
/src/api/basicData/organizationMgt/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types.d';
3 | import { TaskMess, BasePage } from '../../types';
4 |
5 | class OrganizationMgt {
6 | getOrganizationList (): Promise {
7 | return get('/files/nodes/getUnitNetsByNodeList');
8 | }
9 | deleteOrganization (data: types.OrganizationParams): Promise {
10 | return post('/files/nodes/delUnitNet', data);
11 | }
12 | addOrganization (data: types.OrganizationParams): Promise {
13 | return post('/files/nodes/addUnitNet', data);
14 | }
15 | editOrganization (data: types.OrganizationParams): Promise {
16 | return post('/files/nodes/editUnitNet', data);
17 | }
18 | getOrganizationJson (nodeId:string): Promise {
19 | return get('/files/nodes/getJsonNodesByNodeId', { nodeId });
20 | }
21 | getKMFList (page: number = 1, rows: number = 99): Promise {
22 | const params: BasePage = {
23 | page: page,
24 | rows: rows,
25 | };
26 |
27 | return get('/mgrToken/getKmfList', params);
28 | }
29 | getSGCList (page: number = 1, rows: number = 99): Promise {
30 | const params: BasePage = {
31 | page: page,
32 | rows: rows,
33 | };
34 |
35 | return get('/stsinstore/getSgcList', params);
36 | }
37 | }
38 |
39 | export default new OrganizationMgt();
40 |
--------------------------------------------------------------------------------
/src/api/basicData/organizationMgt/types.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | type OrganizationData = {
3 | id: string;
4 | level: string;
5 | limit: string;
6 | name: string;
7 | parentId: string;
8 | remark: string;
9 | sgcNo: string;
10 | alarmMsgValue: string;
11 | composeNo: string;
12 | children: OrganizationData[];
13 | }
14 |
15 | type OrganizationParams = {
16 | node_No?: string;
17 | subSysNo?: string,
18 | node_Name?: string,
19 | father_Node_No?: string,
20 | is_Sale?: string,
21 | remark?: string,
22 | is_Dept?: string,
23 | limit?: string,
24 | limitMin?: string,
25 | alarmMsgValue?: string,
26 | sys_no?: string,
27 | selectComposeNo?: string,
28 | encryptType_id?: string,
29 | selectDKGA?: string,
30 | compose_no?:string,
31 | }
32 |
33 | type OrganizationJson = {
34 | ID: string;
35 | FATHER_NODE_NO: string;
36 | COMPOSE_NO: string;
37 | NAME: string;
38 | DKGA: string;
39 | ENCRYPT_TYPE: string;
40 | SGC_NO: string;
41 | ALARM_MSG_VALUE: string;
42 | }
43 |
44 | type SGCData = {
45 | KMF_ID: string;
46 | MODULE_ID: string;
47 | SGC_NO: string;
48 | KEY_REGNO: string;
49 | SGC_NAME: string;
50 | SGC_TYPE: string;
51 | KEY_KRN: string;
52 | KEY_KEN: string;
53 | DKGA: string;
54 | KEY_BDTDATE: string;
55 | KEY_BDTTIME: string;
56 | KEY_VALUE: string;
57 | }
58 |
59 | type SGCDataList = {
60 | total: number;
61 | rows: SGCData[];
62 | }
63 |
64 | export {
65 | OrganizationData,
66 | OrganizationParams,
67 | OrganizationJson,
68 | SGCData,
69 | SGCDataList,
70 | };
71 |
--------------------------------------------------------------------------------
/src/api/basicData/transformMgt/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './type';
3 | import { TaskMess } from '../../types';
4 |
5 | class TransformMgt {
6 | transformList (subSysNo: string, page: number, rows: number, searchNode:string, feederId:string, transformerId:string): Promise {
7 |
8 | return get('/dst/list', {subSysNo, page, rows, transformerId, searchNode, feederId});
9 | }
10 |
11 | deleteTransform (data: types.TransformParam): Promise {
12 | return post('/dst/delete', data);
13 | }
14 |
15 | getMaxTransformNo (subSysNo:string): Promise {
16 | return get('/dst/getMaxDstNo', {subSysNo});
17 | }
18 |
19 | addTransform (data: types.TransformParam): Promise {
20 | return post('/dst/add', data);
21 | }
22 |
23 | editTransform (data: types.TransformParam): Promise {
24 | return post('/dst/edit', data);
25 | }
26 | getDstList (data: types.GetDstListParasm): Promise {
27 | return get('/dst/getDstList', data);
28 | }
29 | }
30 | export default new TransformMgt();
31 |
--------------------------------------------------------------------------------
/src/api/basicData/transformMgt/type.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | type TransformData = {
3 | DST_ID: string;
4 | DST_NAME: string;
5 | DST_NO: string;
6 | DST_SPEC: string;
7 | MODIFY_NODE_NO: string;
8 | CREATE_TIME: string;
9 | DST_ADDR: string;
10 | NODE_NAME: string;
11 | NODE_NO: string;
12 | REL_ID: string;
13 | SECTION_ID: string;
14 | SECTION_NAME: string;
15 | SUB_SYS: string;
16 | rn__: number;
17 | }
18 |
19 | type TransformDataList = {
20 | total: number;
21 | rows: TransformData[];
22 | }
23 |
24 | type TransformParam = {
25 | node_no?: string;
26 | guid?: string;
27 | section_name?: string;
28 | section_id?: string;
29 | dst_spec?: string;
30 | subSysNo?: string,
31 | dst_no?: string,
32 | dst_name?: string,
33 | dst_addr?: string,
34 | loop?: string,
35 | dst_type?:string,
36 | }
37 |
38 | type QueryTransformList = {
39 | subSysNo: string,
40 | page: number,
41 | rows:number,
42 | }
43 |
44 | export type GetDstListParasm = {
45 | subSysNo: string;
46 | nodeNo: string;
47 | sectionId?: string;
48 | }
49 |
50 | export type GetDstListData = {
51 | GNAME: string;
52 | ID: string;
53 | NAME: string;
54 | }
55 |
56 | export {
57 | TransformData,
58 | TransformDataList,
59 | TransformParam,
60 | QueryTransformList,
61 | };
62 |
--------------------------------------------------------------------------------
/src/api/collectReport/dcuAlarmEvent/index.ts:
--------------------------------------------------------------------------------
1 | import {post, get} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class DcuAlarmEventMgt {
6 | getDcuAlarmEventList (params: any): Promise {
7 | return get('/event/device-event-datas', params);
8 | }
9 |
10 | updateAlarmStatus (params: any, random:string): Promise {
11 | return post(`/event/update-alarm-status?random=${random}`, params);
12 | }
13 | }
14 |
15 | export default new DcuAlarmEventMgt();
16 |
--------------------------------------------------------------------------------
/src/api/collectReport/dcuAlarmEvent/types.d.ts:
--------------------------------------------------------------------------------
1 | type DcuAlarmEvent = {
2 | rn__: number;
3 | CST_ADDR: string;
4 | CST_ID: string;
5 | CST_NAME: string;
6 | CST_NO: string;
7 | CST_TYPE: string;
8 | DEVICE_TYPE: string;
9 | DST_ADDR: string;
10 | DST_ID: string;
11 | DST_NAME: string;
12 | DST_NO: string;
13 | EVENT_CONTENT: string;
14 | EVENT_DESC: string;
15 | IS_IMPORTANT_EVENT: string;
16 | NODE_NAME: string;
17 | NODE_NO: string;
18 | OCCUR_DATETIME: string;
19 | SECTION_ID: string;
20 | SECTION_NAME: string;
21 | SECTION_NO: string;
22 | SN: string;
23 | SN_DEVICE: string;
24 | STATION_ID: string;
25 | STATUS: string;
26 | STATUS_DESC: string;
27 | }
28 |
29 | type DcuAlarmEventList = {
30 | total: number;
31 | rows: DcuAlarmEvent[];
32 | }
33 |
34 | export {
35 | DcuAlarmEvent,
36 | DcuAlarmEventList,
37 | };
38 |
--------------------------------------------------------------------------------
/src/api/collectReport/frozenData/index.ts:
--------------------------------------------------------------------------------
1 | import {post} from 'src/api/http';
2 | import * as types from './types';
3 |
4 | class FrozenDataMgt {
5 | dailyFrozenDataQuery (params: any): Promise {
6 | return post('/frozenData/getDayFrozenDataList', params);
7 | }
8 |
9 | monthlyFrozenDataQuery (params: any): Promise {
10 | return post('/frozenData/getMonthFrozenDataList', params);
11 | }
12 | }
13 |
14 | export default new FrozenDataMgt();
15 |
--------------------------------------------------------------------------------
/src/api/collectReport/frozenData/types.d.ts:
--------------------------------------------------------------------------------
1 | type FrozenData = {
2 | rn__: number;
3 | CHECK_POINT_NUM: string;
4 | CST_ADDR: string;
5 | CUSTOMER_NAME: string;
6 | DST_ID: string;
7 | FREEZEN_DATE: string;
8 | FREEZEN_VALUE: string;
9 | GROUP_ID: string;
10 | METER_NO: string;
11 | MODIFY_NODE_NO: string;
12 | POWER_FACTOR: string;
13 | REGISTER_TIME: string;
14 | }
15 |
16 | type FrozenDataList = {
17 | total: number;
18 | rows: FrozenData[];
19 | }
20 |
21 | export {
22 | FrozenData,
23 | FrozenDataList,
24 | }
25 | ;
26 |
--------------------------------------------------------------------------------
/src/api/collectReport/index.ts:
--------------------------------------------------------------------------------
1 | import frozenData from './frozenData';
2 | import loadProfileData from './loadProfileData';
3 | import dcuAlarmEvent from './dcuAlarmEvent';
4 | import meterAlarmEvent from './meterAlarmEvent';
5 | import linelossQuery from './linelossQuery';
6 |
7 | export default {
8 | frozenData,
9 | loadProfileData,
10 | dcuAlarmEvent,
11 | meterAlarmEvent,
12 | linelossQuery,
13 | }
14 | ;
15 |
--------------------------------------------------------------------------------
/src/api/collectReport/linelossQuery/index.ts:
--------------------------------------------------------------------------------
1 | import {post, get} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class LineLossQueryMgt {
6 | getLineLossDataList (params: any): Promise {
7 | return post('/lineloss/getLineLossDataList', params);
8 | }
9 |
10 | getLineLossStatistics (params: any): Promise {
11 | return post('/lineloss/getLineLossStatistics', params);
12 | }
13 |
14 | sendCmd (groupId:string, frozenType:string): Promise {
15 | return get('/lineloss/sendCmd', {groupId, frozenType});
16 | }
17 |
18 | computeLineloss (date:string, frozenType:string): Promise {
19 | return get('/lineloss/computeLineloss', {date, frozenType});
20 | }
21 |
22 | disconnect (frozenType:string): Promise {
23 | return get('/lineloss/disconnect', {frozenType});
24 | }
25 |
26 | getLineLossDetailList (params: any): Promise {
27 | return get('/lineloss/getLineLossDataDetail', params);
28 | }
29 | }
30 |
31 | export default new LineLossQueryMgt();
32 |
--------------------------------------------------------------------------------
/src/api/collectReport/linelossQuery/types.d.ts:
--------------------------------------------------------------------------------
1 | type LineLossStatistics = {
2 | checkMeterCount: number;
3 | checkMeterSum: number;
4 | clientMeterCount: number;
5 | clientMeterSum: number;
6 | };
7 |
8 | type SendCmdResult = {
9 | lineLossDate: string;
10 | taskNum: number;
11 | };
12 |
13 | type LineLossData = {
14 | CHECK_CAPTURE_DATA?: string;
15 | CHECK_METER_NO?: string;
16 | CLIENT_CAPTURE_DATA?: string;
17 | CREATE_DATE?: string;
18 | FROZEN_TYPE?: string;
19 | METER_ADDR?: string;
20 | METER_NO?: string;
21 | SN?: string;
22 | SN_CAPTURE_DATA?: string;
23 | SN_CHECK_METER?: string;
24 | SN_DEVICE?: string;
25 | SN_METER?: string;
26 | rn__?: number;
27 | CHECK_CST_NO?: string;
28 | CST_ADDR?: string;
29 | CST_NO?: string;
30 | CST_ID?: string;
31 | DIFF_CAPTURE_DATA?: string;
32 | METER_COUNT?: string;
33 | CHECK_METER_COUNT?: string;
34 | CLIENT_COUNT?: string;
35 | CLIENT_METER_COUNT?: string;
36 | }
37 |
38 | type LineLossList = {
39 | total: number;
40 | rows: LineLossData[];
41 | }
42 |
43 | export {
44 | LineLossStatistics,
45 | SendCmdResult,
46 | LineLossData,
47 | LineLossList,
48 | };
49 |
--------------------------------------------------------------------------------
/src/api/collectReport/loadProfileData/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 |
4 | class LoadProfileDataMgt {
5 | getMeterTypeList (subSysNo: string): Promise {
6 | return get('/schemereport/getMeterTypeList', {subSysNo});
7 | }
8 |
9 | getSchemeList (subSysNo: string, meterType:string): Promise {
10 | return get('/schemereport/getSchemeList', {subSysNo, meterType});
11 | }
12 |
13 | getDataList (params:any): Promise {
14 | return post('/schemereport/getListByDataType', params);
15 | }
16 | }
17 |
18 | export default new LoadProfileDataMgt();
19 |
--------------------------------------------------------------------------------
/src/api/collectReport/loadProfileData/types.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable camelcase */
2 | type MeterType = {
3 | ID: string;
4 | NAME: string;
5 | }
6 |
7 | type SchemeData = {
8 | FN: string;
9 | afn: string;
10 | afn_name: string;
11 | command_type: string;
12 | sn: string;
13 | }
14 |
15 | type TitleData = {
16 | capture_obj_index: string;
17 | afn_name: string;
18 | remark: string;
19 | }
20 |
21 | type LoadProfileData = {
22 | allRows: TitleData[];
23 | total: number;
24 | rows: any[];
25 | }
26 |
27 | export {
28 | MeterType,
29 | SchemeData,
30 | TitleData,
31 | LoadProfileData,
32 | };
33 |
--------------------------------------------------------------------------------
/src/api/collectReport/meterAlarmEvent/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 |
4 | class MeterAlarmEventMgt {
5 | getMeterAlarmEventList (params: any): Promise {
6 | return post('/event/meter-alarm-datas', params);
7 | }
8 |
9 | getMeterModelNos (): Promise {
10 | return get('/event/getMeterModelNo');
11 | }
12 |
13 | getMeterAlarmOptions (meterModelNo:string): Promise {
14 | return get('/event/getAlarmOptions', {meterModelNo});
15 | }
16 |
17 | }
18 |
19 | export default new MeterAlarmEventMgt();
20 |
--------------------------------------------------------------------------------
/src/api/collectReport/meterAlarmEvent/types.d.ts:
--------------------------------------------------------------------------------
1 | type MeterModeNo = {
2 | METER_MODEL_NAME: string;
3 | METER_MODEL_NO: string;
4 | }
5 |
6 | type MeterAlarmOption = {
7 | WORD_NAME: string;
8 | WORD_NAME_EN: string;
9 | WORD_SEQ: string;
10 | }
11 |
12 | type MeterAlarmEvent = {
13 | BIT_LEN: number;
14 | CHECK_POINT_NUM: string;
15 | CST_ADDR: string;
16 | CST_ID: string;
17 | CST_NAME: string;
18 | CUSTOMER_NAME: string;
19 | DST_NAME: string;
20 | JLD_GUID: string;
21 | METER_ADDR: string;
22 | METER_GUID: string;
23 | METER_NO: string;
24 | OCCUR_DATETIME: string;
25 | REGISTER_TIME: string;
26 | SN: string;
27 | STATUS: string;
28 | WORD_NAME: string;
29 | WORD_NAME_EN: string;
30 | WORD_SEQ: string;
31 | }
32 |
33 | type MeterAlarmEventList = {
34 | total: number;
35 | rows: MeterAlarmEvent[];
36 | }
37 |
38 | export {
39 | MeterModeNo,
40 | MeterAlarmOption,
41 | MeterAlarmEvent,
42 | MeterAlarmEventList,
43 | };
44 |
--------------------------------------------------------------------------------
/src/api/configuration/activityCalender/types.d.ts:
--------------------------------------------------------------------------------
1 | type SchemeProfileData = {
2 | ACTIVE_DATE_TIME: string;
3 | SCHEME_NAME: string;
4 | SCHEME_SN: string;
5 | rn__: number;
6 | }
7 |
8 | type SchemeProfileList = {
9 | total: number;
10 | rows: SchemeProfileData[];
11 | }
12 |
13 | type SeasonProfileData = {
14 | CREATE_TIME: string;
15 | SEASON_SN: string;
16 | SEASON_TABLE_NAME: string;
17 | START_TIME: string;
18 | WEEK_NAME: string;
19 | REMARK: string;
20 | rn__: number;
21 | }
22 |
23 | type SeasonProfileList = {
24 | total: number;
25 | rows: SeasonProfileData[];
26 | }
27 |
28 | type WeekProfileData = {
29 | CREATE_TIME: string;
30 | WEEK_NAME: string;
31 | WEEK_SN: string;
32 | FR: string;
33 | MO: string;
34 | SA: string;
35 | SU: string;
36 | TH: string;
37 | TU: string;
38 | WE: string;
39 | rn__: number;
40 | }
41 |
42 | type WeekProfileList = {
43 | total: number;
44 | rows: WeekProfileData[];
45 | }
46 |
47 | type DayProfileData = {
48 | CREATE_TIME?: string;
49 | rn__?: number;
50 | DAY_GROUP_SN?: string;
51 | DAY_IDX?: string;
52 | DAY_TIME_BUCKET_NO: string;
53 | SCRIPT_LOGICAL_NAME: string;
54 | SCRIPT_SELECTOR: string;
55 | START_TIME?: string;
56 | }
57 |
58 | type DayProfileList = {
59 | total: number;
60 | rows: DayProfileData[];
61 | }
62 |
63 | type WebSocketMessage = {
64 | flag: boolean;
65 | mess: string;
66 | }
67 |
68 | export {
69 | SchemeProfileData,
70 | SchemeProfileList,
71 | SeasonProfileData,
72 | SeasonProfileList,
73 | WeekProfileList,
74 | WeekProfileData,
75 | DayProfileData,
76 | DayProfileList,
77 | WebSocketMessage,
78 | };
79 |
--------------------------------------------------------------------------------
/src/api/configuration/alarmConfig/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class AlarmConfig {
6 | getMeterModelList (): Promise {
7 | return get('/event/getMeterModelNo', {});
8 | }
9 |
10 | getAlarmConfigList (page:number, rows:number, meterModelNo:string, alarmType:string, sortOrder:string): Promise {
11 | return get('/event/getAlarmConfig', {page, rows, meterModelNo, alarmType, sortOrder});
12 | }
13 |
14 | saveAlarmConfig (params:any): Promise {
15 | return post('/event/saveAlarmConfig', params);
16 | }
17 |
18 | sendProtocalCommand (params:any): Promise {
19 | return post('/event/sendProtocalCommand', params);
20 | }
21 |
22 |
23 | }
24 |
25 | export default new AlarmConfig();
26 |
--------------------------------------------------------------------------------
/src/api/configuration/alarmConfig/types.d.ts:
--------------------------------------------------------------------------------
1 | type MeterModel = {
2 | METER_MODEL_NAME: string;
3 | METER_MODEL_NO: string;
4 | }
5 |
6 | type AlarmConfigData = {
7 | BIT_LEN: number;
8 | SN: string;
9 | STATUS_DEFINE_EMUN: string;
10 | WORD_NAME: string;
11 | WORD_SEQ: number;
12 | rn__: string;
13 | }
14 |
15 | type AlarmConfigList = {
16 | total: number;
17 | rows: AlarmConfigData[];
18 | }
19 |
20 | type WebSocketMessage = {
21 | flag: boolean;
22 | mess: string;
23 | }
24 |
25 | export {
26 | MeterModel,
27 | AlarmConfigData,
28 | AlarmConfigList,
29 | WebSocketMessage,
30 | };
31 |
--------------------------------------------------------------------------------
/src/api/configuration/commandConfig/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class CommandConfig {
6 | getDeviceSubTypeList (deviceType:string): Promise {
7 | return get('/command/getDeviceSubTypeList', {deviceType});
8 | }
9 |
10 | getCommandEditList (deviceTypeEdit:string, deviceSubTypeEdit:string, commandTypeEdit:string): Promise {
11 | return get('/command/getCommandEditList', {deviceTypeEdit, deviceSubTypeEdit, commandTypeEdit});
12 | }
13 |
14 | getCommandSchemeList (): Promise {
15 | return get('/command/getProtocolSchemeList', {});
16 | }
17 |
18 | getLeftCommandList (params:any): Promise {
19 | return get('/command/getDisableCommandList', params);
20 | }
21 |
22 | getRightCommandList (params:any): Promise {
23 | return get('/command/getEnableCommandList', params);
24 | }
25 |
26 | saveCommandEdit (datas:any): Promise {
27 | return post('/command/saveCommandEdit', datas);
28 | }
29 |
30 | saveCommand (datas:any): Promise {
31 | return post('/command/saveSetting', datas);
32 | }
33 |
34 | startUpload (fileId:string): Promise {
35 | return get('/command/startUploadExcelFile', {fileId});
36 | }
37 |
38 | getUploadProgress (fileId:string): Promise {
39 | return get('/command/getCurImportProgress', {fileId});
40 | }
41 | }
42 |
43 | export default new CommandConfig();
44 |
--------------------------------------------------------------------------------
/src/api/configuration/commandConfig/types.d.ts:
--------------------------------------------------------------------------------
1 | type DeviceSubType = {
2 | DEVICE_SUB_TYPE: string;
3 | DEVICE_SUB_TYPE_NAME: string;
4 | }
5 |
6 | type CommandEditData = {
7 | AFN: string;
8 | AFN_NAME: string;
9 | FN: string;
10 | SCALE: string;
11 | SN: string;
12 | UNIT: string;
13 | }
14 |
15 | type CommandScheme = {
16 | SCHEME_NAME: string;
17 | }
18 |
19 | type LeftCommandData = {
20 | L_AFN: string;
21 | L_AFN_NAME: string;
22 | L_FN: string;
23 | SN: string;
24 | }
25 |
26 | type RightCommandData = {
27 | R_AFN: string;
28 | R_AFN_NAME: string;
29 | R_FN: string;
30 | SN: string;
31 | SCHEME_NAME: string;
32 | }
33 |
34 | type UploadProgress = {
35 | msg: string;
36 | CUR_IDX: number;
37 | TOTAL_CNT: number;
38 | }
39 |
40 | export {
41 | DeviceSubType,
42 | CommandEditData,
43 | LeftCommandData,
44 | RightCommandData,
45 | CommandScheme,
46 | UploadProgress,
47 | };
48 |
--------------------------------------------------------------------------------
/src/api/configuration/configDcuArchive/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class ConfigDcuArchive {
6 | getDcuAccountInfo (dcuId:string, subSysNo:string, random:string): Promise {
7 | return get(`/loadingfiles/getDCUAccountInfo?${random}`, {dcuId, subSysNo});
8 | }
9 |
10 | getMeterListByDcu (page:number, rows:number, dcuId:string, subSysNo:string): Promise {
11 | return get('/loadingfiles/getMeterListByDcuId', {page, rows, dcuId, subSysNo});
12 | }
13 |
14 | getOperationList (page: number, rows: number, subSysNo: string, operation: string, dstId:string): Promise {
15 | return get('/loadingfiles/operationList', {page, rows, subSysNo, operation, dstId});
16 | }
17 |
18 | getLoadingResult (groupid:string): Promise {
19 | return get('/loadingfiles/getLoadingFileResult', {groupid});
20 | }
21 |
22 | refreshMeterList (strlist:string): Promise {
23 | return get('/loadingfiles/refreshList', {strlist});
24 | }
25 |
26 | getCstParamInfo (cstid:string, mguid:string): Promise {
27 | return get('/loadingfiles/getCstProtocalParamInfo', {cstid, mguid});
28 | }
29 |
30 | operationAll (params:any): Promise {
31 | return post('/loadingfiles/operationAll', params);
32 | }
33 |
34 | installArchive (params:any): Promise {
35 | return post('/loadingfiles/install', params);
36 | }
37 |
38 | uninstallArchive (params:any): Promise {
39 | return post('/loadingfiles/uninstall', params);
40 | }
41 |
42 | resetArchive (params:any): Promise {
43 | return post('/loadingfiles/reset', params);
44 | }
45 |
46 | sendReadCommand (params:any): Promise {
47 | return post('/loadingfiles/sendReadCmd', params);
48 | }
49 |
50 | fileCompare (params:any): Promise {
51 | return post('/loadingfiles/fileCompare', params);
52 | }
53 |
54 | }
55 |
56 | export default new ConfigDcuArchive();
57 |
--------------------------------------------------------------------------------
/src/api/configuration/configDcuArchive/types.d.ts:
--------------------------------------------------------------------------------
1 | type DCUAccountInfo = {
2 | CST_ADDR: string;
3 | CST_ID: string;
4 | INSTALLEDCOUNT: number;
5 | TOTALCOUNT: number;
6 | UNINSTALLEDCOUNT: number;
7 | }
8 |
9 | type MeterInfo = {
10 | CHECK_POINT_NUM: number;
11 | CST_ADDR: string;
12 | CST_ID: string;
13 | LOAD_METER_FLG: string;
14 | METER_ADDR: string;
15 | METER_GUID: string;
16 | METER_NO: string;
17 | PRODUCT_TYPE_NAME: string;
18 | SN_PROTOCAL: string;
19 | }
20 |
21 | type MeterList = {
22 | total: number;
23 | rows: MeterInfo[];
24 | }
25 |
26 | type OperationData = {
27 | CST_NO: string;
28 | METERS: number;
29 | }
30 |
31 | type OperationList = {
32 | total: number;
33 | rows: OperationData[];
34 | }
35 |
36 | type ParamInfo = {
37 | PROTOCAL_NAME: string;
38 | PARAMETER_VALUE: string;
39 | }
40 |
41 | type FileCompareResult = {
42 | PARAM_NAME: string;
43 | PARAM_VALUE: string;
44 | }
45 |
46 | export {
47 | DCUAccountInfo,
48 | MeterInfo,
49 | MeterList,
50 | OperationData,
51 | OperationList,
52 | ParamInfo,
53 | FileCompareResult,
54 | };
55 |
--------------------------------------------------------------------------------
/src/api/configuration/index.ts:
--------------------------------------------------------------------------------
1 | import meterTypeParameters from './meterTypeParameters';
2 | import systemParameters from './systemParametersMgnt';
3 | import opreatorOnlineMgnt from './opreatorOnlineMgnt';
4 | import lineLossAnalysis from './lineLossAnalysis';
5 | import commandConfig from './commandConfig';
6 | import ntpConfigMgt from './ntpConfig';
7 | import activityCalender from './activityCalender';
8 | import alarmConfig from './alarmConfig';
9 | import configDcuArchive from './configDcuArchive';
10 | import dcuScheduleMgt from './dcuSchedule';
11 | import configLoadProfile from './configLoadProfile';
12 |
13 | export default {
14 | meterTypeParameters,
15 | systemParameters,
16 | opreatorOnlineMgnt,
17 | lineLossAnalysis,
18 | commandConfig,
19 | ntpConfigMgt,
20 | activityCalender,
21 | alarmConfig,
22 | configDcuArchive,
23 | dcuScheduleMgt,
24 | configLoadProfile,
25 | }
26 | ;
27 |
--------------------------------------------------------------------------------
/src/api/configuration/lineLossAnalysis/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class LineLossAnalysis {
6 | getMeterTypeList (frozenType:string): Promise {
7 | return get('/lineloss/getMeterTypeObejct', {frozenType});
8 | }
9 |
10 | saveLineLoss (datas:string): Promise {
11 | return post('/lineloss/saveLineLossScheme', {datas});
12 | }
13 |
14 | startUpload (fileId:string): Promise {
15 | return get('/lineloss/startUploadExcelFile', {fileId});
16 | }
17 |
18 | getUploadProgress (fileId:string): Promise {
19 | return get('/lineloss/getCurImportProgress', {fileId});
20 | }
21 | }
22 |
23 | export default new LineLossAnalysis();
24 |
--------------------------------------------------------------------------------
/src/api/configuration/lineLossAnalysis/types.d.ts:
--------------------------------------------------------------------------------
1 | type MeterTypeObj = {
2 | AFN_NAME: string;
3 | SN: string;
4 | GROUP_NAME: string;
5 | GROUP_TYPE_NAME: string;
6 | GROUP_ID: string;
7 | CAPTURE_OBJ_INDEX: number;
8 | CAPTURE_OBJ_OBIS: string;
9 | METER_TYPE: string;
10 | }
11 | type MeterTypeData = {
12 | AFN_NAME: string;
13 | CAPTURE_PERIOD: string;
14 | FN_NAME: string;
15 | GROUP_NAME: string;
16 | METER_TYPE: string;
17 | SN_METER_TYPE_NAME: string;
18 | SN_PROTOCAL: string;
19 | SN_PROTOCOL_COMMAND: string;
20 | STATUS_FLAG: string;
21 | meterTypeObj: MeterTypeObj[];
22 | IS_ENABLE: string;
23 | COMMAND_TYPE: string;
24 | THRESHOLD: string;
25 | SN: string;
26 | GROUP_ID: string;
27 | CAPTURE_IDX: string;
28 | }
29 |
30 | type MeterTypeList = {
31 | rows: MeterTypeData[];
32 | total: number;
33 | }
34 |
35 | type UploadProgress = {
36 | msg: string;
37 | CUR_IDX: number;
38 | TOTAL_CNT: number;
39 | }
40 |
41 | export {
42 | MeterTypeData,
43 | MeterTypeList,
44 | MeterTypeObj,
45 | UploadProgress,
46 | };
47 |
--------------------------------------------------------------------------------
/src/api/configuration/meterTypeParameters/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class MeterTypeParamMgt {
6 | getMeterBaseParam (subSysNo: string, meterType:string): Promise {
7 | return get('/meterparam/getMeterDocParamByMeterModelNo', {subSysNo, meterType});
8 | }
9 |
10 | getMeterPrepayParam (subSysNo: string, meterType:string): Promise {
11 | return get('/meterparam/getPrepayParamByMeterModelNo', {subSysNo, meterType});
12 | }
13 |
14 | getAMIParam (subSysNo: string, meterType:string): Promise {
15 | return get('/meterparam/getMeterMeasurePointParamByMeterModelNo', {subSysNo, meterType});
16 | }
17 |
18 | getOperateId (meterType:string): Promise {
19 | return get('/meterparam/getOperateId', {meterType});
20 | }
21 |
22 | updateMeterParamter (param:any): Promise {
23 | return post('/meterparam/updateMeterTemplateParamter', param);
24 | }
25 | }
26 |
27 | export default new MeterTypeParamMgt();
28 |
--------------------------------------------------------------------------------
/src/api/configuration/meterTypeParameters/types.d.ts:
--------------------------------------------------------------------------------
1 | type MeterTypeParam = {
2 | CREATE_TIME: string;
3 | DB_DOT: string;
4 | DEFAULT_VALUE: string;
5 | EDIT_TYPE: string;
6 | ENUM_LIST: string;
7 | ENUM_LIST_USE: string;
8 | MAX_VALUE: string;
9 | METER_MODEL_NO: string;
10 | MIN_VALUE: string;
11 | MODIFY_TIME: string;
12 | PARAM_XUHAO: string;
13 | PROTOCOL_NAME: string;
14 | PROTOCOL_NAME_USE: string;
15 | PROTOCOL_NO: string;
16 | IS_HIDDEN: string;
17 | DATA_TYPE: string;
18 | XU_HAO: string;
19 | SN: string;
20 | PROTOCAL_NAME: string;
21 | CARD_TYPENO: string;
22 | }
23 |
24 | export {
25 | MeterTypeParam,
26 | };
27 |
--------------------------------------------------------------------------------
/src/api/configuration/ntpConfig/index.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable max-params */
2 | import {get, post} from 'src/api/http';
3 | import * as types from './types';
4 | import { TaskMess } from '../../types';
5 |
6 | class NtpConfigMgt {
7 | getCstList (page:number, rows:number, subSysNo: string, searchField:string, fieldValue:string, status:string, sortOrder:string, sortName:string): Promise {
8 | return get('/devicentp/getCstList', {subSysNo, page, rows, searchField, fieldValue, status, sortOrder, sortName});
9 | }
10 |
11 | getNtpParam (): Promise {
12 | return get('/devicentp/getNtpParam', {});
13 | }
14 |
15 | saveNtpParam (params:any): Promise {
16 | return post('/devicentp/saveNtpParam', params);
17 | }
18 |
19 | sendCommand (params:any): Promise {
20 | return post('/devicentp/sendCommand', params);
21 | }
22 |
23 | getReadResult (params:any): Promise {
24 | return post('/devicentp/getReadResultValue', params);
25 | }
26 |
27 | getTaskGroup (startDate:string, endDate:string, taskType:string): Promise {
28 | return get('/random-read/task-group-by-module', {startDate, endDate, taskType});
29 | }
30 |
31 | getTaskList (page:number, rows:number, groupId: string, meterNo:string, sortOrder:string, parameters:string, sqlOrder:string): Promise {
32 | return get('/random-read/task-list-by-group', {groupId, page, rows, meterNo, sortOrder, parameters, sqlOrder});
33 | }
34 |
35 | resetTask (params:any): Promise {
36 | return post('/random-read/reset-task', params);
37 | }
38 |
39 | }
40 |
41 | export default new NtpConfigMgt();
42 |
--------------------------------------------------------------------------------
/src/api/configuration/ntpConfig/types.d.ts:
--------------------------------------------------------------------------------
1 | type CstData = {
2 | rn__: number;
3 | SecurityPolicy: string;
4 | SECURITY_LEVEL: number;
5 | SN_CST_TYPE: string;
6 | SECTION_NAME: string;
7 | PSK: string;
8 | OPERATION: string;
9 | ONLINESTATUS: string;
10 | NTP_STATUS: string;
11 | NTP_SERVER_PORT: string;
12 | NTP_SERVER_ADDRESS: string;
13 | NTP_KEY: string;
14 | NTP_AUTHEN_TYPE: string;
15 | NODE_NAME: string;
16 | DST_NAME: string;
17 | DST_ID: string;
18 | CST_TYPE_NAME: string;
19 | CST_NO: string;
20 | CST_NAME: string;
21 | CST_ID: string;
22 | CST_ADDR: string;
23 | NTP_AUTHEN_TYPE: string;
24 | }
25 |
26 | type CstList = {
27 | total: number;
28 | rows: CstData[];
29 | }
30 |
31 | type NtpParam = {
32 | NTP_AUTHEN_TYPE: string;
33 | NTP_ENABLE: string;
34 | NTP_SERVER_ADDRESS: string;
35 | NTP_SERVER_PORT: string;
36 | SN: string;
37 | }
38 |
39 | type TaskGroup = {
40 | GROUP_NAME: string;
41 | GROUP_ID: string;
42 | }
43 |
44 | type TaskData = {
45 | BUILD_DATE: string;
46 | CST_NAME: string;
47 | IS_EXECUTED: string;
48 | IS_SUCCESS: string;
49 | METER_NO: string;
50 | PARAMETERS: string;
51 | RETURN_DATA: string;
52 | FUNC_TYPE: string;
53 | SN: string;
54 | rn__: number;
55 | }
56 |
57 | type TaskList = {
58 | total: number;
59 | rows: TaskData[];
60 | }
61 |
62 | export {
63 | CstData,
64 | CstList,
65 | NtpParam,
66 | TaskGroup,
67 | TaskList,
68 | TaskData,
69 | };
70 |
--------------------------------------------------------------------------------
/src/api/configuration/opreatorOnlineMgnt/index.ts:
--------------------------------------------------------------------------------
1 | import {get} from 'src/api/http';
2 | import * as types from './types';
3 |
4 | class OpreatorOnlineMgt {
5 | getOpreatorList (subSys: string, nodeId:string): Promise {
6 | return get('/domain/getOperator', {subSys, nodeId});
7 | }
8 |
9 | getOpreatorOnline (nodeId: string, operatorId:string): Promise {
10 | return get('/domain/getOperatorOnline', {nodeId, operatorId});
11 | }
12 |
13 | offline (operatorId:string): Promise {
14 | return get('/domain/offline', { operatorId});
15 | }
16 |
17 | }
18 |
19 | export default new OpreatorOnlineMgt();
20 |
--------------------------------------------------------------------------------
/src/api/configuration/opreatorOnlineMgnt/types.d.ts:
--------------------------------------------------------------------------------
1 | type OpreatorData = {
2 | OPERATOR_ID: string;
3 | OPERATOR_NAME: string;
4 | }
5 |
6 | type OpreatorOnlineData = {
7 | IPADDRESS: string;
8 | OPERATOR_ID: string;
9 | OPERATOR_NAME: string;
10 | }
11 |
12 | export {
13 | OpreatorData,
14 | OpreatorOnlineData,
15 | };
16 |
--------------------------------------------------------------------------------
/src/api/configuration/systemParametersMgnt/index.ts:
--------------------------------------------------------------------------------
1 | import {get, post} from 'src/api/http';
2 | import * as types from './types';
3 | import { TaskMess } from '../../types';
4 |
5 | class SystemParamMgt {
6 | getSystemParam (page: number, rows:number): Promise {
7 | return get('/sysParam/getSystemPara', {page, rows});
8 | }
9 |
10 | getJavaParam (): Promise {
11 | return get('/sysParam/getJavaEnvironmentPara', {});
12 | }
13 |
14 | getServerParam (): Promise {
15 | return get('/sysParam/getServerPara', {});
16 | }
17 |
18 | setSystemParam (param:any): Promise {
19 | return post('/sysParam/setSystemPara', param);
20 | }
21 | }
22 |
23 | export default new SystemParamMgt();
24 |
--------------------------------------------------------------------------------
/src/api/configuration/systemParametersMgnt/types.d.ts:
--------------------------------------------------------------------------------
1 | type SystemParamData = {
2 | PARAMETER_DESCRIPTION: string;
3 | PARAMETER_KEY: string;
4 | PARAMETER_NAME: string;
5 | PARAMETER_VALUE: string;
6 | SN: string;
7 | rn__: number;
8 | }
9 |
10 | type SystemParamList = {
11 | rows: SystemParamData[];
12 | total: number;
13 | }
14 |
15 | export {
16 | SystemParamData,
17 | SystemParamList,
18 | };
19 |
--------------------------------------------------------------------------------
/src/api/customer&Device/customerMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-28 15:32:48
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | import { get, post } from 'src/api/http';
14 | import types from './type.d';
15 | import {ReturnPageData, TaskMess} from 'src/api/types';
16 | class CustomerMgnt {
17 | getCustomerList (data: types.CustomerListParam): Promise> {
18 | return get('/customer/list', data);
19 | }
20 | updateCustomer (data:types.UpdateCustomer):Promise {
21 | return post('/customer/update', data);
22 | }
23 | }
24 |
25 |
26 | export default new CustomerMgnt();
27 |
--------------------------------------------------------------------------------
/src/api/customer&Device/dcuMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-22 14:19:05
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { get, post } from 'src/api/http';
15 | import types from './type.d';
16 | import { ReturnPageData, TaskMess } from 'src/api/types.d';
17 | class DcuMgnt {
18 | // 获取集中器工厂json
19 | getDcuFacJson (): Promise {
20 | return get('/cst/dcu-fac-json');
21 | }
22 | // 获取集中器类型Json
23 | getDcuTypeJson (facCode: string = ''): Promise {
24 | return get('/cst/dcu-type-json', {facCode});
25 | }
26 | // 获取集中器左边table数据
27 | getLeftCstList (data: types.LeftCstListParams): Promise> {
28 | return get('/cst/inactive-dcus', data);
29 | }
30 | // 获取集中器管理右边table数据
31 | getRightCstList (data: types.LeftCstListParams): Promise> {
32 | return get('/cst/receiving-dcus', data);
33 | }
34 | // 批量保存
35 | saveBatchCst (data: types.SaveBatchCstParams) {
36 | return post('/cst/batch-save', data);
37 | }
38 | // 获取不是分组的集中器
39 | getNoGroupCst (data: types.GroupCstParams) {
40 | return get('/cst/not-group-dcus', data);
41 | }
42 | // 获取分组的集中器
43 | getGroupCst (data: types.GroupCstParams) {
44 | return get('/cst/group-dcus', data);
45 | }
46 | // 分组保存
47 | saveGroupList (data: types.SaveGroupListData) {
48 | return post('/cst/save-dcu-group', data);
49 | }
50 | // 验证dcu是否重复
51 | isDcuRepeat (data: types.IsDcuRepParams): Promise {
52 | return get('/cst/is-dcu', data);
53 | }
54 | }
55 |
56 | export default new DcuMgnt();
57 |
--------------------------------------------------------------------------------
/src/api/customer&Device/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-06 16:39:35
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import meterMgnt from './meterMgnt/index';
15 | import dcuMgnt from './dcuMgnt';
16 | import customerMgnt from './customerMgnt';
17 | import measurePoint from './measurePointMgnt';
18 |
19 | export default {
20 | meterMgnt,
21 | dcuMgnt,
22 | customerMgnt,
23 | measurePoint,
24 | };
25 |
--------------------------------------------------------------------------------
/src/api/customer&Device/measurePointMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-29 14:40:09
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { get, post } from 'src/api/http';
15 | import types from './type';
16 | import { ReturnPageData, TaskMess } from 'src/api/types.d';
17 | class MeasurePointMgnt {
18 | getMeasurePointList (data:types.MeasurePointInfoParams): Promise> {
19 | return get('/measure-point/list', data);
20 | }
21 | updateMeasurePoint (data: types.UpdateMeasurePointParams): Promise {
22 | return post('/measure-point/update', data);
23 | }
24 | }
25 |
26 | export default new MeasurePointMgnt();
27 |
--------------------------------------------------------------------------------
/src/api/customer&Device/measurePointMgnt/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-27 16:36:18
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | export type MeasurePointInfoParams = {
16 | page: number
17 | rows: number
18 | custName:string;
19 | sectionName:string;
20 | meterNo:string;
21 | measurepointNo:string;
22 | sqlSort: string;
23 | sqlOrder: string;
24 | status: string;
25 | }
26 |
27 | export type MeasurePointInfoData = {
28 | ADDRESS: string;
29 | CUSTOMER_NAME: string;
30 | CUSTOMER_NO: string;
31 | JLD_GUID: string;
32 | METER_NO:string;
33 | MODIFY_TIME: string;
34 | OPERATE_DATE: string;
35 | REMARK: string;
36 | SECTION_NAME: string;
37 | }
38 |
39 | export type UpdateMeasurePointParams = {
40 | address: string;
41 | 'customer_NAME': string;
42 | 'jld_GUID': string;
43 | 'meter_NO': string;
44 | remark: string;
45 | }
46 |
--------------------------------------------------------------------------------
/src/api/customer&Device/meterMgnt/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-06 16:38:23
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | import { get, post } from 'src/api/http';
14 | import types from './type';
15 | import { ReturnPageData, TaskListMess, TaskMess } from 'src/api/types.d';
16 | class MeterMgnt {
17 | // 表计管理获取左边table数据
18 | getMeterLeft (data: types.MeterLeftParams): Promise {
19 | return post('/meter/left', data);
20 | }
21 | // 表计管理获取右边Table数据
22 | getMeterRight (data: types.MeterRightParams): Promise {
23 | return get('/meter/right', data);
24 | }
25 | // 获取集中器类型
26 | getDcuType (deviceId:string): Promise {
27 | return get(`/meter/device-type?deviceId=${deviceId}`);
28 | }
29 | // 保存表计
30 | saveSetting (data: types.SaveSettingParams): Promise {
31 | return post('/meter/save-setting', data);
32 | }
33 | // 表计详情
34 | getMeterDetails (data:types.MetertDetailsParams): Promise {
35 | return post('/meter/meter-details', data);
36 | }
37 | // 获取表计分组
38 | getMeterGroup (): Promise {
39 | return get('/meter/group-list-json');
40 | }
41 | // 获取分组表计清单数据
42 | getGroupMeterList (data: types.GroupMeterParams): Promise> {
43 | return get('/meter/group-meters', data);
44 | }
45 | // 获取不属于分组表计清单数据
46 | getNoGroupMeterList (data: types.GroupMeterParams): Promise> {
47 | return get('/meter/not-group-meters', data);
48 | }
49 | // 获取弹窗分组下拉
50 | getClassicalJson (subSysNo: string): Promise {
51 | return get('/meter/sys-classical-json', {subSysNo});
52 | }
53 | // 保存新增分组
54 | saveGroupClassical (data: types.SaveClassicalParams): Promise {
55 | return post('/meter/save-group-meter', data);
56 | }
57 | // 保存表计左移右移数据
58 | saveGroupMeters (data: types.SaveGroupMetersParams): Promise {
59 | return post('/meter/save-group-meters', data);
60 | }
61 | // 表计管理模板下载
62 | downTemplate () {
63 | return get('/meter/downTemplate');
64 | }
65 | // 验证表计地址
66 | isMeterAddRess (data: types.IsMeterAddressParams): Promise {
67 | return get('/meter/is-meter-address', data);
68 | }
69 | }
70 |
71 | export default new MeterMgnt();
72 |
--------------------------------------------------------------------------------
/src/api/homePage/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-27 09:39:28
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { get } from 'src/api/http';
15 | import { ReturnData } from '../types';
16 | import {FrozenRate} from './type';
17 |
18 | class HomePage {
19 | getDcuCount () {
20 | return get('/home-page/dcu-count');
21 | }
22 | getMeterCount () {
23 | return get('/home-page/meter-count');
24 | }
25 | getDcuRelationMeters () {
26 | return get('/home-page/dcu-relation-meters');
27 | }
28 | getMeterTypeRelationMeters () {
29 | return get('/home-page/meter-type-relation-meters');
30 | }
31 | getDailyFrozenSuccessRate (): Promise> {
32 | return get('/home-page/daily-frozen-success-rate');
33 | }
34 | getMonthlyFrozenSuccessRate (): Promise> {
35 | return get('/home-page/monthly-frozen-success-rate');
36 | }
37 | getCurveFrozenSuccessRate (): Promise> {
38 | return get('/home-page/curve-frozen-success-rate');
39 | }
40 | getCustomers () {
41 | return get('/home-page/customers-count');
42 | }
43 | getQuickMenus () {
44 | return get('/common-box/func-list');
45 | }
46 | }
47 |
48 | export default new HomePage();
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/api/homePage/type.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : type.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-27 16:45:07
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | import { ReturnData } from '../types';
15 |
16 | type FrozenRate = {
17 | FROZEN_TIME: string;
18 | TOTAL_READ: number;
19 | AUTUAL_READ: number;
20 | }
21 |
22 | export interface FrozenSuccessRate extends ReturnData {}
23 |
--------------------------------------------------------------------------------
/src/api/index.ts:
--------------------------------------------------------------------------------
1 | import user from './user';
2 | import homePage from './homePage';
3 | import common from './common';
4 | import lang from './lang';
5 | import basicData from './basicData';
6 | import customer from './customer&Device';
7 | import amiFunc from './AmiFunction';
8 | import collectReport from './collectReport';
9 | import configuration from './configuration';
10 |
11 | export {
12 | user,
13 | homePage,
14 | common,
15 | lang,
16 | basicData,
17 | customer,
18 | amiFunc,
19 | collectReport,
20 | configuration,
21 | };
22 |
--------------------------------------------------------------------------------
/src/api/lang/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : index.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-03 16:11:07
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | import { get, post } from 'src/api/http';
16 | import { GetLangRes, AddLangParams, GetLangList, ReturnLangList } from './type';
17 |
18 | class Lang {
19 | // 获取资源包数据
20 | getLangResource (lang: string): Promise {
21 | return get(`/i18n/langeuage-resource?language=${lang}`);
22 | }
23 | // 添加国际化词条
24 | addLang (data: AddLangParams): Promise {
25 | return post('/i18n/langeuage-add', data);
26 | }
27 | // 获取语言列表
28 | getLangList (data: GetLangList): Promise {
29 | return post('/i18n/langeuage-list', data);
30 | }
31 | }
32 |
33 | export default new Lang();
34 |
35 |
--------------------------------------------------------------------------------
/src/api/lang/type.d.ts:
--------------------------------------------------------------------------------
1 | export interface GetLangRes {
2 | [key: string]: string
3 | }
4 |
5 | type AddField = {
6 | content: string;
7 | field: string;
8 | }
9 |
10 | export interface AddLangParams {
11 | code: string;
12 | fields: AddField[];
13 | }
14 |
15 | export interface GetLangList extends AddLangParams {
16 | page: number;
17 | rows: number;
18 | }
19 |
20 | type LangListRow = {
21 | [key: string]: string;
22 | }
23 |
24 | export interface ReturnLangList {
25 | total: number;
26 | rows: LangListRow[];
27 | }
28 |
--------------------------------------------------------------------------------
/src/api/types.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * FileName : types.d.ts
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-02 14:38:56
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | export type TaskMess = {
16 | flag: boolean;
17 | mess: string | null;
18 | }
19 |
20 | export type BasePage = {
21 | page: number;
22 | rows: number;
23 | }
24 |
25 | export type ReturnData = {
26 | data: T;
27 | }
28 |
29 | export type ReturnPageData = {
30 | total: number;
31 | rows: T[];
32 | }
33 |
34 | export type PaginationConfig = {
35 | page: number;
36 | pageSize: number;
37 | };
38 |
39 | export type PageSizeType = {
40 | page: number;
41 | rows: number;
42 | }
43 |
44 | export type TaskListMess = {
45 | flag: string;
46 | list: T[];
47 | mes: string;
48 | mes2: string|null;
49 | }
50 |
51 | export type TaskResult = {
52 | flag: string;
53 | result: string;
54 | }
55 |
--------------------------------------------------------------------------------
/src/assets/imgs/common/formlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/src/assets/imgs/common/formlight.png
--------------------------------------------------------------------------------
/src/assets/imgs/common/logo5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/src/assets/imgs/common/logo5.png
--------------------------------------------------------------------------------
/src/assets/imgs/common/logo_login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/src/assets/imgs/common/logo_login.png
--------------------------------------------------------------------------------
/src/assets/imgs/common/overseas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzbcf/react-admin/194878006033352d1d0dfc1145cb6554cbf982d9/src/assets/imgs/common/overseas.png
--------------------------------------------------------------------------------
/src/components/business/labelList/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-23 17:12:29
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | .labelList{
16 | margin-left: 0!important;
17 | margin-right: 0!important;
18 | padding: 12px 0;
19 | .ant-col{
20 | .label{
21 | font-weight: bold;
22 | }
23 | .text{
24 | border-bottom: 1px solid black;
25 | margin-left: 6px;
26 | }
27 | }
28 | }
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/components/business/labelList/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-23 16:30:38
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React from 'react';
16 | import { Row, Col } from 'antd';
17 | import './index.less';
18 | export type LabeItem = {
19 | label: string;
20 | title: string;
21 | }
22 |
23 | type Props = {
24 | list: LabeItem[];
25 | wrapperCol?: {
26 | labelCol: number;
27 | titleCol: number;
28 | };
29 | border?: boolean; // 是否要边框
30 | itemCol?: number;
31 | }
32 |
33 | const LabelList: React.FC = (props) => {
34 | const { list, itemCol = 12, border = true, wrapperCol = { labelCol: 2, titleCol: 8 }} = props;
35 |
36 | return (
37 |
38 | {
39 | list.map((item: LabeItem, i: number) => (
40 |
41 |
42 | { item.label }:
43 | { item.title }
44 |
45 |
46 | ))
47 | }
48 |
49 | );
50 | };
51 |
52 | export default LabelList;
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/components/business/searchList/index.less:
--------------------------------------------------------------------------------
1 | .searchForm{
2 | padding:0 10px;
3 | background: #fff;
4 | width: 100%;
5 | h4{
6 | padding: 10px 0;
7 | }
8 | .selectInput{
9 | width: 100%;
10 | display: flex;
11 | }
12 | .ant-col{
13 | .ant-space{
14 | width: 100%;
15 | .ant-picker{
16 | width: 100%;
17 | }
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/src/components/business/taskCom/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-25 11:08:41
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | #taskCom {
15 | width: 100%;
16 | background-color: #fff;
17 | position: relative;
18 | height: 100%;
19 | display: flex;
20 | flex-direction: column;
21 | .time{
22 | padding: 12px 12px;
23 | }
24 | .search{
25 | margin-bottom: 6px;
26 | padding: 0 12px;
27 | }
28 | h4{
29 | padding: 0 12px;
30 | }
31 | .list {
32 | width: 100%;
33 | height: 100%;
34 | padding-bottom: 6px;
35 | flex: auto;
36 | overflow-y: auto;
37 | overflow-x: hidden;
38 | padding: 0 12px 12px;
39 | .ant-tree {
40 | width: 100%;
41 | .ant-tree-treenode-switcher-close,
42 | .ant-tree-treenode {
43 | width: 220px;
44 | overflow: hidden;
45 | .ant-tree-node-content-wrapper {
46 | overflow: hidden;
47 | .ant-tree-title {
48 | white-space: nowrap;
49 | overflow: hidden;
50 | text-overflow: ellipsis;
51 | display: block;
52 | width: 100%;
53 | }
54 | }
55 | }
56 | .ant-tree-list{
57 | .ant-tree-list-holder-inner{
58 | .ant-tree-switcher-noop{
59 | display: none;
60 | }
61 | }
62 | }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/components/business/terminalInfo/content.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : content.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-09 10:52:13
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React from 'react';
16 | import { List, Table } from 'antd';
17 | import { ColumnsType } from 'antd/es/table';
18 | import './index.less';
19 | export type ItemType = 'List' | 'Table';
20 | export type DataItem = {
21 | label: string;
22 | value: string | number;
23 | };
24 | type Props = {
25 | type: ItemType;
26 | data: T[];
27 | colunms?: ColumnsType;
28 | key?: string;
29 | };
30 |
31 | const TerminalContent = (props: Props) => {
32 | const { type, data, colunms, key = 'key' } = props;
33 |
34 | if (type === 'List') {
35 | return (
36 | (
45 |
46 |
47 | {item.label}:
48 |
49 |
50 | {item.value}
51 |
52 |
53 | )}
54 | />
55 | );
56 | }
57 | if (type === 'Table') {
58 | return ;
59 | }
60 | return null;
61 | };
62 |
63 | export default TerminalContent;
64 |
--------------------------------------------------------------------------------
/src/components/business/terminalInfo/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-09 18:25:09
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | .terminalModal{
14 | .ant-modal-content{
15 | .ant-modal-close{
16 | .ant-modal-close-x{
17 | width: 36px;
18 | height: 36px;
19 | line-height: 36px;
20 | }
21 | }
22 | .ant-modal-header{
23 | padding: 8px 16px;
24 | }
25 | .ant-modal-body{
26 | padding: 0 16px 16px;
27 | .ant-tabs-nav{
28 | margin-bottom: 10px;
29 | }
30 | .ant-tabs-tabpane>div{
31 | height: 300px;
32 | overflow-y: auto;
33 | }
34 | .ant-tabs-tabpane>div::-webkit-scrollbar{
35 | width: 2px;
36 | }
37 | .ant-tabs-tabpane>div::-webkit-scrollbar-thumb {
38 | border-radius: 10px;
39 | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
40 | background: rgba(0, 0, 0, 0.2);
41 | }
42 | .ant-tabs-tabpane>div::-webkit-scrollbar-track {
43 | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
44 | border-radius: 0;
45 | background: rgba(0, 0, 0, 0.1);
46 | }
47 | }
48 | .ant-modal-footer{
49 | padding: 0;
50 | }
51 | }
52 | }
53 | .terminal{
54 | .ant-spin-container{
55 | .ant-list-item{
56 | display: flex;
57 | align-items: center;
58 | border-bottom: 1px solid #f0f0f0;
59 | padding-bottom: 6px;
60 | margin-bottom: 6px;
61 | .label,
62 | .value{
63 | display: block;
64 | width: 50%;
65 | overflow: hidden;
66 | white-space: nowrap;
67 | text-overflow: ellipsis;
68 | }
69 | .label{
70 | font-weight: 600;
71 | text-align: right;
72 | margin-right: 10px;
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/components/business/transfer/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-30 18:20:29
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | .transferMain{
15 | width: 100%;
16 | display: flex;
17 | align-items: flex-start;
18 | height: 100%;
19 | .leftTable,
20 | .rightTable{
21 | flex: 1;
22 | width: 100%;
23 | height: 100%;
24 | border: 1px solid #DADADA;
25 | padding: 10px 0 50px;
26 | position: relative;
27 | overflow: hidden;
28 | background-color: #fff;
29 | .content{
30 | position: relative;
31 | height: 100%;
32 | display: flex;
33 | flex-direction: column;
34 | .top{
35 | flex-shrink: 0;
36 | }
37 | .table{
38 | height: 100%;
39 | flex: 1;
40 | overflow: hidden;
41 | .ant-table-wrapper,
42 | .ant-spin-nested-loading,
43 | .ant-spin-container,
44 | .ant-table,
45 | .ant-table-container{
46 | height: 100%;
47 | }
48 | }
49 | }
50 | .pagination{
51 | position: absolute;
52 | bottom: 10px;
53 | left: 6px;
54 | }
55 | }
56 | .btnGroup{
57 | width: 60px;
58 | padding: 10px;
59 | display: flex;
60 | align-items: center;
61 | flex-direction: column;
62 | justify-content: center;
63 | height: 100%;
64 | .ant-btn{
65 | margin-bottom: 20px;
66 | }
67 | }
68 | }
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/src/components/common/btnList/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-09-06 15:59:58
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | #btnList{
15 | display: flex;
16 | align-items: center;
17 | .ant-btn{
18 | margin-right: 8px;
19 | }
20 | }
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/components/common/columnsSelect/index.less:
--------------------------------------------------------------------------------
1 | .columnsList{
2 | cursor: pointer;
3 | .thList{
4 | opacity: 0;
5 | z-index: 9;
6 | .ant-select-selection-item{
7 | cursor: pointer;
8 | }
9 | .ant-select-selection-overflow-item-suffix{
10 | display: none;
11 | }
12 | }
13 | .icon{
14 | display: flex;
15 | position: absolute;
16 | top: 0;
17 | left: 0;
18 | align-items: center;
19 | justify-content: center;
20 | z-index: 6;
21 | background: @bg-color;
22 | border-radius: 4px;
23 | margin-left: 12px;
24 | padding: 4px 6px;
25 | :first-child{
26 | margin-right: 1px;
27 | }
28 | >span{
29 | font-size: 18px;
30 | color: #fff;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/src/components/common/echarts/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-16 15:03:37
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React, { useEffect } from 'react';
16 | import * as echarts from 'echarts';
17 |
18 | type Props = {
19 | option: any;
20 | selectId: string;
21 | width?: string;
22 | height?: string;
23 | }
24 |
25 | const EchartsPage = (props: Props) => {
26 | const { option, selectId, width = '100%', height = '100%' } = props;
27 | // 初始化echarts实例
28 |
29 | useEffect(() => {
30 | const dom: HTMLElement = document.getElementById(`${selectId}`) as HTMLElement;
31 | let myEcharts: null | echarts.EChartsType = echarts.getInstanceByDom(dom);
32 |
33 | if (!myEcharts) {
34 | if (width === '100%' || height === '100%') {
35 | myEcharts = echarts.init(dom);
36 | } else {
37 | myEcharts = echarts.init(dom, '', {
38 | width: parseInt(width, 10),
39 | height: parseInt(height, 10),
40 | });
41 | }
42 | }
43 |
44 | // 绘制图表并清除缓存
45 | myEcharts.setOption(option, true);
46 | }, [ option ]);
47 |
48 | return (
49 |
50 | );
51 | };
52 |
53 | export default EchartsPage;
54 |
--------------------------------------------------------------------------------
/src/components/common/editableCell/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-12-20 11:04:25
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React from 'react';
16 | import { InputNumber, Input, Form } from 'antd';
17 | import { LangMessage } from 'src/store/common/language';
18 | interface EditableCellProps extends React.HTMLAttributes {
19 | editing: boolean;
20 | dataIndex: string;
21 | title: any;
22 | inputType: 'number' | 'text';
23 | record: T;
24 | index: number;
25 | Mes: LangMessage;
26 | children: React.ReactNode;
27 | }
28 |
29 | const Index = ({
30 | editing,
31 | dataIndex,
32 | title,
33 | inputType,
34 | children,
35 | Mes,
36 | ...restProps
37 | }:EditableCellProps) => {
38 | const inputNode = inputType === 'number' ? : ;
39 |
40 | return (
41 |
42 | {editing ? (
43 |
51 | {inputNode}
52 |
53 | ) : (
54 | children
55 | )}
56 | |
57 | );
58 | };
59 |
60 | export default Index;
61 |
--------------------------------------------------------------------------------
/src/components/common/icon/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 在有些场景中使用icon['CopyrightOutlined'],ts提示报错。所以外加层皮,并any不检查,同时只导入需要的icon
3 | */
4 |
5 | import {
6 | HomeOutlined,
7 | TableOutlined,
8 | UnorderedListOutlined,
9 | CopyOutlined,
10 | UserOutlined,
11 | LockOutlined,
12 | MenuUnfoldOutlined,
13 | MenuFoldOutlined,
14 | CopyrightOutlined,
15 | FullscreenOutlined,
16 | FullscreenExitOutlined,
17 | TeamOutlined,
18 | OrderedListOutlined,
19 | UserAddOutlined,
20 | LoadingOutlined,
21 | FileSearchOutlined,
22 | SolutionOutlined,
23 | UserSwitchOutlined,
24 | BarChartOutlined,
25 | ApartmentOutlined,
26 | ClusterOutlined,
27 | SettingOutlined,
28 | AuditOutlined,
29 | AppstoreAddOutlined,
30 | AppstoreOutlined,
31 | ToolOutlined,
32 | } from '@ant-design/icons';
33 |
34 | export default {
35 | HomeOutlined,
36 | TableOutlined,
37 | UnorderedListOutlined,
38 | CopyOutlined,
39 | UserOutlined,
40 | LockOutlined,
41 | MenuUnfoldOutlined,
42 | MenuFoldOutlined,
43 | CopyrightOutlined,
44 | FullscreenOutlined,
45 | FullscreenExitOutlined,
46 | TeamOutlined,
47 | OrderedListOutlined,
48 | UserAddOutlined,
49 | LoadingOutlined,
50 | FileSearchOutlined,
51 | SolutionOutlined,
52 | UserSwitchOutlined,
53 | BarChartOutlined,
54 | ApartmentOutlined,
55 | ClusterOutlined,
56 | SettingOutlined,
57 | AuditOutlined,
58 | AppstoreAddOutlined,
59 | AppstoreOutlined,
60 | ToolOutlined,
61 | } as any;
62 |
--------------------------------------------------------------------------------
/src/components/common/language/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 语言切换公共组件
3 | */
4 | // eslint-disable-next-line no-use-before-define
5 | import React from 'react';
6 | import { message, Select } from 'antd';
7 | import { connect } from 'react-redux';
8 | import { LANG_SWITCH, ACTION } from 'src/store/common/language';
9 | import * as api from 'src/api';
10 | import useFetchState from 'src/utils/useFetchState';
11 | import { showLoading, hideLoading } from 'src/components/common/loding';
12 | import { LangMessage } from 'src/store/common/language';
13 | const { Option } = Select;
14 |
15 | type Props = {
16 | dispatch: React.Dispatch;
17 | locale: string;
18 | className: string;
19 | Mes: LangMessage;
20 | }
21 |
22 | const Lang: React.FC = (props) => {
23 | const { locale, dispatch, className, Mes } = props;
24 |
25 | const [ lang, setLang ] = useFetchState(localStorage.getItem('language') || 'Languages');
26 |
27 | const handleChange = async (res: string) => {
28 | showLoading();
29 | try {
30 | setLang(res);
31 | const data = await api.lang.getLangResource(res);
32 |
33 | dispatch({
34 | type: LANG_SWITCH,
35 | value: {
36 | locale: res,
37 | message: data,
38 | },
39 | });
40 | localStorage.setItem('language', res);
41 | } catch (error) {
42 | console.error(error);
43 | message.error(typeof error === 'string' ? error : Mes['messageAlarmRequestfailrequestfail']);
44 | }
45 | hideLoading();
46 | };
47 |
48 | return (
49 |
60 | );
61 | };
62 |
63 | export default connect((state: any) => ({
64 | locale: state.langSwitch.locale,
65 | Mes: state.langSwitch.message,
66 | }))(Lang);
67 |
--------------------------------------------------------------------------------
/src/components/common/language/langLocale.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * antd组件的语言切换
3 | */
4 | import zhCN from 'antd/lib/locale/zh_CN';
5 | import enUS from 'antd/lib/locale/en_US';
6 | import esES from 'antd/lib/locale/es_ES';
7 | import { Locale } from 'antd/lib/locale-provider';
8 | type LangLocale = {
9 | [index:string]: Locale
10 | }
11 | const langLocale: LangLocale = {
12 | 'zh_CN': zhCN,
13 | 'en_US': enUS,
14 | 'es_ES': esES,
15 | };
16 |
17 | export default langLocale;
18 |
--------------------------------------------------------------------------------
/src/components/common/loding/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-03 22:55:31
6 | * Description :
7 | * -----
8 | * Last Modified: 2021-07-12 22:19:00
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | // eslint-disable-next-line no-use-before-define
14 | import React from 'react';
15 | import ReactDOM from 'react-dom';
16 | import { Spin } from 'antd';
17 |
18 | const showLoading = () => {
19 | const loading = document.getElementById('loading') as HTMLElement;
20 |
21 | if (!loading) {
22 | const dom = document.createElement('div');
23 |
24 | dom.setAttribute('id', 'loading');
25 | document.body.appendChild(dom);
26 | ReactDOM.render(, dom);
27 | }
28 | };
29 |
30 | const hideLoading = (timeout = 0) => {
31 | setTimeout(() => {
32 | const loading = document.getElementById('loading') as HTMLElement;
33 |
34 | if (loading) {
35 | document.body.removeChild(loading);
36 | }
37 | }, timeout);
38 | };
39 |
40 | export { showLoading, hideLoading };
41 |
--------------------------------------------------------------------------------
/src/components/common/toLoad/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { Spin } from 'antd';
4 |
5 | const ToLoad: React.FC = () =>
6 |
7 |
8 |
;
9 |
10 | export default ToLoad;
11 |
--------------------------------------------------------------------------------
/src/components/footer/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 底部footer组件
3 | */
4 | // eslint-disable-next-line no-use-before-define
5 | import React from 'react';
6 | import {CopyrightOutlined} from '@ant-design/icons';
7 |
8 | const Footer = () =>
9 |
10 | 2021 WASION INTERNATIONAL
11 |
;
12 |
13 | export default Footer;
14 |
--------------------------------------------------------------------------------
/src/components/header/newsNotice.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : newsNotice.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2022-01-04 18:17:51
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React from 'react';
16 | import ReactDOM from 'react-dom';
17 | import Icon from 'src/assets/imgs/common/formlight.png';
18 | import { LangMessage } from 'src/store/common/language';
19 | import { CloseOutlined } from '@ant-design/icons';
20 |
21 | const newsNotice = (row: any, status: string, Mes:LangMessage) => {
22 | console.log('a-----');
23 | const id = `notice${row.result}`;
24 | const notcie = document.getElementById(id) as HTMLElement;
25 |
26 | if (!notcie) {
27 | const dom = document.createElement('div');
28 | const closeEvent = (selector:string) => {
29 | const news = document.getElementById(selector) as HTMLElement;
30 |
31 | if (news) {
32 | document.body.removeChild(news);
33 | }
34 | };
35 |
36 | dom.setAttribute('id', id);
37 | dom.setAttribute('class', 'newModal');
38 | document.body.appendChild(dom);
39 | ReactDOM.render((
40 |
41 | {Mes['titleNewMessage']}
42 | closeEvent(id)} />
43 |
44 |
45 |
46 |
{ Mes[status] }
47 |
{ row['result']}
48 |
{ row['etime'] }
49 |
50 |

51 |
52 |
), dom);
53 | setTimeout(() => {
54 | const news = document.getElementById(id) as HTMLElement;
55 |
56 | if (news) {
57 | document.body.removeChild(news);
58 | }
59 | }, 3000);
60 | }
61 | };
62 |
63 | export default newsNotice;
64 |
--------------------------------------------------------------------------------
/src/components/menu/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-07 09:46:42
6 | * Description :
7 | * -----
8 | * Last Modified: 2021-12-14 16:49:29
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | #menuNav{
15 | overflow-y: auto;
16 | }
17 | #menuNav::-webkit-scrollbar{
18 | width: 2px;
19 | }
20 | #menuNav::-webkit-scrollbar-thumb {
21 | border-radius: 10px;
22 | box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
23 | background: rgba(0,0,0,0.2);
24 | }
25 | #menuNav::-webkit-scrollbar-track {
26 | box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
27 | border-radius: 0;
28 | background: rgba(0,0,0,0.1);
29 | }
30 |
31 | #menuTabs{
32 | width: 100%;
33 | height: 34px;
34 | overflow-x: auto;
35 | overflow-y: hidden;
36 | border-bottom:1px solid #d9d9d9;
37 | .content{
38 | display: flex;
39 | margin-bottom: 0;
40 | height: 100%;
41 | align-items: center;
42 | .menuBg{
43 | flex-shrink:0;
44 | cursor: pointer;
45 | }
46 | }
47 |
48 | }
49 |
50 | #menuTabs::-webkit-scrollbar{
51 | height: 6px;
52 | }
53 | #menuTabs::-webkit-scrollbar-thumb {
54 | border-radius: 10px;
55 | box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
56 | background: rgba(0,0,0,0.2);
57 | transition: all ease 1s;
58 | cursor: pointer;
59 | }
60 | #menuTabs::-webkit-scrollbar-track {
61 | box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
62 | border-radius: 0;
63 | background: rgba(0,0,0,0.1);
64 | }
65 |
66 | .menuOpenStyle{
67 | width: 240px!important;
68 | max-width: 240px!important;
69 | min-width: 240px!important;
70 | flex: 0 0 240px!important;
71 | }
72 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import reportWebVitals from './reportWebVitals';
5 | import { BrowserRouter } from 'react-router-dom';
6 | import { Provider } from 'react-redux';
7 | import App from './App';
8 | import { store, persistor } from './store';
9 | import { PersistGate } from 'redux-persist/lib/integration/react';
10 | import Toload from 'src/components/common/toLoad';
11 | import 'antd/dist/antd.less';
12 | import 'src/utils/style/index.less';
13 | import 'font-awesome/css/font-awesome.css';
14 | store.subscribe(() =>
15 | console.log('subscribe-', store.getState())
16 | );
17 |
18 | ReactDOM.render(
19 |
20 | } persistor={persistor}>
21 |
22 |
23 |
24 |
25 | ,
26 | document.getElementById('root')
27 | );
28 |
29 | // If you want to start measuring performance in your app, pass a function
30 | // to log results (for example: reportWebVitals(console.log))
31 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
32 | reportWebVitals();
33 |
--------------------------------------------------------------------------------
/src/layout/home/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.module.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-08 10:27:26
6 | * Description :
7 | * -----
8 | * Last Modified: 2021-10-13 14:20:53
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | .home{
16 | .header{
17 | box-shadow: -1px 2px 4px 0px rgba(0,0,0,0.13);
18 | }
19 | .layoutSider{
20 | position: relative;
21 | z-index: 99;
22 | .ant-layout-sider{
23 | position: relative;
24 | z-index: 99;
25 | transition: all 0.2s;
26 | }
27 | .layoutMain{
28 | position: absolute;
29 | width: 100%!important;
30 | height: 100%;
31 | z-index: 98;
32 | left: 0;
33 | padding-left: 80px;
34 | }
35 | }
36 | .layoutContent {
37 | width: 100%;
38 | height: 100%;
39 | display: flex;
40 | flex-direction: column;
41 | .routerContent{
42 | flex:1;
43 | overflow: hidden;
44 | padding: 6px;
45 | > div{
46 | width: 100%;
47 | height: 100%;
48 | > div {
49 | width: 100%;
50 | height: 100%;
51 | > div {
52 | width: 100%;
53 | height: 100%;
54 | overflow: auto;
55 | padding: 0 12px 12px 12px;
56 | background-color: #fff;
57 | position: relative;
58 | }
59 | > div::-webkit-scrollbar{
60 | width: 2px;
61 | }
62 | > div::-webkit-scrollbar-thumb {
63 | border-radius: 10px;
64 | box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
65 | background: rgba(0,0,0,0.2);
66 | }
67 | > div::-webkit-scrollbar-track {
68 | box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
69 | border-radius: 0;
70 | background: rgba(0,0,0,0.1);
71 | }
72 | }
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/layout/home/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 业务上层布局组件
3 | */
4 | // eslint-disable-next-line no-use-before-define
5 | import React, {useEffect} from 'react';
6 | import Routers from 'src/router/router';
7 | import Menu from 'src/components/menu';
8 | import { connect } from 'react-redux';
9 | import HeaderDom from 'src/components/header';
10 | import MenuTabs from 'src/components/menu/menuTabs';
11 | import News from 'src/components/header/news';
12 | import { Layout, message } from 'antd';
13 | import Scoket from 'src/utils/websocket';
14 | import bus from 'src/utils/eventBus';
15 | import './index.less';
16 |
17 | const { Header, Content } = Layout;
18 |
19 | type Props = {
20 | newsShow: boolean;
21 | };
22 |
23 | const Main = (props: Props) => {
24 | const { newsShow } = props;
25 | const ws = new Scoket();
26 |
27 | // websocket链接与离开销毁
28 | useEffect(() => {
29 | ws.connection();
30 |
31 | return () => {
32 | ws.onClose();
33 | };
34 | }, []);
35 |
36 | // webscoket发送消息
37 | useEffect(() => {
38 | bus.on('sendMsg', async (data) => {
39 | try {
40 | ws.sendMessage(data);
41 | } catch (error: any) {
42 | message.error(error.String());
43 | }
44 | });
45 | return () => {
46 | bus.removeAllListeners('sendMsg');
47 | };
48 | }, []);
49 |
50 | return (
51 |
52 | {/* 头部 */}
53 |
56 |
57 | {/* 菜单 */}
58 |
59 |
60 |
61 | {/* 菜单标签 */}
62 |
63 | {/* 主要业务模块 */}
64 |
65 |
66 |
67 |
68 | {/* 消息 */}
69 | {newsShow && }
70 |
71 |
72 |
73 | );
74 | };
75 |
76 | export default connect((state: any) => ({
77 | newsShow: state.toggleNews.newsShow,
78 | }))(Main);
79 |
--------------------------------------------------------------------------------
/src/layout/login/index.less:
--------------------------------------------------------------------------------
1 | .loginLayout{
2 | padding-top: 60px;
3 | .antLayoutHeader{
4 | background: none!important;
5 | display: flex;
6 | justify-content: flex-end;
7 | }
8 | .loginForm{
9 | width: 100%;
10 | .loginFormButton{
11 | width: 100%;
12 | }
13 | .blackLang{
14 | width: 100px;
15 | .ant-select-selector{
16 | background-color:#fff!important;
17 | border-color: #d9d9d9!important;
18 |
19 | }
20 | }
21 | }
22 | .antLangoutFooter{
23 | background: none!important;
24 | }
25 | .leftBg{
26 | display: block;
27 | width: 242px;
28 | height: 320px;
29 | }
30 | .rightBox{
31 | padding: 16px 16px 0;
32 | background-color: #FBFBFB;
33 | }
34 | .ChangeForm{
35 | width: 100%;
36 | }
37 | }
--------------------------------------------------------------------------------
/src/layout/refused/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 404页面
3 | */
4 | // eslint-disable-next-line no-use-before-define
5 | import React from 'react';
6 | import { Result, Button } from 'antd';
7 | import { Link } from 'react-router-dom';
8 |
9 | const NoFound: React.FC = () =>
14 | Back Home
15 | }
16 | />;
17 |
18 | export default NoFound;
19 |
--------------------------------------------------------------------------------
/src/layout/refused/noAccess.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : noAccess
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-21 10:39:57
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React from 'react';
16 | import { Result, Button } from 'antd';
17 | import { Link } from 'react-router-dom';
18 |
19 | const NoAccessPage = () => ( Back Home }/>);
24 |
25 | export default NoAccessPage;
26 |
27 |
--------------------------------------------------------------------------------
/src/layout/refused/serviceException.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : page500.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-21 10:49:22
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | // eslint-disable-next-line no-use-before-define
16 | import React from 'react';
17 | import { Result, Button } from 'antd';
18 | import { Link } from 'react-router-dom';
19 |
20 | const NoAccessPage = () => ( Back Home }/>);
25 |
26 | export default NoAccessPage;
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/deviceMonitoring/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-26 16:44:00
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | .dcuMonitoring{
15 | height:100%;
16 | .wrap{
17 | height: 100%;
18 | flex: 1;
19 | border: 1px solid #DADADA;
20 | padding-top: 12px;
21 | .searchForm{
22 | border-bottom: 1px solid #DADADA;
23 | .ant-form-item{
24 | margin-bottom: 12px;
25 | }
26 | }
27 | .table{
28 | height: 100%;
29 | flex: 1;
30 | }
31 | .page{
32 | padding: 12px 0 12px 12px;
33 | }
34 | }
35 | }
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/deviceMonitoring/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | // import useFetchState from 'src/utils/useFetchState';
6 | import DcuMonitoring from './dcuMonitoring';
7 | // import MeterMonitoring from './meterMonitoring';
8 | import {Tabs} from 'antd';
9 | import './index.less';
10 | const { TabPane } = Tabs;
11 |
12 | type Props = {
13 | Mes: LangMessage,
14 | }
15 | const DeviceMonitoring: React.FC = (props) => {
16 | const { Mes } = props;
17 |
18 | return (
19 |
20 |
21 |
22 |
23 |
24 | {/*
25 |
26 | */}
27 |
28 |
29 | );
30 | };
31 |
32 | export default connect((state: any) => ({
33 | Mes: state.langSwitch.message,
34 | }))(DeviceMonitoring);
35 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/firmwareUpgrade/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React, {useRef} from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import RemoteUpgrade, {UPRef} from './remoteUpgrade';
6 | import QueryResult from './queryResult';
7 | import useFetchState from 'src/utils/useFetchState';
8 | import { Tabs } from 'antd';
9 | import './index.less';
10 | const { TabPane } = Tabs;
11 |
12 | type Props = {
13 | Mes: LangMessage,
14 | }
15 | const FirmwareUpgrade: React.FC = (props) => {
16 | const { Mes } = props;
17 | const upRef = useRef();
18 | const [ activeKey, setActiveKey ] = useFetchState('1');
19 | // 控制结果页数据展示
20 | const [ queryFlag, setQueryFlag ] = useFetchState(false);
21 | const handleTabsChange = (val: string, flag?: boolean) => {
22 | if (flag) {
23 | setQueryFlag(true);
24 | }
25 | if (parseInt(val, 10) === 1) {
26 | setQueryFlag(false);
27 | upRef.current?.refreshInfo();
28 | }
29 | setActiveKey(val);
30 | };
31 |
32 | return (
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | );
44 | };
45 |
46 |
47 | export default connect((state: any) => ({
48 | Mes: state.langSwitch.message,
49 | }))(FirmwareUpgrade);
50 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/meterParam/index.less:
--------------------------------------------------------------------------------
1 | .metertParam{
2 | .meterControl{
3 | display: flex;
4 | height: 100%;
5 | .fileList{
6 | width: 240px;
7 | height: 100%;
8 | padding: 12px;
9 | border: 1px solid #dadada;
10 | display: flex;
11 | flex-direction: column;
12 | .search {
13 | padding: 6px 0;
14 | margin-bottom: 0;
15 | }
16 | .list {
17 | width: 100%;
18 | height: 100%;
19 | padding-bottom: 6px;
20 | flex: auto;
21 | overflow-y: auto;
22 | overflow-x: hidden;
23 | .ant-tree {
24 | width: 100%;
25 | .ant-tree-treenode-switcher-close,
26 | .ant-tree-treenode {
27 | width: 220px;
28 | overflow: hidden;
29 | .ant-tree-switcher-noop{
30 | display: none;
31 | }
32 | .ant-tree-node-content-wrapper {
33 | overflow: hidden;
34 | .ant-tree-title {
35 | white-space: nowrap;
36 | overflow: hidden;
37 | text-overflow: ellipsis;
38 | display: block;
39 | width: 100%;
40 | }
41 | }
42 | }
43 | }
44 | }
45 | }
46 | #deviceTree{
47 | margin: 0 12px;
48 | }
49 | .paramList{
50 | width:100%;
51 | flex:1;
52 | height: 100%;
53 | display: flex;
54 | flex-direction: column;
55 | .table{
56 | height: 100%;
57 | flex: 1;
58 | }
59 | .page{
60 | padding: 6px;
61 | }
62 | .top{
63 | padding: 6px;
64 | .ant-select{
65 | width: 100%;
66 | }
67 | }
68 | }
69 | }
70 | .queryResult{
71 | .wrapRight {
72 | .page {
73 | border-bottom: 1px solid #dadada;
74 | border-top: 1px solid #dadada;
75 | padding: 6px 0;
76 | margin-left: 0!important;
77 | }
78 | .statistical {
79 | margin-left: 0!important;
80 | > .ant-col {
81 | border-right: 1px solid #dadada;
82 | padding: 6px 0;
83 | }
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/meterReadingSuccessRate/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-15 10:37:36
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | .noComMeterQuery{
15 | display: flex;
16 | flex-direction: column;
17 | .page{
18 | padding-top:6px;
19 | }
20 | }
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/meterReadingSuccessRate/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-08 15:34:26
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React from 'react';
16 | import { connect } from 'react-redux';
17 | import { LangMessage } from 'src/store/common/language';
18 | import MeterReadRate from './meterReadRate';
19 | import NoComMeterQuery from './noComMeterQuery';
20 | import './index.less';
21 | import { Tabs } from 'antd';
22 | const { TabPane } = Tabs;
23 |
24 | type Props = {
25 | Mes: LangMessage,
26 | }
27 | const MeterReadControl: React.FC = (props) => {
28 | const { Mes } = props;
29 |
30 |
31 | return (
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | );
43 | };
44 |
45 |
46 | export default connect((state: any) => ({
47 | Mes: state.langSwitch.message,
48 | }))(MeterReadControl);
49 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/networkManagement/nodeLink.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : nodeLink.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-12-08 19:14:43
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | // eslint-disable-next-line no-use-before-define
16 | import React from 'react';
17 | import { connect } from 'react-redux';
18 | import { LangMessage } from 'src/store/common/language';
19 | import { List } from 'antd';
20 |
21 | type NodeListRow = {
22 | title: string;
23 | hideLabel: string;
24 | }
25 |
26 | export type NodeList = NodeListRow[];
27 |
28 | type Props = {
29 | Mes: LangMessage;
30 | subSysNo: string;
31 | list: NodeList;
32 | }
33 | const NodeLink: React.FC = (props) => {
34 | const { list } = props;
35 |
36 | return (
37 | {index + 1 }、{item.title}:{item.hideLabel}}
41 | />
42 | );
43 | };
44 |
45 | export default connect((state: any) => ({
46 | Mes: state.langSwitch.message,
47 | subSysNo: state.userInfo.sysType,
48 | }))(NodeLink);
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/pages/amiFunction/taskManagement/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-10-18 19:17:28
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | .taskMgnt{
16 | display: flex;
17 | flex-direction: column;
18 | .contentWrap{
19 | height: 100%;
20 | flex: 1;
21 | .wrapRight{
22 | .opterate {
23 | padding-left: 12px;
24 | }
25 | .table{
26 | overflow-y: auto;
27 | overflow-x: hidden;
28 | }
29 | .search{
30 | margin-bottom: 0;
31 | padding-bottom: 6px;
32 | padding-left: 12px;
33 | border-bottom: 1px solid #DADADA;
34 | #search-form{
35 | .ant-row-start{
36 | >.ant-col{
37 | padding-left: 0!important;
38 | .ant-row{
39 | margin-bottom: 0;
40 | }
41 | }
42 | }
43 | }
44 | }
45 | }
46 | }
47 | }
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/pages/basicData/excelFileImport/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import { Tabs } from 'antd';
6 | import useFetchState from 'src/utils/useFetchState';
7 | import ExcelFileTab from './excelFile';
8 | import ExcelDataTab from './excelData';
9 |
10 | type Props = {
11 | Mes: LangMessage;
12 | subSysNo: string;
13 | };
14 |
15 | const ExcelFileImportPage: React.FC = (props) => {
16 | const { Mes, subSysNo } = props;
17 | const { TabPane } = Tabs;
18 | const [ tabKey, setTabKey ] = useFetchState('1');
19 |
20 | const changeTabs = (key: string) => {
21 | setTabKey(key);
22 | };
23 |
24 | return (<>
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | >);
40 | };
41 |
42 |
43 | export default connect((state:any) => ({
44 | Mes: state.langSwitch.message,
45 | subSysNo: state.userInfo.sysType,
46 | }))(ExcelFileImportPage);
47 |
--------------------------------------------------------------------------------
/src/pages/collectReport/lineLossQuery/index.less:
--------------------------------------------------------------------------------
1 | .statisticsTitle{
2 | font-size: 18px;
3 | font-weight: bold;
4 | }
5 |
6 | .statisticsContent{
7 | width: 100%;
8 | font-size: 16px;
9 | border-bottom: 1px solid black;
10 | margin-top: 10px;
11 | }
--------------------------------------------------------------------------------
/src/pages/components/deviceTree/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-07-30 14:50:10
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React, {useRef} from 'react';
16 | import DeviceTree, {CRef} from 'src/components/business/deviceTree';
17 |
18 | const DeviceTreePage = () => {
19 | const cRef = useRef();
20 | const onNodeCheck = (value: any) => {
21 | console.log('onNodeCheck--------', value);
22 | };
23 |
24 | return (
25 |
26 | );
27 | } ;
28 |
29 | export default DeviceTreePage;
30 |
31 |
--------------------------------------------------------------------------------
/src/pages/components/labelList/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-23 16:43:11
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | // eslint-disable-next-line no-use-before-define
16 | import React from 'react';
17 | import LabelList, { LabeItem } from 'src/components/business/labelList';
18 |
19 | const LabelListPage = () => {
20 | const list: LabeItem[] = [
21 | {
22 | label: 'Name',
23 | title: 'string',
24 | },
25 | {
26 | label: 'iphone',
27 | title: '123456788',
28 | },
29 | {
30 | label: 'email',
31 | title: '123456788',
32 | },
33 | ];
34 |
35 | return (
36 |
37 |
38 |
39 | );
40 | };
41 |
42 | export default LabelListPage;
43 |
44 |
--------------------------------------------------------------------------------
/src/pages/components/searchList/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import SearchList from 'src/components/business/searchList';
6 | type Props = {
7 | message: LangMessage,
8 | }
9 |
10 | const SearchListPage: React.FC = () => {
11 | const columns: any[] = [
12 | {
13 | type: 'Input',
14 | name: 'name',
15 | label: '姓名',
16 | props: {
17 | placeholder: '测试',
18 | },
19 | rules: [ { required: true } ],
20 | },
21 | {
22 | type: 'Select',
23 | name: 'projectType',
24 | label: '类型',
25 | options: [
26 | {
27 | value: '1',
28 | name: '入门',
29 | },
30 | {
31 | value: '2',
32 | name: '普调',
33 | },
34 | {
35 | value: '3',
36 | name: '专业',
37 | },
38 | ],
39 | props: {
40 | defaultValue: '1',
41 | },
42 | },
43 | {
44 | type: 'DatePicker',
45 | name: 'date',
46 | label: '时间',
47 | props: {
48 | showTime: 'showTime',
49 | },
50 | },
51 | {
52 | type: 'DatePicker',
53 | name: 'date',
54 | label: '时间',
55 | props: {
56 | showTime: 'showTime',
57 | },
58 | },
59 | ];
60 | const onFinish = (values: any) => {
61 | console.log(values);
62 | };
63 |
64 | return
65 |
66 |
;
67 | };
68 |
69 | export default connect((state: any) => ({
70 | message: state.langSwitch.message,
71 | }))(SearchListPage);
72 |
--------------------------------------------------------------------------------
/src/pages/components/table/details/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 |
4 | const Details: React.FC = () =>
5 | 我是详情
6 |
7 | ;
8 |
9 | export default Details;
10 |
--------------------------------------------------------------------------------
/src/pages/components/table/list/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 |
4 | const List: React.FC = () =>
5 | 我是列表
6 |
7 | ;
8 |
9 | export default List;
10 |
--------------------------------------------------------------------------------
/src/pages/components/task/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-24 18:57:32
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 | // eslint-disable-next-line no-use-before-define
15 | import React, {useRef} from 'react';
16 | import TaskCom, {TaskRef} from 'src/components/business/taskCom';
17 | // import { RangePickerProps } from 'antd/lib/date-picker/index.d';
18 | const TaskPage = () => {
19 | // const TimePicker: RangePickerProps = {
20 | // showTime: true,
21 | // picker: 'date',
22 | // };
23 | const taskRef = useRef>();
24 | const onChick = (row: any) => {
25 | console.log('selectedRowKeys-----', row);
26 | };
27 |
28 | const getLeftTreeData = (val: any) => {
29 | console.log(val);
30 | };
31 |
32 | const groupTaskFormatTitle = (v:any) => `${v}`;
33 |
34 | return (
35 |
36 |
42 |
43 | );
44 | };
45 |
46 | export default TaskPage;
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/pages/components/transfer/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-08-31 10:05:23
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | .transferPage{
14 | background-color: #fff;
15 | padding: 40px;
16 | > .container{
17 | overflow: hidden;
18 | height: 500px;
19 | width: 1200px;
20 | }
21 | .leftSolt,
22 | .rightSolt{
23 | width: 100%;
24 | margin-bottom: 6px;
25 | padding-left: 6px;
26 | .ant-select{
27 | width: 100%;
28 | }
29 | }
30 | }
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/pages/configuration/NTPConfig/index.less:
--------------------------------------------------------------------------------
1 |
2 | .onlineDot {
3 | width: 10px;
4 | height: 10px;
5 | border-radius: 5px;
6 | background: #00ff00;
7 | margin-top: 4px;
8 | }
9 |
10 | .offlineDot {
11 | width: 10px;
12 | height: 10px;
13 | border-radius: 5px;
14 | background: #ff0000;
15 | margin-top: 4px;
16 | }
17 |
--------------------------------------------------------------------------------
/src/pages/configuration/NTPConfig/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import { Tabs } from 'antd';
6 | import NtpConfig from './ntpConfig';
7 | import NtpTask from './ntpTask';
8 |
9 | type Props = {
10 | Mes: LangMessage;
11 | subSysNo: string;
12 | };
13 | const NtpConfigPage: React.FC = (props) => {
14 | const { Mes, subSysNo } = props;
15 | const { TabPane } = Tabs;
16 |
17 | return (<>
18 |
19 | {/*
20 |
{Mes['menuTitleCommandConfig']}
21 | */}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | >);
35 | };
36 |
37 |
38 | export default connect((state:any) => ({
39 | Mes: state.langSwitch.message,
40 | subSysNo: state.userInfo.sysType,
41 | }))(NtpConfigPage);
42 |
--------------------------------------------------------------------------------
/src/pages/configuration/alarmInfoConfig/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React, { useRef} from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import { Tabs } from 'antd';
6 | import TaskTab, { TRef } from './task';
7 | import AlarmConfigTab from './alarmConfig';
8 | import AlarmValueTab from './alarmValue';
9 | import useFetchState from 'src/utils/useFetchState';
10 |
11 | type Props = {
12 | Mes: LangMessage;
13 | subSysNo: string;
14 | };
15 |
16 | const AlarmInfoPage: React.FC = (props) => {
17 | const { Mes, subSysNo } = props;
18 | const { TabPane } = Tabs;
19 | const [ tabKey, setTabKey ] = useFetchState('1');
20 | const tRef = useRef();
21 | const changeTabs = (key: string) => {
22 | setTabKey(key);
23 | };
24 |
25 | const excuteTask = () => {
26 | setTabKey('2');
27 | tRef.current?.initSearch();
28 | };
29 |
30 | return (<>
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | >);
50 | };
51 |
52 |
53 | export default connect((state:any) => ({
54 | Mes: state.langSwitch.message,
55 | subSysNo: state.userInfo.sysType,
56 | }))(AlarmInfoPage);
57 |
--------------------------------------------------------------------------------
/src/pages/configuration/commandConfig/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import { Tabs } from 'antd';
6 | import CommandState from './commandStatus';
7 | import CommandEdit from './commandEdit';
8 |
9 | type Props = {
10 | Mes: LangMessage;
11 | };
12 | const CommandConfigPage: React.FC = (props) => {
13 | const { Mes } = props;
14 | const { TabPane } = Tabs;
15 |
16 | return (<>
17 |
18 | {/*
19 |
{Mes['menuTitleCommandConfig']}
20 | */}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | >);
34 | };
35 |
36 |
37 | export default connect((state:any) => ({
38 | Mes: state.langSwitch.message,
39 | }))(CommandConfigPage);
40 |
--------------------------------------------------------------------------------
/src/pages/configuration/configDcuArchive/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React, { useRef} from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import { Tabs } from 'antd';
6 | import useFetchState from 'src/utils/useFetchState';
7 | import TaskTab, { TRef } from './task';
8 | import ConfigDcuArchiveTab from './configDcuArchive';
9 |
10 |
11 | type Props = {
12 | Mes: LangMessage;
13 | subSysNo: string;
14 | };
15 |
16 | const ConfigDcuArchivePage: React.FC = (props) => {
17 | const { Mes, subSysNo } = props;
18 | const { TabPane } = Tabs;
19 | const [ tabKey, setTabKey ] = useFetchState('1');
20 | const tRef = useRef();
21 | const changeTabs = (key: string) => {
22 | setTabKey(key);
23 | };
24 |
25 | const excuteTask = () => {
26 | setTabKey('2');
27 | tRef.current?.initSearch();
28 | };
29 |
30 | return (<>
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | >);
46 | };
47 |
48 |
49 | export default connect((state:any) => ({
50 | Mes: state.langSwitch.message,
51 | subSysNo: state.userInfo.sysType,
52 | }))(ConfigDcuArchivePage);
53 |
--------------------------------------------------------------------------------
/src/pages/configuration/configLoadProfile/index.less:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.less
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-18 18:52:38
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 | .contnectControl{
14 | .configLoad{
15 | .section{
16 | margin-left: 12px!important;
17 | margin-right: 0!important;
18 | .card{
19 | padding: 12px;
20 | border:1px solid #ccc;
21 | .ant-select{
22 | width: 100%;
23 | }
24 | }
25 | .cardBody{
26 | >.ant-row{
27 | margin-left: 0!important;
28 | border:1px solid #ccc;
29 | height: 100%;
30 | padding: 12px 0;
31 | >.ant-col-24{
32 | display: flex;
33 | flex-direction: column;
34 | .top{
35 | padding-bottom:12px;
36 | }
37 | .table{
38 | height: 100%;
39 | flex: 1;
40 | }
41 | }
42 | }
43 | }
44 | }
45 | }
46 | .configureTask{
47 | display: flex;
48 | height: 100%;
49 | .left{
50 | width: 260px;
51 | border:1px solid #ccc;
52 | height: 100%;
53 | padding: 12px;
54 | .top{
55 | padding-bottom: 12px;
56 | }
57 | }
58 | .right{
59 | width: 100%;
60 | flex: 1;
61 | height: 100%;
62 | margin-left: 12px;
63 | border: 1px solid #ccc;
64 | padding: 12px;
65 | display: flex;
66 | flex-direction: column;
67 | .table{
68 | height: 100%;
69 | flex: 1;
70 | }
71 | }
72 | }
73 | }
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/src/pages/configuration/configLoadProfile/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | * FileName : index.tsx
3 | * ProjectName : admin
4 | * Author : terrorblade
5 | * Created Date: 2021-11-15 14:46:41
6 | * Description :
7 | * -----
8 | * Last Modified:
9 | * Modified By :
10 | * -----
11 | * Copyright (c) 2021 Magina Corporation. All rights reserved.
12 | */
13 |
14 |
15 | // eslint-disable-next-line no-use-before-define
16 | import React from 'react';
17 | import { connect } from 'react-redux';
18 | import { LangMessage } from 'src/store/common/language';
19 | import ConfigureLoad from './configure';
20 | import ConfigLoadTask from './task';
21 | import './index.less';
22 | import { Tabs } from 'antd';
23 | const { TabPane } = Tabs;
24 |
25 | type Props = {
26 | Mes: LangMessage,
27 | }
28 | const ConfigLoadProfileControl: React.FC = (props) => {
29 | const { Mes } = props;
30 |
31 |
32 | return (
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | );
44 | };
45 |
46 |
47 | export default connect((state: any) => ({
48 | Mes: state.langSwitch.message,
49 | }))(ConfigLoadProfileControl);
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/pages/configuration/dcuSchedule/index.tsx:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-use-before-define
2 | import React from 'react';
3 | import { connect } from 'react-redux';
4 | import { LangMessage } from 'src/store/common/language';
5 | import { Tabs } from 'antd';
6 | import useFetchState from 'src/utils/useFetchState';
7 | import ScheduleReadingConfig from './sheduleReadingConfig';
8 | import QueryTaskResult from './queryTaskResult';
9 |
10 | type Props = {
11 | Mes: LangMessage;
12 | subSysNo: string;
13 | };
14 |
15 | const DcuSchedulePage: React.FC = (props) => {
16 | const { Mes, subSysNo } = props;
17 | const { TabPane } = Tabs;
18 | const [ tabKey, setTabKey ] = useFetchState('1');
19 |
20 | const changeTabs = (key: string) => {
21 | setTabKey(key);
22 | };
23 |
24 | return (<>
25 |
26 |
27 |
28 |