diff --git a/nezha-fronted/package-lock.json b/nezha-fronted/package-lock.json index ce063c629..6e7a7fb91 100644 --- a/nezha-fronted/package-lock.json +++ b/nezha-fronted/package-lock.json @@ -4071,7 +4071,7 @@ }, "clipboard": { "version": "2.0.11", - "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", "requires": { "good-listener": "^1.2.2", @@ -6221,7 +6221,7 @@ }, "delegate": { "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" }, "delegates": { @@ -8548,7 +8548,7 @@ }, "good-listener": { "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", "requires": { "delegate": "^3.1.2" @@ -16536,7 +16536,7 @@ }, "select": { "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" }, "select-hose": { @@ -18020,7 +18020,7 @@ }, "tiny-emitter": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" }, "tinycolor2": { @@ -18719,7 +18719,7 @@ }, "vue-clipboard2": { "version": "0.3.3", - "resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", + "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", "requires": { "clipboard": "^2.0.0" diff --git a/nezha-fronted/src/assets/css/components/chart/chart.scss b/nezha-fronted/src/assets/css/components/chart/chart.scss index d216d605d..34bec2381 100644 --- a/nezha-fronted/src/assets/css/components/chart/chart.scss +++ b/nezha-fronted/src/assets/css/components/chart/chart.scss @@ -598,3 +598,21 @@ .hiddenItem{ box-shadow: $--chart-shadow; } +.mapboxgl-control-container{ + position: absolute; + bottom: 0; + right: 0; + summary{ + display: none; + } + .mapboxgl-ctrl-attrib-inner{ + color: hsla(0,0%,69.8%,.77) !important; + background: unset; + a { + color: hsla(0,0%,69.8%,.77) !important; + cursor: pointer; + text-decoration: underline; + } + } + +} diff --git a/nezha-fronted/src/components/common/rightBox/panelBox.vue b/nezha-fronted/src/components/common/rightBox/panelBox.vue index b8b04ed2d..c95da25e3 100644 --- a/nezha-fronted/src/components/common/rightBox/panelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/panelBox.vue @@ -48,128 +48,146 @@
{{$t('dashboard.panel.variables')}}
- -
- - - {{item.name}} - - - - - + + +
+ + + {{item.name}} - - + + + + + + + + + + + + + + + + + - - - - - - - -
- -
- - - - - - - - - - - - - -
- {{$t('dashboard.panel.queryExpression')}} - - - - - - - - - - - - -
{{$t('overall.name')}}{{$t('overall.remark')}}
{{item.name}}{{item.description}}
- - - -
-
- -
- - - - - - - - - - -
- {{$t('dashboard.panel.multi')}} - - {{$t('dashboard.panel.multiTip')}} - - - - -
- - - - -
- - -
- {{$t('dashboard.panel.allOption')}} - - {{$t('dashboard.panel.allOptionTip')}} - - - - -
- - - - -
-
-
+ +
+ + + + + + + + + + + + + +
+ {{$t('dashboard.panel.queryExpression')}} + + + + + + + + + + + + +
{{$t('overall.name')}}{{$t('overall.remark')}}
{{item.name}}{{item.description}}
+ + + +
+
+ +
+ + + + + + + + + + +
+ {{$t('dashboard.panel.multi')}} + + {{$t('dashboard.panel.multiTip')}} + + + + +
+ + + + +
+ + +
+ {{$t('dashboard.panel.allOption')}} + + {{$t('dashboard.panel.allOptionTip')}} + + + + +
+ + + + +
+
+
+ +
{{$t('dashboard.panel.addVariable')}}
@@ -317,8 +335,13 @@ import editRigthBox from '../mixin/editRigthBox' import bus from '@/libs/bus' import { arrLength, datePicker } from '@/components/common/js/validate' +import draggable from 'vuedraggable' +import { getUUID } from '@/components/common/js/common' export default { name: 'panelBox', + components: { + draggable + }, props: { obj: { type: Object @@ -453,9 +476,6 @@ export default { // 展开 折叠变量 dropVariable (index, item) { this.$set(this.editPanel.param.variables[index], 'collapse', !item.collapse) - this.$refs.form.clearValidate('param.variables.' + index + '.name') - this.$refs.form.clearValidate('param.variables.' + index + '.customOptions') - this.$refs.form.clearValidate('param.variables.' + index + '.expression') }, // 显示 隐藏变量 showVariable (index, item) { @@ -467,7 +487,9 @@ export default { show: true, type: 'query', multi: false, - allOption: false + allOption: false, + collapse: false, + uid: getUUID() } this.editPanel.param.variables.push(temp) }, @@ -476,6 +498,7 @@ export default { const temp = JSON.parse(JSON.stringify(item)) temp.name = temp.name ? temp.name + '_copy' : '' temp.collapse = false + temp.uid = getUUID() this.editPanel.param.variables.push(temp) }, // 删除变量 @@ -510,10 +533,11 @@ export default { /* 保存 */ save () { - // 保存时把collapse属性删除 再传入后台 + // 保存时把无用属性删除 再传入后台 const variables = this.editPanel.param.variables.map((item) => { const temp = JSON.parse(JSON.stringify(item)) delete temp.collapse + delete temp.uid return temp }) const params = { @@ -624,10 +648,14 @@ export default { handler (n, o) { this.isEdit = true this.editPanel = JSON.parse(JSON.stringify(n)) - // 如果是空数组 则添加一条变量数据 + // 若没有数据 默认设置为空数组 if (!this.editPanel.param.variables || !this.editPanel.param.variables.length) { const temp = [] this.$set(this.editPanel.param, 'variables', temp) + } else { + this.editPanel.param.variables.forEach(item => { + item.uid = getUUID() + }) } } },