Commit 4888f7a673eb02dc7ba5f52072f1ae935ef1fc1e
Merge branch 'ft_local_dev' into 'main'
fix:修改teambition上的几个问题 See merge request huang/yun-teng-iot-front!403
Showing
6 changed files
with
44 additions
and
35 deletions
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | import { useNow } from './useNow'; |
86 | 86 | import { useDesign } from '/@/hooks/web/useDesign'; |
87 | 87 | import { LockOutlined } from '@ant-design/icons-vue'; |
88 | - import headerImg from '/@/assets/images/header.jpg'; | |
88 | + import headerImg from '/@/assets/images/logo.png'; | |
89 | 89 | |
90 | 90 | const InputPassword = Input.Password; |
91 | 91 | ... | ... |
... | ... | @@ -100,6 +100,7 @@ |
100 | 100 | organizationDTO: { name: string }; |
101 | 101 | deviceProfile: { default: boolean; enabled: boolean; name: string; transportType: string }; |
102 | 102 | deviceInfo: { longitude: string; latitude: string; address: string }; |
103 | + deviceType?: string; | |
103 | 104 | } |
104 | 105 | type MarkerList = DeviceInfo & { marker: any; label: any }; |
105 | 106 | |
... | ... | @@ -232,7 +233,7 @@ |
232 | 233 | width: 330, // 信息窗口宽度 |
233 | 234 | height: 0, // 信息窗口高度 |
234 | 235 | }; |
235 | - const { name, organizationDTO, deviceState, deviceProfile } = record; | |
236 | + const { name, organizationDTO, deviceState, deviceProfile, deviceType } = record; | |
236 | 237 | const { address, longitude, latitude } = record.deviceInfo; |
237 | 238 | // 创建信息窗口对象 |
238 | 239 | const res = await getDeviceActiveTime(entityId); |
... | ... | @@ -264,7 +265,11 @@ |
264 | 265 | </div> |
265 | 266 | <div style="display:flex;justify-content:end; margin-top:10px"> |
266 | 267 | <button onclick="openDeviceInfoDrawer()" style="margin-right:10px;color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">设备信息</button> |
267 | - <button onclick="openHistoryModal()" style="color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">历史数据</button> | |
268 | + <button onclick="openHistoryModal()" style="display:${ | |
269 | + deviceType !== 'GATEWAY' ? 'block' : 'none' | |
270 | + };color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">${ | |
271 | + deviceType !== 'GATEWAY' ? '历史数据' : '' | |
272 | + }</button> | |
268 | 273 | </div> |
269 | 274 | `, |
270 | 275 | options | ... | ... |
... | ... | @@ -139,21 +139,23 @@ |
139 | 139 | if (e) { |
140 | 140 | //fengtao |
141 | 141 | if (e == 'ALL') { |
142 | - const data = await getAttribute(orgId, null); | |
143 | - //fengtao | |
144 | - const options = data.map((m) => { | |
145 | - return { | |
146 | - label: m, | |
147 | - value: m, | |
148 | - }; | |
149 | - }); | |
150 | - updateSchema({ | |
151 | - field: 'type2', | |
152 | - componentProps: { | |
153 | - placeholder: '请选择属性', | |
154 | - options, | |
155 | - }, | |
156 | - }); | |
142 | + if (orgId) { | |
143 | + const data = await getAttribute(orgId, null); | |
144 | + //fengtao | |
145 | + const options = data.map((m) => { | |
146 | + return { | |
147 | + label: m, | |
148 | + value: m, | |
149 | + }; | |
150 | + }); | |
151 | + updateSchema({ | |
152 | + field: 'type2', | |
153 | + componentProps: { | |
154 | + placeholder: '请选择属性', | |
155 | + options, | |
156 | + }, | |
157 | + }); | |
158 | + } | |
157 | 159 | } else { |
158 | 160 | const getT = getFieldsValue(); |
159 | 161 | const entityId = getT.entityId; | ... | ... |
... | ... | @@ -179,21 +179,23 @@ |
179 | 179 | if (e) { |
180 | 180 | //fengtao |
181 | 181 | if (e == 'ALL') { |
182 | - const data = await getAttribute(props.provideOrgid || orgId.value, null); | |
183 | - //fengtao | |
184 | - const options = data.map((m) => { | |
185 | - return { | |
186 | - label: m, | |
187 | - value: m, | |
188 | - }; | |
189 | - }); | |
190 | - updateSchema({ | |
191 | - field: 'type2', | |
192 | - componentProps: { | |
193 | - placeholder: '请选择属性', | |
194 | - options, | |
195 | - }, | |
196 | - }); | |
182 | + if (props.provideOrgid || orgId.value) { | |
183 | + const data = await getAttribute(props.provideOrgid || orgId.value, null); | |
184 | + //fengtao | |
185 | + const options = data.map((m) => { | |
186 | + return { | |
187 | + label: m, | |
188 | + value: m, | |
189 | + }; | |
190 | + }); | |
191 | + updateSchema({ | |
192 | + field: 'type2', | |
193 | + componentProps: { | |
194 | + placeholder: '请选择属性', | |
195 | + options, | |
196 | + }, | |
197 | + }); | |
198 | + } | |
197 | 199 | } else { |
198 | 200 | const getT = getFieldsValue(); |
199 | 201 | const entityId = getT.entityId; | ... | ... |
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | import { useNow } from './useNow'; |
86 | 86 | import { useDesign } from '/@/hooks/web/useDesign'; |
87 | 87 | import { LockOutlined } from '@ant-design/icons-vue'; |
88 | - import headerImg from '/@/assets/images/header.jpg'; | |
88 | + import headerImg from '/@/assets/images/logo.png'; | |
89 | 89 | |
90 | 90 | const InputPassword = Input.Password; |
91 | 91 | ... | ... |