@vtx/modals2 6.0.0-beta.17 → 6.0.0-beta.19
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.
|
@@ -144,7 +144,7 @@ var VtxCarModal = function VtxCarModal(props) {
|
|
|
144
144
|
showFields = _BaseService$useField.showFields;
|
|
145
145
|
var code = useMemo(function () {
|
|
146
146
|
var code = '';
|
|
147
|
-
var actionType =
|
|
147
|
+
var actionType = info === null || info === void 0 ? void 0 : info.actionType;
|
|
148
148
|
if (defaultCode) {
|
|
149
149
|
code = defaultCode;
|
|
150
150
|
} else if (actionType && !defaultCode) {
|
|
@@ -166,8 +166,9 @@ var VtxCarModal = function VtxCarModal(props) {
|
|
|
166
166
|
}, [defaultCode, info === null || info === void 0 ? void 0 : info.actionType]);
|
|
167
167
|
var tabs = useMemo(function () {
|
|
168
168
|
var tabs = [];
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
var _ref = info || {},
|
|
170
|
+
_ref$actionType = _ref.actionType,
|
|
171
|
+
actionType = _ref$actionType === void 0 ? '' : _ref$actionType;
|
|
171
172
|
if (!actionType) {
|
|
172
173
|
return [];
|
|
173
174
|
}
|
|
@@ -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
|
-
}].
|
|
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);
|