|
@@ -7,8 +7,15 @@
|
|
|
<div class="deal-node-box" @click="click(list)">
|
|
|
<div class=" head-row" :class="list.type!==1?list.type !== 2 ? list.type !== 3 ? 'child-background':'sb-background': 'spare-background':'part-background' ">
|
|
|
{{ list.name }}
|
|
|
+ <badge :status="DictCache.COLOR.SB_INFO_STATUS[list.status]" :text="statusMap[list.status]"></badge>
|
|
|
+ </div>
|
|
|
+ <div class="foot-row">
|
|
|
+ <div v-if="list.model">设备型号:{{ list.model }}</div>
|
|
|
+ <div v-if="list.spareNum || list.spareNum == 0">备件数目:{{ list.spareNum }}</div>
|
|
|
+ <div v-if="list.changeDate || list.changeDate === null">上次更换时间:{{ list.changeDate }}</div>
|
|
|
+ <div v-if="list.realChangeDate || list.realChangeDate === null">预计更换时间:{{ list.realChangeDate }}</div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="foot-row">{{ list.type }}</div>
|
|
|
<a class="del-node" @click.stop="close(list)">×</a>
|
|
|
</div>
|
|
|
<div class="add-btn-box">
|
|
@@ -25,8 +32,15 @@
|
|
|
<div class="deal-node-box" @click="click(item)">
|
|
|
<div class=" head-row" :class="item.type!==1?item.type !== 2 ? item.type !== 3 ? 'child-background':'sb-background': 'spare-background':'part-background' ">
|
|
|
{{ item.name }}
|
|
|
+ <badge :status="DictCache.COLOR.SB_INFO_STATUS[item.status]" :text="statusMap[item.status]"></badge>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="foot-row">
|
|
|
+ <div v-if="item.model">设备型号:{{ item.model }}</div>
|
|
|
+ <div v-if="item.spareNum || item.spareNum == 0">备件数目:{{ item.spareNum }}</div>
|
|
|
+ <div v-if="item.changeDate || item.changeDate === null">上次更换时间:{{ item.changeDate }}</div>
|
|
|
+ <div v-if="item.realChangeDate || item.realChangeDate === null">预计更换时间:{{ item.realChangeDate }}</div>
|
|
|
</div>
|
|
|
- <div class="foot-row">{{ item.type }}</div>
|
|
|
<a class="del-node" @click.stop="close(item)">×</a>
|
|
|
</div>
|
|
|
<div class="add-btn-box">
|
|
@@ -51,8 +65,15 @@
|
|
|
<div class="deal-node-box" @click="click(item)">
|
|
|
<div class="head-row" :class="item.type!==1?item.type !== 2 ? item.type !== 3 ? 'child-background':'sb-background': 'spare-background':'part-background' ">
|
|
|
{{ item.name }}
|
|
|
+ <badge :status="DictCache.COLOR.SB_INFO_STATUS[item.status]" :text="statusMap[item.status]"></badge>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="foot-row">
|
|
|
+ <div v-if="item.model">设备型号:{{ item.model }}</div>
|
|
|
+ <div v-if="item.spareNum || item.spareNum == 0">备件数目:{{ item.spareNum }}</div>
|
|
|
+ <div v-if="item.changeDate || item.changeDate === null">上次更换时间:{{ item.changeDate }}</div>
|
|
|
+ <div v-if="item.realChangeDate || item.realChangeDate === null">预计更换时间:{{ item.realChangeDate }}</div>
|
|
|
</div>
|
|
|
- <div class="foot-row">{{ item.type }}</div>
|
|
|
<a class="del-node" @click.stop="close(item)">×</a>
|
|
|
</div>
|
|
|
<div class="add-btn-box">
|
|
@@ -84,12 +105,15 @@ export default {
|
|
|
name: 'WorkTree',
|
|
|
data () {
|
|
|
return {
|
|
|
-
|
|
|
+ statusMap: {}
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
list: [Array, Object]
|
|
|
},
|
|
|
+ created () {
|
|
|
+ this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
|
|
|
+ },
|
|
|
methods: {
|
|
|
close (value) {
|
|
|
console.log(value)
|
|
@@ -162,7 +186,7 @@ export default {
|
|
|
}
|
|
|
.deal-node-box {
|
|
|
position: relative;
|
|
|
- width: 200px;
|
|
|
+ width: 250px;
|
|
|
flex-shrink: 0;
|
|
|
box-shadow: 0 4px 10px 0 rgba(12, 31, 80, 0.08);
|
|
|
background-color: #fff;
|