@vtx/modals2 6.0.0-beta.16 → 6.0.0-beta.18

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.
@@ -11,8 +11,7 @@ var VtxThemeContext = /*#__PURE__*/React.createContext({
11
11
  mapInfo: {
12
12
  coordinate: '',
13
13
  mapType: 'bmap'
14
- },
15
- zdReborn: false
14
+ }
16
15
  });
17
16
  var VtxThemeProvider = VtxThemeContext.Provider;
18
17
  export { VtxThemeContext };
@@ -14,8 +14,7 @@ var useSettings = function useSettings() {
14
14
  endDate = _useContext.endDate,
15
15
  date = _useContext.date,
16
16
  mapInfo = _useContext.mapInfo,
17
- contentStyle = _useContext.contentStyle,
18
- zdReborn = _useContext.zdReborn;
17
+ contentStyle = _useContext.contentStyle;
19
18
  return {
20
19
  theme: theme,
21
20
  tabPosition: 'top',
@@ -26,8 +25,7 @@ var useSettings = function useSettings() {
26
25
  endDate: endDate,
27
26
  date: date,
28
27
  mapInfo: mapInfo,
29
- contentStyle: contentStyle,
30
- zdReborn: zdReborn
28
+ contentStyle: contentStyle
31
29
  };
32
30
  };
33
31
  export default useSettings;
@@ -0,0 +1,36 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { request } from '@vtx/utils';
8
+ import { useRequest } from 'ahooks';
9
+ import { useState } from 'react';
10
+ /**
11
+ * 获取终端、人员服务配置信息
12
+ * @returns
13
+ */
14
+ export var useZdService = function useZdService() {
15
+ var _useState = useState({
16
+ zdService: 'zd',
17
+ ryService: 'staff'
18
+ }),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ serviceConfig = _useState2[0],
21
+ setServiceConfig = _useState2[1];
22
+ useRequest(function () {
23
+ return request.get('/cloud/management/api/v101/user/config/component/get', {
24
+ data: {
25
+ componentCode: 'POPUP_MODAL_SERVICE'
26
+ }
27
+ });
28
+ }, {
29
+ onSuccess: function onSuccess(data) {
30
+ var _data$data;
31
+ var json = data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.configInfo;
32
+ if (json) setServiceConfig(JSON.parse(json));
33
+ }
34
+ });
35
+ return serviceConfig;
36
+ };
@@ -47,8 +47,6 @@ var VmBaseModal = function VmBaseModal(props) {
47
47
  title = _props$title === void 0 ? '' : _props$title,
48
48
  _props$theme = props.theme,
49
49
  theme = _props$theme === void 0 ? 'light' : _props$theme,
50
- _props$zdReborn = props.zdReborn,
51
- zdReborn = _props$zdReborn === void 0 ? false : _props$zdReborn,
52
50
  _props$type = props.type,
53
51
  type = _props$type === void 0 ? '' : _props$type,
54
52
  id = props.id,
@@ -142,7 +140,6 @@ var VmBaseModal = function VmBaseModal(props) {
142
140
  var value = useMemo(function () {
143
141
  return {
144
142
  theme: theme,
145
- zdReborn: zdReborn,
146
143
  startDate: startDate ? dayjs(startDate) : undefined,
147
144
  endDate: endDate ? dayjs(endDate) : undefined,
148
145
  date: date ? dayjs(date) : undefined,
@@ -151,7 +148,7 @@ var VmBaseModal = function VmBaseModal(props) {
151
148
  chartFontColor: theme === 'light' ? '#595959' : '#FFFFFF',
152
149
  chartLineColor: theme === 'light' ? 'rgba(0,0,26,0.15)' : 'rgba(255,255,255,0.15)'
153
150
  };
154
- }, [theme, zdReborn, startDate, endDate, date, mapInfo, tabPosition]);
151
+ }, [theme, startDate, endDate, date, mapInfo, tabPosition]);
155
152
  var openHistory = useMemoizedFn(function () {
156
153
  var src = '';
157
154
  var prefix = '';
@@ -21,14 +21,13 @@ import { CarContext } from "../../../index";
21
21
  import "./index.less";
22
22
  import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- var BaseInfo = function BaseInfo() {
24
+ var BaseInfo = function BaseInfo(_ref) {
25
+ var zdReborn = _ref.zdReborn;
25
26
  var _useContext = useContext(CarContext),
26
- id = _useContext.id,
27
27
  startDate = _useContext.startDate,
28
28
  info = _useContext.info;
29
29
  var _useSettings = useSettings(),
30
- isDark = _useSettings.isDark,
31
- zdReborn = _useSettings.zdReborn;
30
+ isDark = _useSettings.isDark;
32
31
  var _useState = useState(dayjs(startDate)),
33
32
  _useState2 = _slicedToArray(_useState, 2),
34
33
  date = _useState2[0],
@@ -23,10 +23,10 @@ import lightJclIcon from "../../../imgs/calendar/jcl.png";
23
23
  import { CarContext } from "../../../index";
24
24
  import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
25
25
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
26
- var StaticInfo = function StaticInfo() {
26
+ var StaticInfo = function StaticInfo(_ref) {
27
+ var zdReborn = _ref.zdReborn;
27
28
  var _useSettings = useSettings(),
28
- isDark = _useSettings.isDark,
29
- zdReborn = _useSettings.zdReborn;
29
+ isDark = _useSettings.isDark;
30
30
  var _useState = useState('calendar'),
31
31
  _useState2 = _slicedToArray(_useState, 2),
32
32
  type = _useState2[0],
@@ -13,18 +13,16 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { useSetState } from 'ahooks';
14
14
  import { useContext } from 'react';
15
15
  import { VmTable, VmWrapper } from "../../../../_components";
16
- import useSettings from "../../../../_hooks/useSettings";
17
16
  import { LjzyService } from "../../../api";
18
17
  import { CarContext } from "../../../index";
19
18
  import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
20
19
  import { jsx as _jsx } from "react/jsx-runtime";
21
20
  var Detail = function Detail(_ref) {
22
21
  var startDate = _ref.startDate,
23
- endDate = _ref.endDate;
22
+ endDate = _ref.endDate,
23
+ zdReborn = _ref.zdReborn;
24
24
  var _useContext = useContext(CarContext),
25
25
  info = _useContext.info;
26
- var _useSettings = useSettings(),
27
- zdReborn = _useSettings.zdReborn;
28
26
  var _useSetState = useSetState({
29
27
  pagination: {
30
28
  current: 1,
@@ -14,10 +14,10 @@ import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
14
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  var Summary = function Summary(_ref) {
16
16
  var startDate = _ref.startDate,
17
- endDate = _ref.endDate;
17
+ endDate = _ref.endDate,
18
+ zdReborn = _ref.zdReborn;
18
19
  var _useSettings = useSettings(),
19
- isDark = _useSettings.isDark,
20
- zdReborn = _useSettings.zdReborn;
20
+ isDark = _useSettings.isDark;
21
21
  var _useContext = useContext(CarContext),
22
22
  id = _useContext.id,
23
23
  info = _useContext.info;
@@ -10,11 +10,12 @@ import dayjs from 'dayjs';
10
10
  import { VmWrapper } from "../../../../_components";
11
11
  import { VMRangePicker } from "../../../../_components/vm-filter";
12
12
  import useSettings from "../../../../_hooks/useSettings";
13
+ import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
13
14
  import Detail from "./Detail";
14
15
  import Summary from "./Summary";
15
- import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- var WorkRecord = function WorkRecord() {
17
+ var WorkRecord = function WorkRecord(_ref) {
18
+ var zdReborn = _ref.zdReborn;
18
19
  var _useSettings = useSettings(),
19
20
  sDate = _useSettings.startDate,
20
21
  eDate = _useSettings.endDate;
@@ -56,13 +57,15 @@ var WorkRecord = function WorkRecord() {
56
57
  span: 24,
57
58
  children: /*#__PURE__*/_jsx(Summary, {
58
59
  startDate: formatStartDate,
59
- endDate: formatEndDate
60
+ endDate: formatEndDate,
61
+ zdReborn: zdReborn
60
62
  })
61
63
  }), /*#__PURE__*/_jsx(Col, {
62
64
  span: 24,
63
65
  children: /*#__PURE__*/_jsx(Detail, {
64
66
  startDate: formatStartDate,
65
- endDate: formatEndDate
67
+ endDate: formatEndDate,
68
+ zdReborn: zdReborn
66
69
  })
67
70
  })]
68
71
  });
@@ -16,6 +16,7 @@ import React, { useMemo } from 'react';
16
16
  import { VmCustom, VmIframeModal, VmVideo } from "../_components";
17
17
  import useGetChannels from "../_hooks/useGetChannels";
18
18
  import useGetConfig from "../_hooks/useGetConfig";
19
+ import { useZdService } from "../_hooks/useUmsService";
19
20
  import VtxBaseModal from "../vtx-base-modal";
20
21
  import { translateLocaleText } from "./../hooks/useTranslation.js";
21
22
  import { BaseService, OilService } from "./api";
@@ -131,19 +132,19 @@ var VtxCarModal = function VtxCarModal(props) {
131
132
  _props$iframeUrl = props.iframeUrl,
132
133
  iframeUrl = _props$iframeUrl === void 0 ? '' : _props$iframeUrl,
133
134
  _props$width = props.width,
134
- width = _props$width === void 0 ? null : _props$width,
135
- _props$zdReborn = props.zdReborn,
136
- zdReborn = _props$zdReborn === void 0 ? false : _props$zdReborn;
135
+ width = _props$width === void 0 ? null : _props$width;
136
+ var serviceConfig = useZdService();
137
137
  var _BaseService$useBaseI = BaseService.useBaseInfo(id),
138
138
  detail = _BaseService$useBaseI.detail,
139
139
  info = _BaseService$useBaseI.info;
140
+ var zdReborn = (serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.zdService) === 'reborn';
140
141
  var _OilService$useHasOil = OilService.useHasOil(id),
141
142
  beenOilStatus = _OilService$useHasOil.beenOilStatus;
142
143
  var _BaseService$useField = BaseService.useFieldConfig(),
143
144
  showFields = _BaseService$useField.showFields;
144
145
  var code = useMemo(function () {
145
146
  var code = '';
146
- var actionType = info === null || info === void 0 ? void 0 : info.actionType;
147
+ var actionType = 'ACTION_LJZY' || (info === null || info === void 0 ? void 0 : info.actionType);
147
148
  if (defaultCode) {
148
149
  code = defaultCode;
149
150
  } else if (actionType && !defaultCode) {
@@ -165,9 +166,8 @@ var VtxCarModal = function VtxCarModal(props) {
165
166
  }, [defaultCode, info === null || info === void 0 ? void 0 : info.actionType]);
166
167
  var tabs = useMemo(function () {
167
168
  var tabs = [];
168
- var _ref = info || {},
169
- _ref$actionType = _ref.actionType,
170
- actionType = _ref$actionType === void 0 ? '' : _ref$actionType;
169
+ // const { actionType = '' } = info || {};
170
+ var actionType = 'ACTION_LJZY';
171
171
  if (!actionType) {
172
172
  return [];
173
173
  }
@@ -314,7 +314,13 @@ var VtxCarModal = function VtxCarModal(props) {
314
314
  setIframeModalInfo = _useSetState2[1];
315
315
  var contents = (_contents = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_BASE, /*#__PURE__*/_jsx(Common.BaseInfo, {})), TABS_STATIC, /*#__PURE__*/_jsx(Common.StaticInfo, {})), TABS_ALARM, /*#__PURE__*/_jsx(Common.AlarmInfo, {})), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
316
316
  channels: channels
317
- })), TABS_OIL, /*#__PURE__*/_jsx(Common.OilConsumption, {})), TABS_WATER, /*#__PURE__*/_jsx(Common.WaterConsumption, {})), TABS_WATER_USE, /*#__PURE__*/_jsx(Common.WaterUse, {})), TABS_ELE_USE, /*#__PURE__*/_jsx(Common.EleUse, {})), TABS_OIL_USE, /*#__PURE__*/_jsx(Common.OilUse, {})), TABS_OPERATION, /*#__PURE__*/_jsx(Common.OperationAnalysis, {})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_MAINTENANCE, /*#__PURE__*/_jsx(Common.Maintenance, {})), TABS_DETAIL, /*#__PURE__*/_jsx(Common.DetailInfo, {})), TABS_DEVICE, /*#__PURE__*/_jsx(Common.DeviceInfo, {})), TABS_JXH_BASE, /*#__PURE__*/_jsx(JXH.BaseInfo, {})), TABS_JXH_STATIC, /*#__PURE__*/_jsx(JXH.StaticInfo, {})), TABS_JXH_WORK, /*#__PURE__*/_jsx(JXH.WorkRecord, {})), TABS_JXH_ALARM, /*#__PURE__*/_jsx(JXH.AlarmInfo, {})), TABS_JXH_BASE_HW_2, /*#__PURE__*/_jsx(JXH.Hw2BaseInfo, {})), TABS_JXH_STATIC_HW_2, /*#__PURE__*/_jsx(JXH.Hw2StaticInfo, {})), TABS_JXH_WORK_HW_2, /*#__PURE__*/_jsx(JXH.Hw2WorkRecord, {})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_JXH_ALARM_HW_2, /*#__PURE__*/_jsx(JXH.Hw2AlarmInfo, {})), TABS_LJSY_BASE, /*#__PURE__*/_jsx(Ljsy.BaseInfo, {})), TABS_LJSY_STATIC, /*#__PURE__*/_jsx(Ljsy.StaticInfo, {})), TABS_LJSY_WORK, /*#__PURE__*/_jsx(Ljsy.WorkRecord, {})), TABS_LJSY_ALARM, /*#__PURE__*/_jsx(Ljsy.AlarmInfo, {})), TABS_CC_BASE, /*#__PURE__*/_jsx(Cc.BaseInfo, {})), TABS_CC_ORDER, /*#__PURE__*/_jsx(Cc.OrderInfo, {})), TABS_CC_STATIC, /*#__PURE__*/_jsx(Cc.StaticInfo, {})), TABS_CC_WORK, /*#__PURE__*/_jsx(Cc.WorkRecord, {})), TABS_CC_ALARM, /*#__PURE__*/_jsx(Cc.AlarmInfo, {})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_LJZY_BASE, /*#__PURE__*/_jsx(Ljzy.BaseInfo, {})), TABS_LJZY_STATIC, /*#__PURE__*/_jsx(Ljzy.StaticInfo, {})), TABS_LJZY_WORK, /*#__PURE__*/_jsx(Ljzy.WorkRecord, {})), TABS_JZLJ_CAR_BASE, /*#__PURE__*/_jsx(Jzlj.BaseInfo, {})), TABS_JZLJ_CAR_DISPOSE, /*#__PURE__*/_jsx(Jzlj.Dispose, {})), TABS_JZLJ_CAR_COLLECTION, /*#__PURE__*/_jsx(Jzlj.Collection, {})), TABS_JZLJ_CAR_ALARM, /*#__PURE__*/_jsx(Jzlj.Alarm, {})), TABS_JZLJ_CAR_RUNNING_CALENDAR, /*#__PURE__*/_jsx(Jzlj.RunCalendar, {})));
317
+ })), TABS_OIL, /*#__PURE__*/_jsx(Common.OilConsumption, {})), TABS_WATER, /*#__PURE__*/_jsx(Common.WaterConsumption, {})), TABS_WATER_USE, /*#__PURE__*/_jsx(Common.WaterUse, {})), TABS_ELE_USE, /*#__PURE__*/_jsx(Common.EleUse, {})), TABS_OIL_USE, /*#__PURE__*/_jsx(Common.OilUse, {})), TABS_OPERATION, /*#__PURE__*/_jsx(Common.OperationAnalysis, {})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_MAINTENANCE, /*#__PURE__*/_jsx(Common.Maintenance, {})), TABS_DETAIL, /*#__PURE__*/_jsx(Common.DetailInfo, {})), TABS_DEVICE, /*#__PURE__*/_jsx(Common.DeviceInfo, {})), TABS_JXH_BASE, /*#__PURE__*/_jsx(JXH.BaseInfo, {})), TABS_JXH_STATIC, /*#__PURE__*/_jsx(JXH.StaticInfo, {})), TABS_JXH_WORK, /*#__PURE__*/_jsx(JXH.WorkRecord, {})), TABS_JXH_ALARM, /*#__PURE__*/_jsx(JXH.AlarmInfo, {})), TABS_JXH_BASE_HW_2, /*#__PURE__*/_jsx(JXH.Hw2BaseInfo, {})), TABS_JXH_STATIC_HW_2, /*#__PURE__*/_jsx(JXH.Hw2StaticInfo, {})), TABS_JXH_WORK_HW_2, /*#__PURE__*/_jsx(JXH.Hw2WorkRecord, {})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_JXH_ALARM_HW_2, /*#__PURE__*/_jsx(JXH.Hw2AlarmInfo, {})), TABS_LJSY_BASE, /*#__PURE__*/_jsx(Ljsy.BaseInfo, {})), TABS_LJSY_STATIC, /*#__PURE__*/_jsx(Ljsy.StaticInfo, {})), TABS_LJSY_WORK, /*#__PURE__*/_jsx(Ljsy.WorkRecord, {})), TABS_LJSY_ALARM, /*#__PURE__*/_jsx(Ljsy.AlarmInfo, {})), TABS_CC_BASE, /*#__PURE__*/_jsx(Cc.BaseInfo, {})), TABS_CC_ORDER, /*#__PURE__*/_jsx(Cc.OrderInfo, {})), TABS_CC_STATIC, /*#__PURE__*/_jsx(Cc.StaticInfo, {})), TABS_CC_WORK, /*#__PURE__*/_jsx(Cc.WorkRecord, {})), TABS_CC_ALARM, /*#__PURE__*/_jsx(Cc.AlarmInfo, {})), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_contents, TABS_LJZY_BASE, /*#__PURE__*/_jsx(Ljzy.BaseInfo, {
318
+ zdReborn: zdReborn
319
+ })), TABS_LJZY_STATIC, /*#__PURE__*/_jsx(Ljzy.StaticInfo, {
320
+ zdReborn: zdReborn
321
+ })), TABS_LJZY_WORK, /*#__PURE__*/_jsx(Ljzy.WorkRecord, {
322
+ zdReborn: zdReborn
323
+ })), TABS_JZLJ_CAR_BASE, /*#__PURE__*/_jsx(Jzlj.BaseInfo, {})), TABS_JZLJ_CAR_DISPOSE, /*#__PURE__*/_jsx(Jzlj.Dispose, {})), TABS_JZLJ_CAR_COLLECTION, /*#__PURE__*/_jsx(Jzlj.Collection, {})), TABS_JZLJ_CAR_ALARM, /*#__PURE__*/_jsx(Jzlj.Alarm, {})), TABS_JZLJ_CAR_RUNNING_CALENDAR, /*#__PURE__*/_jsx(Jzlj.RunCalendar, {})));
318
324
  var value = useMemo(function () {
319
325
  return {
320
326
  id: id,
@@ -347,7 +353,6 @@ var VtxCarModal = function VtxCarModal(props) {
347
353
  endDate: endDate,
348
354
  showCollect: showCollect,
349
355
  frameParams: frameParams,
350
- zdReborn: zdReborn,
351
356
  iframeUrl: iframeUrl,
352
357
  tagList: [{
353
358
  color: 'blue',
@@ -23,7 +23,8 @@ import "./index.less";
23
23
  import { translateLocaleText } from "./../../../hooks/useTranslation.js";
24
24
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
25
25
  var Charts = function Charts(_ref) {
26
- var code = _ref.code;
26
+ var code = _ref.code,
27
+ hasWorkCondition = _ref.hasWorkCondition;
27
28
  var _useSettings = useSettings(),
28
29
  isDark = _useSettings.isDark;
29
30
  var _useSetState = useSetState({
@@ -112,20 +113,26 @@ var Charts = function Charts(_ref) {
112
113
  children: [/*#__PURE__*/_jsx("div", {
113
114
  className: "df-calendar-head",
114
115
  children: [{
116
+ visible: true,
115
117
  name: translateLocaleText("t('vtxdfmodal.tons')"),
116
118
  img: jcl,
117
119
  type: 'blue'
118
120
  }, {
121
+ visible: true,
119
122
  name: translateLocaleText("t('vtxjzljdftpdmodal.times')"),
120
123
  img: car,
121
124
  type: 'green'
122
125
  }, {
126
+ visible: hasWorkCondition,
123
127
  name: translateLocaleText("t('vtxdfmodal.workConditionNormal')"),
124
128
  imgType: 'normal'
125
129
  }, {
130
+ visible: hasWorkCondition,
126
131
  name: translateLocaleText("t('vtxdfmodal.workConditionAbnormal')"),
127
132
  imgType: 'alarm'
128
- }].map(function (item, index) {
133
+ }].filter(function (ele) {
134
+ return ele.visible;
135
+ }).map(function (item, index) {
129
136
  return /*#__PURE__*/_jsx(VmCalendarInner, _objectSpread(_objectSpread({}, item), {}, {
130
137
  value: item.name
131
138
  }), index);
@@ -25,7 +25,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
25
25
  var Charts = function Charts(_ref) {
26
26
  var code = _ref.code,
27
27
  deviceId = _ref.deviceId,
28
- handleAbility = _ref.handleAbility;
28
+ handleAbility = _ref.handleAbility,
29
+ hasWorkCondition = _ref.hasWorkCondition;
29
30
  var _useSettings = useSettings(),
30
31
  isDark = _useSettings.isDark;
31
32
  var _useSetState = useSetState({
@@ -112,20 +113,26 @@ var Charts = function Charts(_ref) {
112
113
  children: [/*#__PURE__*/_jsx("div", {
113
114
  className: "df-calendar-head",
114
115
  children: [{
116
+ visible: true,
115
117
  name: translateLocaleText("t('vtxdfmodal.tons')"),
116
118
  img: jcl,
117
119
  type: 'blue'
118
120
  }, {
121
+ visible: true,
119
122
  name: translateLocaleText("t('vtxjzljdftpdmodal.times')"),
120
123
  img: car,
121
124
  type: 'green'
122
125
  }, {
126
+ visible: hasWorkCondition,
123
127
  name: translateLocaleText("t('vtxdfmodal.workConditionNormal')"),
124
128
  imgType: 'normal'
125
129
  }, {
130
+ visible: hasWorkCondition,
126
131
  name: translateLocaleText("t('vtxdfmodal.workConditionAbnormal')"),
127
132
  imgType: 'alarm'
128
- }].map(function (item, index) {
133
+ }].filter(function (ele) {
134
+ return ele.visible;
135
+ }).map(function (item, index) {
129
136
  return /*#__PURE__*/_jsx(VmCalendarInner, _objectSpread(_objectSpread({}, item), {}, {
130
137
  value: item.name
131
138
  }), index);
@@ -7,15 +7,15 @@ import { BaseInfo as DefaultBaseInfo } from "../vtx-default-modal/components";
7
7
  import { translateLocaleText } from "./../hooks/useTranslation.js";
8
8
  import { BaseInfo, BaseInfoZdReborn, Calendar, CalendarZdReborn, Metering, MeteringZdReborn, WorkCondition } from "./components";
9
9
  // import Appraisal from '../vm-appraisal-info';
10
+ import VmCustom from "../_components/vm-custom";
10
11
  import VmRepairMaintain from "../_components/vm-repair-maintain";
11
12
  import VmVideo, { insertVideoTab } from "../_components/vm-video";
12
13
  import useGetChannels from "../_hooks/useGetChannels";
13
- import { CommonService } from "../_service";
14
- import { BaseService } from "./api";
15
- // import VideoService from '../vm-video/api';
16
- import VmCustom from "../_components/vm-custom";
17
14
  import useGetConfig from "../_hooks/useGetConfig";
15
+ import { useZdService } from "../_hooks/useUmsService";
16
+ import { CommonService } from "../_service";
18
17
  import VtxBaseModal from "../vtx-base-modal";
18
+ import { BaseService } from "./api";
19
19
  import "./style";
20
20
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
21
21
  var TABS_BASE = 'base';
@@ -37,9 +37,9 @@ var VtxDfModal = function VtxDfModal(props) {
37
37
  customMapInfo = props.customMapInfo,
38
38
  tabChose = props.tabChose,
39
39
  _props$showCollect = props.showCollect,
40
- showCollect = _props$showCollect === void 0 ? true : _props$showCollect,
41
- _props$zdReborn = props.zdReborn,
42
- zdReborn = _props$zdReborn === void 0 ? false : _props$zdReborn;
40
+ showCollect = _props$showCollect === void 0 ? true : _props$showCollect;
41
+ var serviceConfig = useZdService();
42
+ var zdReborn = (serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.zdService) === 'reborn';
43
43
  var _CommonService$useBas = CommonService.useBaseInfo(id, (customMapInfo === null || customMapInfo === void 0 ? void 0 : customMapInfo.coordinate) || 'wgs84'),
44
44
  info = _CommonService$useBas.info,
45
45
  photos = _CommonService$useBas.photos;
@@ -75,7 +75,8 @@ var VtxDfModal = function VtxDfModal(props) {
75
75
  return insertVideoTab(tabsList, channels);
76
76
  }, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(detail)]);
77
77
  var ZLBase = zdReborn ? BaseInfoZdReborn : BaseInfo;
78
- 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, {
78
+ var hasWorkCondition = (realtimeMonitor === null || realtimeMonitor === void 0 ? void 0 : realtimeMonitor.length) > 0;
79
+ var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, !(detail !== null && detail !== void 0 && detail.beenWeigh) && !hasWorkCondition ? /*#__PURE__*/_jsx(DefaultBaseInfo, {
79
80
  id: id,
80
81
  info: info,
81
82
  photos: photos,
@@ -99,9 +100,11 @@ var VtxDfModal = function VtxDfModal(props) {
99
100
  })), TABS_Calendar, zdReborn ? /*#__PURE__*/_jsx(CalendarZdReborn, {
100
101
  code: info === null || info === void 0 ? void 0 : info.code,
101
102
  deviceId: detail === null || detail === void 0 ? void 0 : detail.deviceId,
102
- handleAbility: detail === null || detail === void 0 ? void 0 : detail.handleAbility
103
+ handleAbility: detail === null || detail === void 0 ? void 0 : detail.handleAbility,
104
+ hasWorkCondition: hasWorkCondition
103
105
  }) : /*#__PURE__*/_jsx(Calendar, {
104
- code: info === null || info === void 0 ? void 0 : info.code
106
+ code: info === null || info === void 0 ? void 0 : info.code,
107
+ hasWorkCondition: hasWorkCondition
105
108
  })), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
106
109
  id: id
107
110
  })), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
@@ -92,7 +92,7 @@ var VtxQyryModal = function VtxQyryModal(props) {
92
92
  }
93
93
  return /*#__PURE__*/_jsx(VtxBaseModal, {
94
94
  id: id,
95
- type: "staff",
95
+ type: "qyry",
96
96
  title: title,
97
97
  subTitle: subTitle,
98
98
  visible: visible,
@@ -13,6 +13,7 @@ import { translateLocaleText } from "./../hooks/useTranslation.js";
13
13
  import VmCustom from "../_components/vm-custom";
14
14
  import VmVideo, { insertVideoTab } from "../_components/vm-video";
15
15
  import useGetConfig from "../_hooks/useGetConfig";
16
+ import { useZdService } from "../_hooks/useUmsService";
16
17
  import { CommonService } from "../_service";
17
18
  import VtxBaseModal from "../vtx-base-modal";
18
19
  import { BaseService } from "../vtx-df-modal/api";
@@ -39,9 +40,9 @@ var VtxZzzModal = function VtxZzzModal(props) {
39
40
  customMapInfo = props.customMapInfo,
40
41
  tabChose = props.tabChose,
41
42
  _props$showCollect = props.showCollect,
42
- showCollect = _props$showCollect === void 0 ? true : _props$showCollect,
43
- _props$zdReborn = props.zdReborn,
44
- zdReborn = _props$zdReborn === void 0 ? false : _props$zdReborn;
43
+ showCollect = _props$showCollect === void 0 ? true : _props$showCollect;
44
+ var serviceConfig = useZdService();
45
+ var zdReborn = (serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.zdService) === 'reborn';
45
46
  var _CommonService$useBas = CommonService.useBaseInfo(id, (customMapInfo === null || customMapInfo === void 0 ? void 0 : customMapInfo.coordinate) || 'wgs84'),
46
47
  info = _CommonService$useBas.info,
47
48
  photos = _CommonService$useBas.photos;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/modals2",
3
- "version": "6.0.0-beta.16",
3
+ "version": "6.0.0-beta.18",
4
4
  "description": "弹窗组件",
5
5
  "license": "MIT",
6
6
  "module": "lib/index.js",