@vtx/modals2 6.0.0-beta.5 → 6.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/lib/_components/index.js +1 -0
  2. package/lib/_components/vm-appraisal-info/api.js +55 -0
  3. package/lib/_components/vm-appraisal-info/imgs/count.png +0 -0
  4. package/lib/_components/vm-appraisal-info/imgs/count_light.png +0 -0
  5. package/lib/_components/vm-appraisal-info/imgs/subtract.png +0 -0
  6. package/lib/_components/vm-appraisal-info/imgs/subtract_light.png +0 -0
  7. package/lib/_components/vm-appraisal-info/index.js +230 -0
  8. package/lib/_components/vm-appraisal-info/index.less +7 -0
  9. package/lib/_components/vm-card-statistics/index.less +27 -27
  10. package/lib/_components/vm-factor-list/index.less +11 -11
  11. package/lib/_components/vm-filter/style/index.less +7 -11
  12. package/lib/_components/vm-line-charts/index.js +4 -1
  13. package/lib/_components/vm-repair-maintain/index.js +32 -0
  14. package/lib/_components/vm-video/HistoryGrid.js +53 -3
  15. package/lib/_components/vm-video/RealtimeGrid.js +24 -3
  16. package/lib/_components/vm-video/index.js +99 -37
  17. package/lib/_components/vm-video/index.less +18 -14
  18. package/lib/_hooks/useGetChannels.js +20 -6
  19. package/lib/_util/http.js +26 -0
  20. package/lib/vtx-base-modal/Tabs/index.js +2 -1
  21. package/lib/vtx-car-modal/components/Info/index.js +1 -1
  22. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  23. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  24. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  25. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +2 -1
  26. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
  27. package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +2 -5
  28. package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +7 -1
  29. package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +8 -4
  30. package/lib/vtx-cp-modal/index.js +12 -12
  31. package/lib/vtx-default-modal/index.js +5 -4
  32. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
  33. package/lib/vtx-df-modal/index.js +3 -13
  34. package/lib/vtx-kh-modal/components/Record/index.js +1 -205
  35. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
  36. package/lib/vtx-road-modal/components/BaseInfo/Work.js +9 -1
  37. package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +8 -1
  38. package/lib/vtx-road-modal/index.js +6 -3
  39. package/lib/vtx-road-modal/utils/url.js +12 -0
  40. package/lib/vtx-shxq-modal/api.js +2 -2
  41. package/lib/vtx-shxq-modal/index.js +18 -3
  42. package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +4 -1
  43. package/lib/vtx-wr-modal/index.js +23 -4
  44. package/lib/vtx-zzz-modal/index.js +6 -12
  45. package/package.json +92 -92
@@ -12,11 +12,19 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { request } from '@vtx/utils';
14
14
  import { useEffect, useState } from 'react';
15
+ import Appraisal from "../_components/vm-appraisal-info";
15
16
  import VmCustom from "../_components/vm-custom";
17
+ import VmRepairMaintain from "../_components/vm-repair-maintain";
18
+ import VmVideo, { insertVideoTab } from "../_components/vm-video";
19
+ import useGetChannels from "../_hooks/useGetChannels";
20
+ import { CommonService } from "../_service";
16
21
  import VtxBaseModal from "../vtx-base-modal";
17
22
  import VtxDefaultModal from "../vtx-default-modal";
18
23
  import { Appraise, Base, Build, File, Score } from "./components";
19
24
  import "./style";
25
+ var TABS_APPRAISAL = 'appraisal';
26
+ var TABS_VIDEO = 'video';
27
+ var TABS_RM = 'rm';
20
28
  import { translateLocaleText } from "./../hooks/useTranslation.js";
21
29
 
22
30
  //弹窗配置
@@ -49,19 +57,24 @@ export default (function (props) {
49
57
  _useState4 = _slicedToArray(_useState3, 2),
50
58
  config = _useState4[0],
51
59
  setConfig = _useState4[1];
60
+ var _CommonService$useBas = CommonService.useBaseInfo(id),
61
+ info = _CommonService$useBas.info;
62
+ var _useGetChannels = useGetChannels("".concat((info === null || info === void 0 ? void 0 : info.typeCode) || 'wr', "_").concat(info === null || info === void 0 ? void 0 : info.code), !!(info !== null && info !== void 0 && info.code)),
63
+ channels = _useGetChannels.channels;
52
64
  useEffect(function () {
53
65
  getByCode({
54
66
  code: 'wr'
55
67
  }).then(function (res) {
56
68
  if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
57
- setConfig((res.data.popupConfigJson || []).filter(function (item) {
69
+ var tabsConfig = (res.data.popupConfigJson || []).filter(function (item) {
58
70
  return item.display;
59
71
  }).map(function (item) {
60
72
  return _objectSpread(_objectSpread({}, item), {}, {
61
73
  key: item.code,
62
74
  title: item.name
63
75
  });
64
- }));
76
+ });
77
+ setConfig(tabsConfig);
65
78
  }
66
79
  });
67
80
  }, []);
@@ -74,7 +87,13 @@ export default (function (props) {
74
87
  }
75
88
  });
76
89
  }, [id]);
77
- var contentList = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'base', /*#__PURE__*/_jsx(Base, _objectSpread(_objectSpread({}, props), {}, {
90
+ var contentList = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_APPRAISAL, /*#__PURE__*/_jsx(Appraisal, {
91
+ id: id
92
+ })), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
93
+ channels: channels
94
+ })), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
95
+ id: id
96
+ })), 'base', /*#__PURE__*/_jsx(Base, _objectSpread(_objectSpread({}, props), {}, {
78
97
  detail: detail
79
98
  }))), 'appraise', /*#__PURE__*/_jsx(Appraise, _objectSpread({}, props))), 'score', /*#__PURE__*/_jsx(Score, _objectSpread({}, props))), 'build', /*#__PURE__*/_jsx(Build, _objectSpread({}, props))), 'file', /*#__PURE__*/_jsx(File, _objectSpread({}, props)));
80
99
 
@@ -97,7 +116,7 @@ export default (function (props) {
97
116
  title: title,
98
117
  id: id,
99
118
  onCancel: onCancel,
100
- tabs: config,
119
+ tabs: insertVideoTab(config, channels),
101
120
  contents: contentList,
102
121
  tabChose: (_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.key,
103
122
  modalShow: modalShow,
@@ -7,10 +7,11 @@ import VmRepairMaintain from "../_components/vm-repair-maintain";
7
7
  import useGetChannels from "../_hooks/useGetChannels";
8
8
  import { BaseInfo as DefaultBaseInfo } from "../vtx-default-modal/components";
9
9
  import { BaseInfo, Calendar, Metering, WorkCondition } from "../vtx-df-modal/components";
10
+ import Appraisal from "../_components/vm-appraisal-info";
10
11
  import { translateLocaleText } from "./../hooks/useTranslation.js";
11
12
  // import Appraisal from '../vm-appraisal-info';
12
13
  import VmCustom from "../_components/vm-custom";
13
- import VmVideo from "../_components/vm-video";
14
+ import VmVideo, { insertVideoTab } from "../_components/vm-video";
14
15
  import useGetConfig from "../_hooks/useGetConfig";
15
16
  import { CommonService } from "../_service";
16
17
  import VtxBaseModal from "../vtx-base-modal";
@@ -68,18 +69,9 @@ var VtxDfModal = function VtxDfModal(props) {
68
69
  return ele.key !== 'metering';
69
70
  });
70
71
  }
71
- if (tabsList.findIndex(function (ele) {
72
- return ele.key === 'video';
73
- }) > -1) {
74
- if ((channels === null || channels === void 0 ? void 0 : channels.length) < 1) {
75
- tabsList = tabsList.filter(function (ele) {
76
- return ele.key !== 'video';
77
- });
78
- }
79
- }
80
- return tabsList;
72
+ return insertVideoTab(tabsList, channels);
81
73
  }, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(detail)]);
82
- var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, !(detail !== null && detail !== void 0 && detail.beenWeigh) && !(realtimeMonitor !== null && realtimeMonitor !== void 0 && realtimeMonitor.length) ? /*#__PURE__*/_jsx(DefaultBaseInfo, {
74
+ var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, !(detail !== null && detail !== void 0 && detail.beenWeigh) && !(realtimeMonitor !== null && realtimeMonitor !== void 0 && realtimeMonitor.length) ? /*#__PURE__*/_jsx(DefaultBaseInfo, {
83
75
  id: id,
84
76
  info: info,
85
77
  photos: photos,
@@ -98,6 +90,8 @@ var VtxDfModal = function VtxDfModal(props) {
98
90
  code: info === null || info === void 0 ? void 0 : info.code
99
91
  })), TABS_Calendar, /*#__PURE__*/_jsx(Calendar, {
100
92
  code: info === null || info === void 0 ? void 0 : info.code
93
+ })), TABS_APPRAISAL, /*#__PURE__*/_jsx(Appraisal, {
94
+ id: id
101
95
  })), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
102
96
  id: id
103
97
  })), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
package/package.json CHANGED
@@ -1,92 +1,92 @@
1
- {
2
- "name": "@vtx/modals2",
3
- "version": "6.0.0-beta.5",
4
- "description": "弹窗组件",
5
- "license": "MIT",
6
- "module": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "files": [
9
- "lib"
10
- ],
11
- "scripts": {
12
- "build": "father build",
13
- "build:watch": "father dev",
14
- "dev": "dumi dev",
15
- "docs:build": "dumi build",
16
- "docs:preview": "dumi preview",
17
- "doctor": "father doctor",
18
- "lint": "npm run lint:es && npm run lint:css",
19
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
- "prepare": "husky install && dumi setup",
22
- "prepublishOnly": "npm run build",
23
- "start": "npm run dev"
24
- },
25
- "dependencies": {
26
- "@turf/turf": "^7.3.4",
27
- "ahooks": "^3.1.5",
28
- "axios": "^0.21.1",
29
- "base-64": "^1.0.0",
30
- "classnames": "^2.5.1",
31
- "dayjs": "^1.11.10",
32
- "echarts": "^5.3.2",
33
- "echarts-for-react": "3.0.2",
34
- "htmr": "^1.0.2",
35
- "lodash": "^4.17.21",
36
- "number-precision": "^1.6.0",
37
- "proj4": "^2.20.8",
38
- "qs": "^6.0.0",
39
- "react-tagcloud": "^2.3.3",
40
- "viewerjs": "^1.3.3"
41
- },
42
- "devDependencies": {
43
- "@ant-design/icons": "6.0.0",
44
- "@babel/preset-react": "^7.28.5",
45
- "@babel/runtime": "^7.6.3",
46
- "@commitlint/cli": "^17.1.2",
47
- "@commitlint/config-conventional": "^17.1.0",
48
- "@types/lodash": "^4.14.202",
49
- "@types/qs": "^6.9.11",
50
- "@types/react": "^18.0.0",
51
- "@types/react-dom": "^18.0.0",
52
- "@umijs/lint": "^4.0.0",
53
- "@vtx/components": "^4.0.0-beta.58",
54
- "@vtx/ol-map": "^2.0.0-beta.16",
55
- "@vtx/player": "latest",
56
- "@vtx/utils": "^1.0.20",
57
- "ol": "6.15.1",
58
- "antd": "6.0.0",
59
- "antd-dayjs-webpack-plugin": "^1.0.6",
60
- "babel-eslint": "^10.1.0",
61
- "babel-plugin-import": "^1.13.8",
62
- "dumi": "^2.2.13",
63
- "echarts-liquidfill": "^3.1.0",
64
- "eslint": "^8.23.0",
65
- "father": "^4.1.0",
66
- "husky": "^8.0.1",
67
- "lint-staged": "^13.0.3",
68
- "prettier": "^2.7.1",
69
- "prettier-plugin-organize-imports": "^3.0.0",
70
- "prettier-plugin-packagejson": "^2.2.18",
71
- "react": "18.0.0",
72
- "react-dom": "18.0.0",
73
- "stylelint": "^14.9.1",
74
- "@vtx/map-icon": "^2.0.62"
75
- },
76
- "peerDependencies": {
77
- "antd": ">=6",
78
- "@ant-design/icons": ">=6",
79
- "@vtx/components": ">=4.0.0-beta.0",
80
- "@vtx/map-icon": ">=2.0.0",
81
- "@vtx/ol-map": ">=2.0.0-beta.0",
82
- "@vtx/player": ">=1.0.0",
83
- "@vtx/utils": ">=1.0.20",
84
- "ol": ">=6.15.1",
85
- "react": ">=18",
86
- "react-dom": ">=18"
87
- },
88
- "publishConfig": {
89
- "access": "public"
90
- },
91
- "authors": []
92
- }
1
+ {
2
+ "name": "@vtx/modals2",
3
+ "version": "6.0.0-beta.8",
4
+ "description": "弹窗组件",
5
+ "license": "MIT",
6
+ "module": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "files": [
9
+ "lib"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "dev": "dumi dev",
15
+ "docs:build": "dumi build",
16
+ "docs:preview": "dumi preview",
17
+ "doctor": "father doctor",
18
+ "lint": "npm run lint:es && npm run lint:css",
19
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
+ "prepare": "husky install && dumi setup",
22
+ "prepublishOnly": "npm run build",
23
+ "start": "npm run dev"
24
+ },
25
+ "dependencies": {
26
+ "@turf/turf": "^7.3.4",
27
+ "ahooks": "^3.1.5",
28
+ "axios": "^0.21.1",
29
+ "base-64": "^1.0.0",
30
+ "classnames": "^2.5.1",
31
+ "dayjs": "^1.11.10",
32
+ "echarts": "^5.3.2",
33
+ "echarts-for-react": "3.0.2",
34
+ "htmr": "^1.0.2",
35
+ "lodash": "^4.17.21",
36
+ "number-precision": "^1.6.0",
37
+ "proj4": "^2.20.8",
38
+ "qs": "^6.0.0",
39
+ "react-tagcloud": "^2.3.3",
40
+ "viewerjs": "^1.3.3"
41
+ },
42
+ "devDependencies": {
43
+ "@ant-design/icons": "6.0.0",
44
+ "@babel/preset-react": "^7.28.5",
45
+ "@babel/runtime": "^7.6.3",
46
+ "@commitlint/cli": "^17.1.2",
47
+ "@commitlint/config-conventional": "^17.1.0",
48
+ "@types/lodash": "^4.14.202",
49
+ "@types/qs": "^6.9.11",
50
+ "@types/react": "^18.0.0",
51
+ "@types/react-dom": "^18.0.0",
52
+ "@umijs/lint": "^4.0.0",
53
+ "@vtx/components": "^4.0.0-beta.58",
54
+ "@vtx/map-icon": "^2.0.62",
55
+ "@vtx/ol-map": "^2.0.0-beta.16",
56
+ "@vtx/player": "^1.12.7",
57
+ "@vtx/utils": "^1.0.20",
58
+ "antd": "6.0.0",
59
+ "antd-dayjs-webpack-plugin": "^1.0.6",
60
+ "babel-eslint": "^10.1.0",
61
+ "babel-plugin-import": "^1.13.8",
62
+ "dumi": "^2.2.13",
63
+ "echarts-liquidfill": "^3.1.0",
64
+ "eslint": "^8.23.0",
65
+ "father": "^4.1.0",
66
+ "husky": "^8.0.1",
67
+ "lint-staged": "^13.0.3",
68
+ "ol": "6.15.1",
69
+ "prettier": "^2.7.1",
70
+ "prettier-plugin-organize-imports": "^3.0.0",
71
+ "prettier-plugin-packagejson": "^2.2.18",
72
+ "react": "18.0.0",
73
+ "react-dom": "18.0.0",
74
+ "stylelint": "^14.9.1"
75
+ },
76
+ "peerDependencies": {
77
+ "@ant-design/icons": ">=6",
78
+ "@vtx/components": ">=4.0.0-beta.0",
79
+ "@vtx/map-icon": ">=2.0.0",
80
+ "@vtx/ol-map": ">=2.0.0-beta.0",
81
+ "@vtx/player": ">=1.0.0",
82
+ "@vtx/utils": ">=1.0.20",
83
+ "antd": ">=6",
84
+ "ol": ">=6.15.1",
85
+ "react": ">=18",
86
+ "react-dom": ">=18"
87
+ },
88
+ "publishConfig": {
89
+ "access": "public"
90
+ },
91
+ "authors": []
92
+ }