-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TechnicalData Plugin: Table view (#83)
* TechnicalData Plugin: Add switch for table view of technical properties * Table header background color * Background color for SubmodelElementCollection/SubmodelElementList * Add table (row) hover Changed table header background color again * Adjustments * Replaces semantics with definition --------- Co-authored-by: aaron Zielstorff <[email protected]>
- Loading branch information
Showing
5 changed files
with
219 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
aas-web-ui/src/components/UIComponents/GenericDataTableView.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<template> | ||
<template v-if="submodelElementData && Array.isArray(submodelElementData) && submodelElementData.length > 0"> | ||
<template v-for="(submodelElement, index) in submodelElementData" :key="index"> | ||
<template v-if="['SubmodelElementCollection', 'SubmodelElementList'].includes(submodelElement.modelType)"> | ||
<tr class="bg-tableOdd"> | ||
<td colspan="4"> | ||
<p class="text-subtitle-2 py-4" :class="'pl-' + level * 3"> | ||
<v-icon class="mr-2" size="small" color="icon">mdi-folder</v-icon> | ||
<span class="text-titleText">{{ nameToDisplay(submodelElement) }}</span> | ||
</p> | ||
</td> | ||
</tr> | ||
<GenericDataTableView | ||
:submodel-element-data="submodelElement.value" | ||
:level="Number(level) + 1"></GenericDataTableView> | ||
</template> | ||
<template v-else-if="['Property', 'MultiLanguageProperty'].includes(submodelElement.modelType)"> | ||
<tr> | ||
<td> | ||
<p> | ||
<v-tooltip | ||
location="bottom start" | ||
open-delay="250" | ||
:text="descriptionToDisplay(submodelElement)"> | ||
<template #activator="{ props }"> | ||
<span v-bind="props" class="text-caption"> | ||
{{ nameToDisplay(submodelElement) }} | ||
</span> | ||
</template> | ||
</v-tooltip> | ||
</p> | ||
</td> | ||
<td> | ||
<p class="text-caption" style="min-width: 100px">{{ descriptionToDisplay(submodelElement) }}</p> | ||
</td> | ||
<td> | ||
<p class="text-caption" style="min-width: 200px">{{ cdDefinition(submodelElement) }}</p> | ||
</td> | ||
<td> | ||
<p class="text-caption"> | ||
{{ valueToDisplay(submodelElement) }} | ||
</p> | ||
</td> | ||
</tr> | ||
</template> | ||
</template> | ||
</template> | ||
<template v-else> | ||
<tr style="border: 0 !important'"> | ||
<td colspan="4" style="border: 0 !important">-</td> | ||
</tr> | ||
</template> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import { useTheme } from 'vuetify'; | ||
import SubmodelElementHandling from '@/mixins/SubmodelElementHandling'; | ||
export default defineComponent({ | ||
name: 'GenericDataTableView', | ||
mixins: [SubmodelElementHandling], | ||
inheritAttrs: false, | ||
props: { | ||
submodelElementData: { | ||
type: Object, | ||
default() { | ||
return {}; | ||
}, | ||
required: true, | ||
}, | ||
level: { | ||
type: Number, | ||
default: 0, | ||
}, | ||
}, | ||
setup() { | ||
const theme = useTheme(); | ||
return { | ||
theme, // Theme Object | ||
}; | ||
}, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters