You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
3.7 KiB
86 lines
3.7 KiB
<template>
|
|
<w-grid
|
|
:title="$t('io.sc.engine.mv.config.threshold.grid.title')"
|
|
hide-bottom
|
|
:config-button="true"
|
|
selection="multiple"
|
|
:checkbox-selection="true"
|
|
:data-url="Environment.apiContextPath('/api/mv/configure/threshold')"
|
|
:pageable="false"
|
|
:sort-by="['name', 'level']"
|
|
group-mode="alone"
|
|
group-by-field="name"
|
|
group-start-open="none"
|
|
:toolbar-configure="{ noIcon: false }"
|
|
:toolbar-actions="[
|
|
'refresh',
|
|
'separator',
|
|
'expand',
|
|
'separator',
|
|
'add',
|
|
'edit',
|
|
'remove',
|
|
'separator',
|
|
'resetDefaultValues',
|
|
'separator',
|
|
'view',
|
|
'separator',
|
|
'export',
|
|
]"
|
|
:columns="[
|
|
{ width: '100%', name: 'name', label: $t('io.sc.engine.mv.config.threshold.grid.entity.name') },
|
|
{ width: 120, name: 'level', label: $t('io.sc.engine.mv.config.threshold.grid.entity.level'), align: 'right' },
|
|
{
|
|
width: 100,
|
|
name: 'color',
|
|
label: $t('io.sc.engine.mv.config.threshold.grid.entity.color'),
|
|
format: (value) => {
|
|
return '<div style=\'color:' + value + '\'>' + value + '<div>';
|
|
},
|
|
},
|
|
{ width: 120, name: 'range', label: $t('io.sc.engine.mv.config.threshold.grid.entity.range') },
|
|
{ width: 150, name: 'quantitativeRange', label: $t('io.sc.engine.mv.config.threshold.grid.entity.quantitativeRange') },
|
|
{ width: 150, name: 'qualitativeRange', label: $t('io.sc.engine.mv.config.threshold.grid.entity.qualitativeRange') },
|
|
{ width: 100, name: 'lastModifier', label: $t('lastModifier') },
|
|
{ width: 150, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() },
|
|
]"
|
|
:editor="{
|
|
dialog: {
|
|
width: '600px',
|
|
},
|
|
form: {
|
|
colsNum: 1,
|
|
fields: [
|
|
{ name: 'name', label: $t('io.sc.engine.mv.config.threshold.grid.entity.name'), type: 'w-text' },
|
|
{ name: 'level', label: $t('io.sc.engine.mv.config.threshold.grid.entity.level'), type: 'w-text' },
|
|
{ name: 'color', label: $t('io.sc.engine.mv.config.threshold.grid.entity.color'), type: 'w-text' },
|
|
{ name: 'range', label: $t('io.sc.engine.mv.config.threshold.grid.entity.range'), type: 'w-text' },
|
|
{ name: 'quantitativeRange', label: $t('io.sc.engine.mv.config.threshold.grid.entity.quantitativeRange'), type: 'w-text' },
|
|
{ name: 'qualitativeRange', label: $t('io.sc.engine.mv.config.threshold.grid.entity.qualitativeRange'), type: 'w-text' },
|
|
],
|
|
},
|
|
}"
|
|
:viewer="{
|
|
panel: {
|
|
columnNum: 1,
|
|
fields: [
|
|
{ name: 'id', label: $t('id') },
|
|
{ name: 'name', label: $t('io.sc.engine.mv.config.threshold.grid.entity.name') },
|
|
{ name: 'level', label: $t('io.sc.engine.mv.config.threshold.grid.entity.level') },
|
|
{ name: 'color', label: $t('io.sc.engine.mv.config.threshold.grid.entity.color'), format: Formater.none() },
|
|
{ name: 'range', label: $t('io.sc.engine.mv.config.threshold.grid.entity.range') },
|
|
{ name: 'quantitativeRange', label: $t('io.sc.engine.mv.config.threshold.grid.entity.quantitativeRange') },
|
|
{ name: 'qualitativeRange', label: $t('io.sc.engine.mv.config.threshold.grid.entity.qualitativeRange') },
|
|
{ name: 'creator', label: $t('creator') },
|
|
{ name: 'createDate', label: $t('createDate') },
|
|
{ name: 'lastModifier', label: $t('lastModifier') },
|
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
|
|
],
|
|
},
|
|
}"
|
|
></w-grid>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import 'tailwindcss/utilities.css';
|
|
import { Environment, Formater } from 'platform-core';
|
|
</script>
|
|
|