|
|
@@ -8,6 +8,10 @@
|
|
|
<ElTag class="node-state" :type="getTagTypeFromState(state)">{{state}}</ElTag>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <div class="card-body">
|
|
|
+ <PriorityTag :size="'mini'" :priority="priority"></PriorityTag>
|
|
|
+ <ElTag size="mini" >{{processor}}</ElTag>
|
|
|
+ </div>
|
|
|
</ElCard>
|
|
|
</div>
|
|
|
<div class="node-postfix">
|
|
|
@@ -20,6 +24,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import PriorityTag from '@/components/PriorityTag.vue';
|
|
|
+
|
|
|
const getTagTypeFromState = (state) => {
|
|
|
if (state === '已创建') {
|
|
|
return '';
|
|
|
@@ -33,6 +39,7 @@ const getTagTypeFromState = (state) => {
|
|
|
|
|
|
export default {
|
|
|
name: 'TreeNode',
|
|
|
+ components: { PriorityTag },
|
|
|
props: {
|
|
|
id: Number,
|
|
|
state: String,
|
|
|
@@ -41,11 +48,13 @@ export default {
|
|
|
positionX: Number,
|
|
|
nodeStyle: Object,
|
|
|
depth: Number,
|
|
|
+ processor: String,
|
|
|
+ priority: String,
|
|
|
},
|
|
|
computed: {
|
|
|
containerStyle() {
|
|
|
return {
|
|
|
- top: `${this.positionY * 130}px`,
|
|
|
+ top: `${this.positionY * 140}px`,
|
|
|
left: `${280 * this.positionX - 100}px`,
|
|
|
width: `${this.nodeStyle.width + this.nodeStyle.padding * 2}px`,
|
|
|
height: `${this.nodeStyle.height + this.nodeStyle.padding * 2}px`,
|
|
|
@@ -109,6 +118,10 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
+.card-body{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
.icon {
|
|
|
width: 14px;
|
|
|
height: 14px;
|