eztech-core-components 1.0.49 → 1.0.51
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/comps/CoreSelect.vue
CHANGED
|
@@ -47,6 +47,7 @@ export default {
|
|
|
47
47
|
value: { type: [String, Array, Number, Object], default: null },
|
|
48
48
|
table_name: { type: String, default: null },
|
|
49
49
|
ref_column: { type: String, default: null },
|
|
50
|
+
col_field: { type: String, default: null },
|
|
50
51
|
projectId: { type: [String, Number], default: null },
|
|
51
52
|
col_multiple: { type: [Boolean, Number, String], default: false },
|
|
52
53
|
trigger_fields: { type: String, default: '' },
|
package/package.json
CHANGED
|
@@ -17,7 +17,9 @@ export const getFormComponent = ({
|
|
|
17
17
|
}) => {
|
|
18
18
|
let name = 'ElInput'
|
|
19
19
|
let props = { disabled: formReadonly || getFormBoolean(col_readonly) }
|
|
20
|
-
if (col_field
|
|
20
|
+
if (col_field === 'year' && col_default === 'current_reg_year') {
|
|
21
|
+
name = 'RegYear'
|
|
22
|
+
} else if (col_field.endsWith('duration_justified')) {
|
|
21
23
|
name = 'CoreDurationJustified'
|
|
22
24
|
} else if (col_field === 'app_password') {
|
|
23
25
|
name = 'CoreAppPassword'
|
|
@@ -124,11 +126,6 @@ export const getFormComponent = ({
|
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
128
|
} else if (['date'].includes(col_type)) {
|
|
127
|
-
// if (col_field.endsWith('start_date')) {
|
|
128
|
-
// name = 'CoreDateRange'
|
|
129
|
-
// } else {
|
|
130
|
-
// name = 'CoreDate'
|
|
131
|
-
// }
|
|
132
129
|
if (col_field.endsWith('end_date')) {
|
|
133
130
|
props = { ...props, col_field }
|
|
134
131
|
} else if (col_field.endsWith('_month')) {
|
|
@@ -185,6 +182,8 @@ export const getFormComponent = ({
|
|
|
185
182
|
name = 'CustomUserSelect'
|
|
186
183
|
} else if (['organization_id', 'parent_id'].some(c => col_field.includes(c)) && !['other_organization_id', 'rest_organization_id'].some(c => col_field.includes(c))) {
|
|
187
184
|
name = 'CoreSelectTree'
|
|
185
|
+
} else if (ref_table === 'hrm_employees') {
|
|
186
|
+
name = 'HrmEmployeeSelect'
|
|
188
187
|
} else {
|
|
189
188
|
name = 'CoreSelect'
|
|
190
189
|
}
|
package/utils/table-helper.js
CHANGED
|
@@ -35,7 +35,7 @@ export const tableWatch = {
|
|
|
35
35
|
}
|
|
36
36
|
export const tableComputed = {
|
|
37
37
|
...mapGetters('settings', ['unsavedChanges', 'loadingWindow', 'env']),
|
|
38
|
-
...mapGetters(['user_position_id', 'refs']),
|
|
38
|
+
...mapGetters(['user_position_id', 'refs', 'regYear']),
|
|
39
39
|
...mapGetters('user', ['token', 'authType']),
|
|
40
40
|
localeId () {
|
|
41
41
|
return this.tempLocaleId || this.locale?._id || (this.locales?.length ? this.locales[0]._id : null)
|
|
@@ -499,7 +499,10 @@ export const tableMethods = {
|
|
|
499
499
|
set(defaultTemp, col.col_field, null)
|
|
500
500
|
continue
|
|
501
501
|
}
|
|
502
|
-
if (col.form.col_default === '
|
|
502
|
+
if (col.form.col_default === 'current_reg_year') {
|
|
503
|
+
set(defaultTemp, col.col_field, this.regYear)
|
|
504
|
+
ruleType = 'number'
|
|
505
|
+
} else if (col.form.col_default === 'now') {
|
|
503
506
|
set(defaultTemp, col.col_field, this.$moment().format('YYYY-MM-DD'))
|
|
504
507
|
} else if (['decimal', 'number'].includes(col.col_type)) {
|
|
505
508
|
ruleType = 'number'
|
|
@@ -1615,6 +1618,7 @@ export const getAsyncData = async ({
|
|
|
1615
1618
|
}
|
|
1616
1619
|
const showColumns = getColumns(columns, [], fields)
|
|
1617
1620
|
const isDetail = showColumns.some(c => c.col_field.includes('html_') && !c.col_field.includes('mini')) || config_group_fields?.some(c => ['SUB_TABLE', 'CUSTOM', 'SUB_TABLE_LOG'].includes(c.group_type))
|
|
1621
|
+
const isRegYear = columns.some(c => c.col_field === 'year' && c.col_default === 'current_reg_year')
|
|
1618
1622
|
return {
|
|
1619
1623
|
configProjectId: project._id,
|
|
1620
1624
|
project,
|
|
@@ -1645,6 +1649,7 @@ export const getAsyncData = async ({
|
|
|
1645
1649
|
isXypLog,
|
|
1646
1650
|
customExtraFields,
|
|
1647
1651
|
statuses,
|
|
1648
|
-
filters
|
|
1652
|
+
filters,
|
|
1653
|
+
isRegYear
|
|
1649
1654
|
}
|
|
1650
1655
|
}
|