shared-ritm 1.2.69 → 1.2.70
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +4364 -4237
- package/dist/shared-ritm.umd.js +218 -218
- package/dist/types/api/types/Api_Repairs.d.ts +4 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/api/types/Api_Repairs.ts +4 -0
- package/src/common/app-input-new/AppInputNew.vue +127 -0
- package/src/common/app-table/components/ModalSelect.vue +15 -12
- package/src/index.ts +2 -0
|
@@ -67,6 +67,8 @@ export type Api_Create_Repair_With_Equipments = {
|
|
|
67
67
|
power_output_MWh?: number;
|
|
68
68
|
cost_per_MWh?: number;
|
|
69
69
|
category?: string;
|
|
70
|
+
user_id_list?: string[];
|
|
71
|
+
team_id_list?: string[];
|
|
70
72
|
};
|
|
71
73
|
export type Api_Update_Repair = {
|
|
72
74
|
name?: string;
|
|
@@ -75,6 +77,8 @@ export type Api_Update_Repair = {
|
|
|
75
77
|
power_output_MWh?: number;
|
|
76
78
|
cost_per_MWh?: number;
|
|
77
79
|
category?: string;
|
|
80
|
+
user_id_list?: string[];
|
|
81
|
+
team_id_list?: string[];
|
|
78
82
|
};
|
|
79
83
|
export type Api_Repair_Dto = {
|
|
80
84
|
id: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import AppButton from '@/common/app-button/AppButton.vue';
|
|
|
3
3
|
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue';
|
|
4
4
|
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue';
|
|
5
5
|
import AppInput from '@/common/app-input/AppInput.vue';
|
|
6
|
+
import AppInputNew from '@/common/app-input-new/AppInputNew.vue';
|
|
6
7
|
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue';
|
|
7
8
|
import AppLayout from '@/common/app-layout/AppLayout.vue';
|
|
8
9
|
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue';
|
|
@@ -35,7 +36,7 @@ import usePhotoService from '@/api/services/PhotoService';
|
|
|
35
36
|
import useInstrumentsService from '@/api/services/InstrumentsService';
|
|
36
37
|
import useControlsService from '@/api/services/ControlsService';
|
|
37
38
|
import useSearchService from '@/api/services/SearchService';
|
|
38
|
-
export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, };
|
|
39
|
+
export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputNew, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, };
|
|
39
40
|
export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService, usePhotoService, useInstrumentsService, useSearchService, };
|
|
40
41
|
export { useBaseTable } from './common/app-table/controllers/useBaseTable';
|
|
41
42
|
export { useTableModel } from './common/app-table/controllers/useTableModel';
|
package/package.json
CHANGED
|
@@ -70,6 +70,8 @@ export type Api_Create_Repair_With_Equipments = {
|
|
|
70
70
|
power_output_MWh?: number
|
|
71
71
|
cost_per_MWh?: number
|
|
72
72
|
category?: string
|
|
73
|
+
user_id_list?: string[]
|
|
74
|
+
team_id_list?: string[]
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
export type Api_Update_Repair = {
|
|
@@ -79,6 +81,8 @@ export type Api_Update_Repair = {
|
|
|
79
81
|
power_output_MWh?: number
|
|
80
82
|
cost_per_MWh?: number
|
|
81
83
|
category?: string
|
|
84
|
+
user_id_list?: string[]
|
|
85
|
+
team_id_list?: string[]
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
export type Api_Repair_Dto = {
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-input-new">
|
|
3
|
+
<label v-if="label" class="app-input-new__label">
|
|
4
|
+
{{ label }}
|
|
5
|
+
<span v-if="required" class="required">*</span>
|
|
6
|
+
</label>
|
|
7
|
+
|
|
8
|
+
<q-input v-model="model" filled :type="type" :rules="rules" :placeholder="placeholder" :disable="disable">
|
|
9
|
+
<template #append>
|
|
10
|
+
<q-icon
|
|
11
|
+
v-if="clearable && model?.length"
|
|
12
|
+
name="close"
|
|
13
|
+
class="cursor-pointer clear-input"
|
|
14
|
+
@click="model = null"
|
|
15
|
+
/>
|
|
16
|
+
<q-btn v-if="uuid" flat no-caps label="UUID" size="sm" class="q-ml-sm uuid-btn" @click="model = uuidv4()" />
|
|
17
|
+
<q-icon
|
|
18
|
+
v-if="copyable"
|
|
19
|
+
name="content_copy"
|
|
20
|
+
class="cursor-pointer q-ml-sm copy-icon"
|
|
21
|
+
color="primary"
|
|
22
|
+
:disable="!model"
|
|
23
|
+
@click="copyToClipboard"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
26
|
+
</q-input>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { defineEmits, defineProps, defineModel } from 'vue'
|
|
32
|
+
import { uuidv4 } from '@/utils/helpers'
|
|
33
|
+
import { notificationSettings } from '@/utils/notification'
|
|
34
|
+
import { QInputProps, useQuasar } from 'quasar'
|
|
35
|
+
|
|
36
|
+
defineProps<
|
|
37
|
+
QInputProps & {
|
|
38
|
+
modelValue?: string | number | null
|
|
39
|
+
label?: string
|
|
40
|
+
placeholder?: string
|
|
41
|
+
rules?: ((val: string | number | null | undefined) => boolean | string)[]
|
|
42
|
+
required?: boolean
|
|
43
|
+
disable?: boolean
|
|
44
|
+
uuid?: boolean
|
|
45
|
+
clearable?: boolean
|
|
46
|
+
copyable?: boolean
|
|
47
|
+
}
|
|
48
|
+
>()
|
|
49
|
+
|
|
50
|
+
defineEmits<{
|
|
51
|
+
(e: 'update:modelValue', val: boolean): void
|
|
52
|
+
}>()
|
|
53
|
+
|
|
54
|
+
const model = defineModel<string | null>()
|
|
55
|
+
|
|
56
|
+
const $q = useQuasar()
|
|
57
|
+
|
|
58
|
+
const copyToClipboard = () => {
|
|
59
|
+
if (!model.value) return
|
|
60
|
+
|
|
61
|
+
navigator.clipboard.writeText(model.value).then(() => {
|
|
62
|
+
$q.notify(notificationSettings('success', 'Данные скопированы'))
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style scoped lang="scss">
|
|
68
|
+
.app-input-new {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
margin-bottom: 15px;
|
|
72
|
+
|
|
73
|
+
&__label {
|
|
74
|
+
font-size: 14px;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
color: #7d8592;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.required {
|
|
80
|
+
color: #f65160;
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.clear-input {
|
|
85
|
+
color: #d8e0f0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.uuid-btn {
|
|
89
|
+
height: 32px;
|
|
90
|
+
padding: 0 10px;
|
|
91
|
+
border: 1px solid #3f8cff;
|
|
92
|
+
color: #3f8cff;
|
|
93
|
+
font-weight: 700;
|
|
94
|
+
font-size: 14px;
|
|
95
|
+
background: white;
|
|
96
|
+
border-radius: 6px;
|
|
97
|
+
|
|
98
|
+
:deep(.block) {
|
|
99
|
+
line-height: normal;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:deep(.q-placeholder) {
|
|
104
|
+
color: #7d8592;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:deep(.q-field__control) {
|
|
108
|
+
border-radius: 8px;
|
|
109
|
+
border: 1px solid #d8e0f0;
|
|
110
|
+
background: #fff;
|
|
111
|
+
box-shadow: 0 1px 2px 0 rgba(184, 200, 224, 0.22);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:deep(.q-field--filled .q-field__control:before) {
|
|
115
|
+
background: #fff !important;
|
|
116
|
+
border: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:deep(.q-field--with-bottom) {
|
|
120
|
+
padding-bottom: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:deep(.q-field__bottom) {
|
|
124
|
+
padding: 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
</style>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:disable="isDisabled"
|
|
12
12
|
:multiple="multiple"
|
|
13
13
|
:popup-content-class="'custom-select-menu'"
|
|
14
|
-
:hide-selected="!showChip"
|
|
14
|
+
:hide-selected="!showChip && !simple"
|
|
15
15
|
:placeholder="placeholder"
|
|
16
16
|
:loading="loading"
|
|
17
17
|
:option-value="optionValue || 'value'"
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
filled
|
|
21
21
|
map-options
|
|
22
22
|
stack-label
|
|
23
|
-
use-input
|
|
24
|
-
use-chips
|
|
23
|
+
:use-input="!selected || !simple"
|
|
24
|
+
:use-chips="!simple"
|
|
25
|
+
:hide-bottom-space="hideBottomSpace"
|
|
25
26
|
input-debounce="100"
|
|
26
27
|
autocomplete=""
|
|
27
28
|
:rules="rules"
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
|
|
45
46
|
<template #append>
|
|
46
47
|
<q-icon
|
|
47
|
-
v-if="!isDisabled && selected && selected.length"
|
|
48
|
+
v-if="!isDisabled && selected && (selected.length || selected > 0)"
|
|
48
49
|
name="close"
|
|
49
50
|
class="cursor-pointer clear-input"
|
|
50
51
|
@click.stop="handleClear"
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
<div class="q-pa-sm">
|
|
56
57
|
<q-item>
|
|
57
58
|
<q-item-section class="wrapper-empty-text">
|
|
58
|
-
{{ emptyText }}
|
|
59
|
+
{{ emptyText || 'Ничего не найдено' }}
|
|
59
60
|
<button
|
|
60
61
|
v-if="allowCreate && internalSearch && internalSearch.trim()"
|
|
61
62
|
class="add-new-items"
|
|
@@ -86,8 +87,8 @@ type Option = Record<string, any>
|
|
|
86
87
|
interface AppQSelectProps {
|
|
87
88
|
modelValue: any
|
|
88
89
|
options: Option[]
|
|
89
|
-
placeholder
|
|
90
|
-
emptyText
|
|
90
|
+
placeholder?: string | undefined
|
|
91
|
+
emptyText?: string
|
|
91
92
|
optionLabel?: string
|
|
92
93
|
optionValue?: string
|
|
93
94
|
label?: string
|
|
@@ -98,6 +99,8 @@ interface AppQSelectProps {
|
|
|
98
99
|
allowCreate?: boolean
|
|
99
100
|
isSearch?: boolean
|
|
100
101
|
showChip?: boolean
|
|
102
|
+
simple?: boolean
|
|
103
|
+
hideBottomSpace?: boolean
|
|
101
104
|
chipColor?: string
|
|
102
105
|
height?: string
|
|
103
106
|
borderColor?: string
|
|
@@ -123,9 +126,10 @@ const selected = computed({
|
|
|
123
126
|
})
|
|
124
127
|
|
|
125
128
|
function handleClear() {
|
|
126
|
-
|
|
129
|
+
const emptyValue = props.multiple ? [] : null
|
|
130
|
+
selected.value = emptyValue
|
|
127
131
|
lcText.value = ''
|
|
128
|
-
emit('update:modelValue',
|
|
132
|
+
emit('update:modelValue', emptyValue)
|
|
129
133
|
emit('clear')
|
|
130
134
|
}
|
|
131
135
|
|
|
@@ -231,10 +235,9 @@ function debounce<T>(fn: T, ms) {
|
|
|
231
235
|
border-radius: 8px;
|
|
232
236
|
border: 1px solid #d8e0f0;
|
|
233
237
|
background: #fff;
|
|
234
|
-
box-shadow:
|
|
238
|
+
box-shadow: 0 1px 2px 0 rgba(184, 200, 224, 0.22);
|
|
235
239
|
}
|
|
236
|
-
|
|
237
|
-
::v-deep(.q-field--filled .q-field__control:before) {
|
|
240
|
+
:global(.q-field--filled.q-field--highlighted .q-field__control:before) {
|
|
238
241
|
background: #fff !important;
|
|
239
242
|
border: none;
|
|
240
243
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import AppButton from '@/common/app-button/AppButton.vue'
|
|
|
3
3
|
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue'
|
|
4
4
|
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue'
|
|
5
5
|
import AppInput from '@/common/app-input/AppInput.vue'
|
|
6
|
+
import AppInputNew from '@/common/app-input-new/AppInputNew.vue'
|
|
6
7
|
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
|
|
7
8
|
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
8
9
|
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
@@ -42,6 +43,7 @@ export {
|
|
|
42
43
|
AppCheckbox,
|
|
43
44
|
AppDatePicker,
|
|
44
45
|
AppInput,
|
|
46
|
+
AppInputNew,
|
|
45
47
|
AppInputSearch,
|
|
46
48
|
AppLayout,
|
|
47
49
|
AppLayoutHeader,
|