MV Template Page
Installation
yarn add mv-template-page
or
npm i mv-template-page
Example
<template>
<mv-template
:title="title"
:dashboard-ids="dashboardIds"
:token="configToken"
:is-dark="isDark"
:filters.sync="filters"
:update-filters.sync="updateFilters"
:code="code"
/>
</template>
<script>
import MvTemplate from 'mv-template-page'
export default {
components: {
MvTemplate,
},
data() {
return {
title: 'Dev Test Page',
configToken: `Bearer ${localStorage.getItem('accessToken')}`,
isDark: false,
dashboardIds: [
{
title: 'Summary',
id: '60dad4302722b900132f807e',
},
{
title: 'Analytics',
id: '60ebc0914a0a130012db902b',
},
],
filters: [
{
name: 'Filter-1',
operator: '=',
property: 'group_exams_gender',
propertyType: 'string',
value: 'male',
widgets: ['60c18c69c65520001422e662'],
_id: '60c61f3a471c96001211a619',
},
],
updateFilters: [
{
name: 'Filter-1',
value: 'male',
operator: '=',
},
],
code: 'PAGE-1',
}
},
}
</script>
Add New Page
- Create new folder under 'components' folder using this format 'page-[code]'
- Create 'MainComponent.vue' into component folder that you have already created. If you want to create other component for your new page, make sure it registered in this 'MainComponent.vue'
- 'MainComponent.vue' must have this props:
- title
- token
- dashboardIds
- isDark
- filters
- updateFilters
- Import your 'MainComponent.vue' into 'MVTemplate.vue' and create new code for your new component
- Register your new code in MES swagger (temporary) :
https://mes.machinevision.global:4600/mes/api/menu