Эх сурвалжийг харах

fix(cockpit): 工单设备信息页签补安装位置

设备信息统一到独立页签后,类型与安装位置同时展示,避免信息丢失。
ChenJZ 1 цаг өмнө
parent
commit
04e76441f5

+ 1 - 1
src/modules/cockpit/components/EntityDetailSections.vue

@@ -47,7 +47,7 @@
         </section>
         <section v-if="showDevices && view.devices.length" class="entity-sections__group">
             <h3><span class="entity-sections__icon" aria-hidden="true" v-html="sectionIcon('设备信息')"></span>设备信息</h3>
-            <ul><li v-for="item in view.devices" :key="item.code || item.name"><b>{{ item.name }}</b><span>{{ item.code }} · {{ item.status }}</span><small>{{ item.type || item.location }}</small><button v-if="item.code" type="button" class="entity-sections__locate" :data-locate-device="item.code" @click.stop="locateDevice(item.code)">定位 {{ item.code }}</button></li></ul>
+            <ul><li v-for="item in view.devices" :key="item.code || item.name"><b>{{ item.name }}</b><span>{{ [item.code, item.status].filter(Boolean).join(' · ') }}</span><small v-if="item.type">{{ item.type }}</small><small v-if="item.location">{{ item.location }}</small><button v-if="item.code" type="button" class="entity-sections__locate" :data-locate-device="item.code" @click.stop="locateDevice(item.code)">定位 {{ item.code }}</button></li></ul>
         </section>
         <section v-if="showRecords" class="entity-sections__group">
             <h3><span class="entity-sections__icon" aria-hidden="true" v-html="sectionIcon('处置记录')"></span>处置记录</h3>