This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
:update-frequency="600000"
|
:update-frequency="600000"
|
||||||
v-bind="[$props, $attrs]"
|
v-bind="[$props, $attrs]"
|
||||||
@dash-refresh="loadData"
|
@dash-refresh="loadData"
|
||||||
@dash-context="context = true"
|
@dash-context="showContext()"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
>
|
>
|
||||||
<template slot="main">
|
<template slot="main">
|
||||||
@@ -55,8 +55,10 @@
|
|||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
|
||||||
<v-card-text style="height: 500px;">
|
<v-card-text style="height: 500px;">
|
||||||
|
settings:{{ settings }}<br />
|
||||||
|
localSettings:{{ localSettings }}
|
||||||
<v-select
|
<v-select
|
||||||
v-model="settings.dateRange"
|
v-model="localSettings.dateRange"
|
||||||
:items="selectLists.dateFilterTokens"
|
:items="selectLists.dateFilterTokens"
|
||||||
item-text="name"
|
item-text="name"
|
||||||
item-value="id"
|
item-value="id"
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
></v-select>
|
></v-select>
|
||||||
|
|
||||||
<v-select
|
<v-select
|
||||||
v-model="settings.unit"
|
v-model="localSettings.unit"
|
||||||
:items="selectLists.units"
|
:items="selectLists.units"
|
||||||
item-text="name"
|
item-text="name"
|
||||||
item-value="id"
|
item-value="id"
|
||||||
@@ -72,11 +74,9 @@
|
|||||||
></v-select>
|
></v-select>
|
||||||
|
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="settings.customTitle"
|
v-model="localSettings.customTitle"
|
||||||
:label="$ay.t('Name')"
|
:label="$ay.t('Name')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
|
|
||||||
{{ settings }}
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
@@ -113,6 +113,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
obj: {},
|
obj: {},
|
||||||
context: false,
|
context: false,
|
||||||
|
localSettings: {},
|
||||||
selectLists: {
|
selectLists: {
|
||||||
dateFilterTokens: [],
|
dateFilterTokens: [],
|
||||||
tagFilterOperators: [],
|
tagFilterOperators: [],
|
||||||
@@ -122,11 +123,18 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
async created() {
|
async created() {
|
||||||
this.localSettings = this.settings;
|
|
||||||
await initWidget(this);
|
await initWidget(this);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showContext: function() {
|
||||||
|
this.localSettings = window.$gz.util.deepCopySkip(this.settings);
|
||||||
|
this.context = true;
|
||||||
|
},
|
||||||
updateSettings: function() {
|
updateSettings: function() {
|
||||||
|
//copy settings from local to
|
||||||
|
this.settings.customTitle = this.localSettings.customTitle;
|
||||||
|
this.settings.dateRange = this.localSettings.dateRange;
|
||||||
|
this.settings.unit = this.localSettings.unit;
|
||||||
this.$emit("dash-change");
|
this.$emit("dash-change");
|
||||||
this.context = false;
|
this.context = false;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user