bfg-common 1.4.414 → 1.4.416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/common/layout/theHeader/feedback/new/New.vue +17 -0
- package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +4 -1
- package/components/common/layout/theHeader/feedback/new/tabs/lib/models/enums.ts +6 -0
- package/package.json +1 -1
- package/components/common/layout/theHeader/feedback/new/tabs/lib/models/interfaces.ts +0 -17
|
@@ -87,6 +87,7 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
|
87
87
|
import type { UI_I_FeedbackForm } from '~/components/common/feedback/lib/models/interfaces'
|
|
88
88
|
import type { UI_T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
|
|
89
89
|
import type { UI_I_FeedbackCanvasOptions } from '~/components/common/layout/theHeader/feedback/new/lib/models/interfaces'
|
|
90
|
+
import { UI_E_FeedbackType } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/enums'
|
|
90
91
|
|
|
91
92
|
const feedbackForm = defineModel<UI_I_FeedbackForm>({ required: true })
|
|
92
93
|
const emits = defineEmits<{
|
|
@@ -132,6 +133,11 @@ const onHideModal = (): void => {
|
|
|
132
133
|
: (options.value.isAnnotateImage = false)
|
|
133
134
|
}
|
|
134
135
|
const onSubmit = (): void => {
|
|
136
|
+
if (options.value.isAnnotateImage) {
|
|
137
|
+
options.value.isAnnotateImage = false
|
|
138
|
+
return
|
|
139
|
+
}
|
|
140
|
+
|
|
135
141
|
if (selectedTab.value === 'light-bulb') {
|
|
136
142
|
const targetUrl = 'https://customer.aobfg.ru/' // Ваш URL
|
|
137
143
|
window.open(targetUrl, '_blank')
|
|
@@ -141,6 +147,17 @@ const onSubmit = (): void => {
|
|
|
141
147
|
isValidForm.value = !!feedbackForm.value.description
|
|
142
148
|
|
|
143
149
|
if (!isValidForm.value) return
|
|
150
|
+
const canvasData = (
|
|
151
|
+
document.getElementById('feedbackImg') as HTMLCanvasElement
|
|
152
|
+
).toDataURL()
|
|
153
|
+
const canvasBlankData = (
|
|
154
|
+
document.getElementById('feedbackImgBlank') as HTMLCanvasElement
|
|
155
|
+
).toDataURL()
|
|
156
|
+
|
|
157
|
+
const image = canvasData.match(/base64,(.+)/)?.[1] || ''
|
|
158
|
+
feedbackForm.value.image = canvasData === canvasBlankData ? '' : image
|
|
159
|
+
feedbackForm.value.type = UI_E_FeedbackType[selectedTab.value]
|
|
160
|
+
|
|
144
161
|
emits('submit')
|
|
145
162
|
}
|
|
146
163
|
</script>
|
package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue
CHANGED
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
type="default"
|
|
104
104
|
variant="outline"
|
|
105
105
|
class="btn undo"
|
|
106
|
+
:disabled="isDisabledButton"
|
|
106
107
|
@click="onUndoLast"
|
|
107
108
|
>
|
|
108
109
|
<ui-icon
|
|
@@ -121,6 +122,7 @@
|
|
|
121
122
|
type="default"
|
|
122
123
|
variant="outline"
|
|
123
124
|
class="btn clear-all"
|
|
125
|
+
:disabled="isDisabledButton"
|
|
124
126
|
@click="clearAll"
|
|
125
127
|
>
|
|
126
128
|
<ui-icon
|
|
@@ -208,7 +210,6 @@ const memoryParentModalDialog = ref<string>('')
|
|
|
208
210
|
const memoryParentMain = ref<string>('')
|
|
209
211
|
|
|
210
212
|
const drawingArray: any = []
|
|
211
|
-
// const indexArray = 0 // index of feedbackImg itself
|
|
212
213
|
const indexArray = ref<number>(0) // index of feedbackImg itself
|
|
213
214
|
let isDrawing = false
|
|
214
215
|
let startDrawingX: number | null = null
|
|
@@ -216,6 +217,8 @@ let startDrawingY: number | null = null
|
|
|
216
217
|
let drawColor = ''
|
|
217
218
|
let drawWidth = ''
|
|
218
219
|
|
|
220
|
+
const isDisabledButton = computed<boolean>(() => indexArray.value === 0)
|
|
221
|
+
|
|
219
222
|
const onTakeScreenshot = (): void => {
|
|
220
223
|
optionsModel.value.hasTakeScreenshot = true
|
|
221
224
|
const value = {
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
T_MetricTab
|
|
3
|
-
} from '~/components/common/pages/integration/zabbix/content/hosts/details/metrics/lib/models/types'
|
|
4
|
-
|
|
5
|
-
export interface I_Metric {
|
|
6
|
-
iconName: T_MetricTab
|
|
7
|
-
label: string
|
|
8
|
-
isSelected: boolean
|
|
9
|
-
on: {
|
|
10
|
-
label: string
|
|
11
|
-
color: '#239332' | '#BDC3C7'
|
|
12
|
-
}
|
|
13
|
-
off: {
|
|
14
|
-
label: string
|
|
15
|
-
color: '#EA3223' | '#BDC3C7'
|
|
16
|
-
}
|
|
17
|
-
}
|