free-fe-core-modules 0.0.2 → 0.0.4
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/Basic/EIcon.vue +2 -4
- package/components/Basic/LeveledMenus.vue +0 -5
- package/components/Basic/SummaryHead.vue +23 -3
- package/components/Dialog/BasicDialog.vue +2 -3
- package/components/SlidingCarousel/index.vue +13 -3
- package/components/SlidingNews/index.vue +13 -3
- package/components/ThemeSwitch/index.vue +7 -5
- package/composible/useObjectData.js +69 -0
- package/free-field/Fields/AgreementCheck.js +170 -0
- package/free-field/Fields/ApiCall.js +123 -0
- package/{field-components/Fields/Boolean.vue → free-field/Fields/Boolean.js} +40 -46
- package/free-field/Fields/Category.js +28 -0
- package/free-field/Fields/Check.js +106 -0
- package/free-field/Fields/Customize.js +87 -0
- package/free-field/Fields/Date.js +133 -0
- package/free-field/Fields/DateRange.js +226 -0
- package/free-field/Fields/DynamicList.js +565 -0
- package/{field-components → free-field}/Fields/FixedList.vue +78 -83
- package/free-field/Fields/InputFieldList.vue +324 -0
- package/{field-components → free-field}/Fields/Labels.vue +24 -15
- package/{field-components → free-field}/Fields/MixedTable.vue +53 -61
- package/free-field/Fields/Number.js +167 -0
- package/free-field/Fields/Password.js +81 -0
- package/{field-components → free-field}/Fields/Permission.vue +17 -13
- package/{field-components → free-field}/Fields/PermissionEditor.vue +62 -105
- package/{field-components → free-field}/Fields/QueryFilters.vue +65 -48
- package/{field-components → free-field}/Fields/RadioList.vue +36 -12
- package/{field-components → free-field}/Fields/Rich.vue +104 -114
- package/{field-components → free-field}/Fields/Search.vue +35 -26
- package/{field-components → free-field}/Fields/Select.vue +116 -87
- package/{field-components → free-field}/Fields/SelectionChain.vue +89 -67
- package/{field-components/Fields/Separator.vue → free-field/Fields/Separator.js} +11 -16
- package/{field-components → free-field}/Fields/SingleList.vue +27 -21
- package/free-field/Fields/Static.js +27 -0
- package/free-field/Fields/String.js +105 -0
- package/free-field/Fields/Text.js +80 -0
- package/{field-components → free-field}/Fields/Time.vue +59 -43
- package/{field-components → free-field}/Fields/TimeRange.vue +107 -92
- package/free-field/Fields/Year.js +137 -0
- package/{field-components → free-field}/Fields/YearRange.vue +63 -73
- package/{field-components → free-field}/Fields/index.js +28 -30
- package/free-field/composible/fieldWrapper.js +221 -0
- package/free-field/composible/freeFieldLabel.js +22 -0
- package/free-field/composible/readonlyContent.js +36 -0
- package/free-field/composible/useFileSizeUtils.js +52 -0
- package/free-field/composible/useFreeField.js +143 -0
- package/{field-components → free-field}/index.js +3 -3
- package/i18n/en-us/index.js +1 -1
- package/i18n/zh-cn/index.js +1 -1
- package/index.js +1 -4
- package/package.json +2 -2
- package/router/error/data.js +4 -1
- package/view/dict/index.vue +13 -2
- package/view/error/list.vue +22 -14
- package/view/menu/index.vue +19 -4
- package/view/system/index.vue +15 -2
- package/field-components/Fields/AgreementCheck.vue +0 -161
- package/field-components/Fields/ApiCall.vue +0 -139
- package/field-components/Fields/Category.vue +0 -33
- package/field-components/Fields/Check.vue +0 -131
- package/field-components/Fields/Customize.vue +0 -103
- package/field-components/Fields/Date.vue +0 -142
- package/field-components/Fields/DateRange.vue +0 -199
- package/field-components/Fields/DynamicList.vue +0 -575
- package/field-components/Fields/FieldEditor.vue +0 -379
- package/field-components/Fields/File.vue +0 -382
- package/field-components/Fields/FileList.vue +0 -405
- package/field-components/Fields/FileListCombined.vue +0 -142
- package/field-components/Fields/Image.vue +0 -328
- package/field-components/Fields/ImageList.vue +0 -285
- package/field-components/Fields/ImageListCombined.vue +0 -76
- package/field-components/Fields/InputFieldList.vue +0 -299
- package/field-components/Fields/Number.vue +0 -247
- package/field-components/Fields/Password.vue +0 -79
- package/field-components/Fields/Static.vue +0 -22
- package/field-components/Fields/String.vue +0 -185
- package/field-components/Fields/Text.vue +0 -89
- package/field-components/Fields/UltimateFile.vue +0 -100
- package/field-components/Fields/Year.vue +0 -124
- package/field-components/Fields/components/FieldTypeOptions.vue +0 -248
- package/field-components/components/FieldComponents.vue +0 -246
- package/free-fields/AutoHide.js +0 -66
- package/free-fields/CenterContent.js +0 -15
- package/free-fields/Draggable.js +0 -30
- package/free-fields/Droppable.js +0 -114
- package/free-fields/EditableString.js +0 -63
- package/free-fields/FieldCategory.js +0 -83
- package/free-fields/FieldTypeSelect.js +0 -94
- package/free-fields/fieldEditors/arrayEditor.js +0 -3
- package/free-fields/fieldEditors/boolEditor.js +0 -22
- package/free-fields/fieldEditors/dateEditor.js +0 -23
- package/free-fields/fieldEditors/datetimeEditor.js +0 -23
- package/free-fields/fieldEditors/index.js +0 -21
- package/free-fields/fieldEditors/jsonEditor.js +0 -371
- package/free-fields/fieldEditors/labeledField.js +0 -74
- package/free-fields/fieldEditors/numberEditor.js +0 -51
- package/free-fields/fieldEditors/objectEditor.js +0 -3
- package/free-fields/fieldEditors/selectEditor.js +0 -0
- package/free-fields/fieldEditors/stringEditor.js +0 -49
- package/free-fields/fieldEditors/textEditor.js +0 -50
- package/free-fields/fieldEditors/timeEditor.js +0 -23
- package/free-fields/index.js +0 -402
- /package/{field-components/Display → free-field/Layout}/index.js +0 -0
- /package/{field-components → free-field}/style.sass +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent, h } from 'vue';
|
|
2
|
+
import FieldLabel from './freeFieldLabel';
|
|
3
|
+
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'ReadOnlyContent',
|
|
6
|
+
props: {
|
|
7
|
+
Field: { type: Object },
|
|
8
|
+
Content: {},
|
|
9
|
+
},
|
|
10
|
+
setup(props){
|
|
11
|
+
if (!props.Field) return {};
|
|
12
|
+
|
|
13
|
+
const readonlyNode = () => h('span', {
|
|
14
|
+
class: 'full-width',
|
|
15
|
+
}, [
|
|
16
|
+
(props.Field.Label !== void 0) && h(FieldLabel, {
|
|
17
|
+
Field: props.Field,
|
|
18
|
+
}),
|
|
19
|
+
h('span', {
|
|
20
|
+
class: 'readonly-content'
|
|
21
|
+
}, [
|
|
22
|
+
props.Field.Options?.Prefix && h('span', {
|
|
23
|
+
class: 'prefix'
|
|
24
|
+
}, props.Field.Options.Prefix),
|
|
25
|
+
h('span', {
|
|
26
|
+
style: props.Field.Info?.Style,
|
|
27
|
+
}, props.Content),
|
|
28
|
+
props.Field.Options?.Postfix && h('span', {
|
|
29
|
+
class: 'postfix',
|
|
30
|
+
}, props.Field.Options.Postfix)
|
|
31
|
+
]),
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
return readonlyNode;
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export function fileSizeStrToNumber (s) {
|
|
2
|
+
if (!s) return undefined;
|
|
3
|
+
|
|
4
|
+
const sizeMatch = s.match(/^([0-9]*)(k|m|g*)(b*)/);
|
|
5
|
+
|
|
6
|
+
if (sizeMatch) {
|
|
7
|
+
const num = Number(sizeMatch[1] || 0);
|
|
8
|
+
const unit = (sizeMatch[2] || '').toLowerCase();
|
|
9
|
+
if (!num || !(num > -Infinity)) return '';
|
|
10
|
+
|
|
11
|
+
let multi = 1;
|
|
12
|
+
switch (unit) {
|
|
13
|
+
case 'k':
|
|
14
|
+
multi = 1024;
|
|
15
|
+
break;
|
|
16
|
+
case 'm':
|
|
17
|
+
multi = 1024 * 1024;
|
|
18
|
+
break;
|
|
19
|
+
case 'g':
|
|
20
|
+
multi = 1024 * 1024 * 1024;
|
|
21
|
+
break;
|
|
22
|
+
default:
|
|
23
|
+
multi = 1024;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return Number(num) * multi;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function fileSizeNumberToStr (s) {
|
|
34
|
+
if (!s) return '0K';
|
|
35
|
+
|
|
36
|
+
let sizeNum = Number(s) || 0;
|
|
37
|
+
|
|
38
|
+
if (!sizeNum || sizeNum <= 0) return '0K';
|
|
39
|
+
|
|
40
|
+
const unitList = ['B', 'K', 'M', 'G', 'T', 'P', 'E'];
|
|
41
|
+
let unit = 'B';
|
|
42
|
+
let unitIndex = 0;
|
|
43
|
+
|
|
44
|
+
while (sizeNum >= 1024) {
|
|
45
|
+
if (unit === 'E') break;
|
|
46
|
+
|
|
47
|
+
unit = unitList[++unitIndex];
|
|
48
|
+
sizeNum /= 1024;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return `${sizeNum.toFixed(2)}${unit}`;
|
|
52
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { reactive, watch, watchEffect } from "vue";
|
|
2
|
+
|
|
3
|
+
export const freeFieldProps = {
|
|
4
|
+
values: { type: Object },
|
|
5
|
+
Field: { type: Object },
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export function useFreeField(props) {
|
|
9
|
+
const fieldData = reactive({});
|
|
10
|
+
|
|
11
|
+
watchEffect(() => {
|
|
12
|
+
fieldData.value = Object.nestValue(props.values, props.Field?.Name);
|
|
13
|
+
|
|
14
|
+
// TODO:following is from the old mixins, should we add more logic here accordingly?
|
|
15
|
+
// let realData;
|
|
16
|
+
// if (!this.Field) {
|
|
17
|
+
// // return undefined;
|
|
18
|
+
// } else if (!this.Field.Name) {
|
|
19
|
+
// // this.fieldData = this.Field.Value || this.Field.Default || undefined;
|
|
20
|
+
// realData = this.Field.Value || this.Field.Default || undefined;
|
|
21
|
+
// } else {
|
|
22
|
+
// let isnull = false;
|
|
23
|
+
// if (this.Field && this.Field.Info && this.Field.Info.Dynamic && this.Field.Value) {
|
|
24
|
+
// realData = this.Field.Value;
|
|
25
|
+
// isnull = typeof realData === 'undefined';
|
|
26
|
+
// } else {
|
|
27
|
+
// realData = this.data;
|
|
28
|
+
|
|
29
|
+
// if (this.Field.Name !== '.') {
|
|
30
|
+
// const nameList = this.Field.Name.split('.');
|
|
31
|
+
|
|
32
|
+
// for (let i = 0; i < nameList.length; i += 1) {
|
|
33
|
+
// const name = nameList[i];
|
|
34
|
+
|
|
35
|
+
// // if (!realData) return undefined;
|
|
36
|
+
// if (typeof realData === 'undefined' || realData === null) {
|
|
37
|
+
// isnull = true;
|
|
38
|
+
// break;
|
|
39
|
+
// } else {
|
|
40
|
+
// realData = name ? realData[name] : realData;
|
|
41
|
+
// }
|
|
42
|
+
// }
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
// if (!isnull) {
|
|
47
|
+
// // for non-dynamic field, which have refer data, we should save this data into the field
|
|
48
|
+
// if ((typeof realData === 'undefined') && (this.Field.Value || this.Field.Default)) {
|
|
49
|
+
// realData = this.Field.Value || this.Field.Default;
|
|
50
|
+
|
|
51
|
+
// if (this.Field && this.Field.ReferTo && (!this.Field.Info || !this.Field.Info.Dynamic)) {
|
|
52
|
+
// this.$emit('input');
|
|
53
|
+
// }
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
// // realData = (typeof realData === 'undefined') ? (this.Field.Value || this.Field.Default) : realData;
|
|
57
|
+
|
|
58
|
+
// if (this.Field.Options && this.Field.Options.Filters) {
|
|
59
|
+
// let filters = [];
|
|
60
|
+
// if (typeof this.Field.Options.Filters === 'string') {
|
|
61
|
+
// // only one filter
|
|
62
|
+
// filters.push(this.Field.Options.Filters);
|
|
63
|
+
// } else if (Array.isArray(this.Field.Options.Filters)) {
|
|
64
|
+
// filters = filters.concat(this.Field.Options.Filters);
|
|
65
|
+
// }
|
|
66
|
+
|
|
67
|
+
// for (let i = 0; i < filters.length; i += 1) {
|
|
68
|
+
// const f = filters[i];
|
|
69
|
+
// const filter = this.$options.filters[f];
|
|
70
|
+
// if (filter) {
|
|
71
|
+
// realData = filter(realData);
|
|
72
|
+
// }
|
|
73
|
+
// }
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
// }
|
|
77
|
+
|
|
78
|
+
// if ((typeof realData === 'undefined' || realData === null || !realData) && this.Field.Info && this.Field.Info.ShowNaN) {
|
|
79
|
+
// return this.ctx.config.nanPlaceholder || '';
|
|
80
|
+
// }
|
|
81
|
+
|
|
82
|
+
// return realData;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
fieldData,
|
|
87
|
+
getFieldData: (n) => Object.nestValue(props.values, n),
|
|
88
|
+
setFieldData: (v, emit, evt = 'input') => {
|
|
89
|
+
fieldData.value = v;
|
|
90
|
+
Object.setValue(props.values, props.Field?.Name, v);
|
|
91
|
+
|
|
92
|
+
if (emit) emit(evt, v);
|
|
93
|
+
},
|
|
94
|
+
setData: (n, v) => {
|
|
95
|
+
Object.setValue(props.values, n, v);
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
// TODO: make function for validating all fields in the current component
|
|
102
|
+
function validate() {
|
|
103
|
+
if (this.shouldHide) return true;
|
|
104
|
+
|
|
105
|
+
// could have customized validate function in component
|
|
106
|
+
if (this.selfValidate && typeof this.selfValidate === 'function' && !this.selfValidate()) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const validators = Object.keys(this.$refs).filter((k) => k.startsWith('input_field_validator_'));
|
|
111
|
+
if (!validators || validators.length <= 0) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
let hasError = false;
|
|
116
|
+
for (let i = 0; i < validators.length; i += 1) {
|
|
117
|
+
const valid = validators[i];
|
|
118
|
+
|
|
119
|
+
if (this.$refs[valid]) {
|
|
120
|
+
if (Array.isArray(this.$refs[valid])) {
|
|
121
|
+
for (let j = 0; j < this.$refs[valid].length; j += 1) {
|
|
122
|
+
const sv = this.$refs[valid][j];
|
|
123
|
+
|
|
124
|
+
if (sv.shouldHide !== true) {
|
|
125
|
+
if (typeof sv.validate === 'function') {
|
|
126
|
+
hasError = !sv.validate() || hasError;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
} else if (typeof this.$refs[valid].validate === 'function') {
|
|
131
|
+
if (this.$refs[valid].shouldHide !== true) {
|
|
132
|
+
hasError = !this.$refs[valid].validate() || hasError;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return !hasError;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const useFreeFieldMethods = {
|
|
142
|
+
validate,
|
|
143
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fields from './Fields';
|
|
2
|
-
import
|
|
3
|
-
import FreeField from './
|
|
2
|
+
import layout from './Layout';
|
|
3
|
+
import FreeField from './composible/fieldWrapper.js';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
components: {
|
|
@@ -8,6 +8,6 @@ export default {
|
|
|
8
8
|
},
|
|
9
9
|
fieldComponents: {
|
|
10
10
|
...fields,
|
|
11
|
-
...
|
|
11
|
+
...layout,
|
|
12
12
|
},
|
|
13
13
|
};
|
package/i18n/en-us/index.js
CHANGED
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
validatorOnlyCNUDescription: "",
|
|
40
40
|
validatorOnlyCNSName: "只能是中文或数字或特殊字符",
|
|
41
41
|
validatorOnlyCNSDescription:
|
|
42
|
-
|
|
42
|
+
`只能是中文或数字或("."、{'@'}、"<"、">"、"_"、"?")`,
|
|
43
43
|
|
|
44
44
|
validatorOnlyIntegerName: "只能是整数",
|
|
45
45
|
validatorOnlyIntegerDescription: "",
|
package/i18n/zh-cn/index.js
CHANGED
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
validatorOnlyCNUDescription: "",
|
|
40
40
|
validatorOnlyCNSName: "只能是中文或数字或特殊字符",
|
|
41
41
|
validatorOnlyCNSDescription:
|
|
42
|
-
|
|
42
|
+
`只能是中文或数字或("."、{'@'}、"<"、">"、"_"、"?")`,
|
|
43
43
|
|
|
44
44
|
validatorOnlyIntegerName: "只能是整数",
|
|
45
45
|
validatorOnlyIntegerDescription: "",
|
package/index.js
CHANGED
|
@@ -15,8 +15,7 @@ import ThemeSwitch from './components/ThemeSwitch/index.vue';
|
|
|
15
15
|
|
|
16
16
|
import Mourning from './view/mourning/mourning.vue';
|
|
17
17
|
|
|
18
|
-
import FieldComponents from './field
|
|
19
|
-
import FreeFields from './free-fields';
|
|
18
|
+
import FieldComponents from './free-field';
|
|
20
19
|
import routers from './router';
|
|
21
20
|
|
|
22
21
|
// global filters
|
|
@@ -136,7 +135,6 @@ const filters = {
|
|
|
136
135
|
};
|
|
137
136
|
|
|
138
137
|
export default (app, root) => {
|
|
139
|
-
console.error('register dialog')
|
|
140
138
|
root.use(MsgDialog);
|
|
141
139
|
|
|
142
140
|
return {
|
|
@@ -278,7 +276,6 @@ export default (app, root) => {
|
|
|
278
276
|
BreadCrumbs,
|
|
279
277
|
ThemeSwitch,
|
|
280
278
|
...FieldComponents.components,
|
|
281
|
-
...FreeFields,
|
|
282
279
|
Mourning,
|
|
283
280
|
},
|
|
284
281
|
fieldComponents: FieldComponents.fieldComponents,
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "free-fe-core-modules",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": "git@gitlab.com:eis-base/modules/free-fe-core-modules.git",
|
|
6
6
|
"author": "zhiquan",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@tinymce/tinymce-vue": "^5.0.
|
|
9
|
+
"@tinymce/tinymce-vue": "^5.0.1"
|
|
10
10
|
}
|
|
11
11
|
}
|
package/router/error/data.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// import Vue from 'vue';
|
|
2
2
|
import { getErrorCode } from './api';
|
|
3
3
|
|
|
4
|
+
import { i18n } from '@/boot/i18n';
|
|
5
|
+
const {global:{t}} = i18n;
|
|
6
|
+
|
|
4
7
|
// const bus = new Vue();
|
|
5
8
|
|
|
6
9
|
export default {
|
|
@@ -19,7 +22,7 @@ export default {
|
|
|
19
22
|
|
|
20
23
|
d.summary = [
|
|
21
24
|
{
|
|
22
|
-
text: '代码数',
|
|
25
|
+
text: t('代码数'),
|
|
23
26
|
number: d.total || '0',
|
|
24
27
|
number_color: 'red',
|
|
25
28
|
icon: app.config.countIcon || 'fas fa-calculator',
|
package/view/dict/index.vue
CHANGED
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
</template>
|
|
83
83
|
|
|
84
84
|
<script>
|
|
85
|
-
import mixins from 'free-fe-mixins';
|
|
86
85
|
import { defineComponent } from 'vue';
|
|
86
|
+
import { useObjectData, objectDataProps } from '../../composible/useObjectData';
|
|
87
87
|
|
|
88
88
|
export default defineComponent({
|
|
89
89
|
name: 'DictionaryPage',
|
|
90
|
-
mixins: [mixins.ObjectDataMixin],
|
|
91
90
|
props: {
|
|
91
|
+
...objectDataProps,
|
|
92
92
|
addDict: { type: Function, default: () => {} },
|
|
93
93
|
editDict: { type: Function, default: () => {} },
|
|
94
94
|
deleteDict: { type: Function, default: () => {} },
|
|
@@ -100,6 +100,17 @@ export default defineComponent({
|
|
|
100
100
|
dictFields: [],
|
|
101
101
|
};
|
|
102
102
|
},
|
|
103
|
+
setup(props, ctx) {
|
|
104
|
+
const {
|
|
105
|
+
data,
|
|
106
|
+
refreshData,
|
|
107
|
+
} = useObjectData(props, ctx);
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
data,
|
|
111
|
+
refreshData,
|
|
112
|
+
};
|
|
113
|
+
},
|
|
103
114
|
watch: {
|
|
104
115
|
// eslint-disable-next-line func-names
|
|
105
116
|
'editingDict.Type': function (v) {
|
package/view/error/list.vue
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
<div class="flow-list">
|
|
3
3
|
<summary-head :values="data.summary" :Bus="Bus"></summary-head>
|
|
4
4
|
<q-table
|
|
5
|
+
flat
|
|
6
|
+
bordered
|
|
5
7
|
:rows="data ? data.docs : []"
|
|
6
8
|
:columns="columns"
|
|
7
9
|
row-key="id"
|
|
@@ -48,9 +50,9 @@
|
|
|
48
50
|
</template>
|
|
49
51
|
|
|
50
52
|
<template v-slot:top-row>
|
|
51
|
-
<q-tr class="persistant-top-row full-width">
|
|
53
|
+
<!-- <q-tr class="persistant-top-row full-width">
|
|
52
54
|
<q-td class="full-width" colspan="100%"></q-td>
|
|
53
|
-
</q-tr>
|
|
55
|
+
</q-tr> -->
|
|
54
56
|
<q-tr v-if="showFilters" class="table-row filter-row">
|
|
55
57
|
<q-td colspan="100%" class="table-cell filter-cell">
|
|
56
58
|
<free-field
|
|
@@ -87,16 +89,27 @@
|
|
|
87
89
|
</template>
|
|
88
90
|
|
|
89
91
|
<script>
|
|
90
|
-
import mixins from 'free-fe-mixins';
|
|
91
|
-
import { updateErrorCode, updateDescription } from '../../router/error/api';
|
|
92
92
|
import { defineComponent } from 'vue';
|
|
93
|
+
import { useObjectData, objectDataProps } from '../../composible/useObjectData';
|
|
94
|
+
import { updateErrorCode, updateDescription } from '../../router/error/api';
|
|
93
95
|
|
|
94
96
|
export default defineComponent({
|
|
95
97
|
name: 'ErrorCodeList',
|
|
96
|
-
mixins: [mixins.ObjectDataMixin],
|
|
97
98
|
props: {
|
|
99
|
+
...objectDataProps,
|
|
98
100
|
pagination: { type: Boolean, default: true },
|
|
99
101
|
},
|
|
102
|
+
setup(props, ctx) {
|
|
103
|
+
const {
|
|
104
|
+
data,
|
|
105
|
+
refreshData,
|
|
106
|
+
} = useObjectData(props, ctx);
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
data,
|
|
110
|
+
refreshData,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
100
113
|
data() {
|
|
101
114
|
return {
|
|
102
115
|
queryFilter: {},
|
|
@@ -113,25 +126,25 @@ export default defineComponent({
|
|
|
113
126
|
},
|
|
114
127
|
{
|
|
115
128
|
name: 'date',
|
|
116
|
-
label: '日期',
|
|
129
|
+
label: this.$t('日期'),
|
|
117
130
|
field: 'LastUpdateDate',
|
|
118
131
|
filters: 'normalDate',
|
|
119
132
|
style: 'max-width: 200px;',
|
|
120
133
|
},
|
|
121
134
|
{
|
|
122
135
|
name: 'code',
|
|
123
|
-
label: '代码',
|
|
136
|
+
label: this.$t('代码'),
|
|
124
137
|
field: 'Code',
|
|
125
138
|
style: 'max-width: 120px;',
|
|
126
139
|
},
|
|
127
140
|
{
|
|
128
141
|
name: 'message',
|
|
129
|
-
label: '信息',
|
|
142
|
+
label: this.$t('信息'),
|
|
130
143
|
field: 'Message',
|
|
131
144
|
},
|
|
132
145
|
{
|
|
133
146
|
name: 'description',
|
|
134
|
-
label: '描述',
|
|
147
|
+
label: this.$t('描述'),
|
|
135
148
|
field: 'Description',
|
|
136
149
|
},
|
|
137
150
|
],
|
|
@@ -190,8 +203,3 @@ export default defineComponent({
|
|
|
190
203
|
beforeUnmount() {},
|
|
191
204
|
});
|
|
192
205
|
</script>
|
|
193
|
-
|
|
194
|
-
<style lang="sass" scoped>
|
|
195
|
-
.persistant-top-row
|
|
196
|
-
display: none
|
|
197
|
-
</style>
|
package/view/menu/index.vue
CHANGED
|
@@ -86,17 +86,29 @@
|
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
88
|
<script>
|
|
89
|
-
import mixins from 'free-fe-mixins';
|
|
90
89
|
import { defineComponent } from 'vue';
|
|
90
|
+
import { useObjectData, objectDataProps } from '../../composible/useObjectData';
|
|
91
91
|
|
|
92
92
|
export default defineComponent({
|
|
93
93
|
name: 'MenuPage',
|
|
94
|
-
mixins: [mixins.
|
|
94
|
+
// mixins: [mixins.InputFieldValidator],
|
|
95
95
|
props: {
|
|
96
|
+
...objectDataProps,
|
|
96
97
|
addMenu: { type: Function, default: () => { } },
|
|
97
98
|
editMenu: { type: Function, default: () => { } },
|
|
98
99
|
deleteMenu: { type: Function, default: () => { } },
|
|
99
100
|
},
|
|
101
|
+
setup(props, ctx) {
|
|
102
|
+
const {
|
|
103
|
+
data,
|
|
104
|
+
refreshData,
|
|
105
|
+
} = useObjectData(props, ctx);
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
data,
|
|
109
|
+
refreshData,
|
|
110
|
+
};
|
|
111
|
+
},
|
|
100
112
|
data() {
|
|
101
113
|
return {
|
|
102
114
|
selectedMenuNode: {},
|
|
@@ -154,12 +166,12 @@ export default defineComponent({
|
|
|
154
166
|
|
|
155
167
|
// add the customize input option
|
|
156
168
|
m.Options.push({
|
|
157
|
-
Label: '自定义',
|
|
169
|
+
Label: this.$t('自定义'),
|
|
158
170
|
Value: 'customize',
|
|
159
171
|
Extra: [
|
|
160
172
|
{
|
|
161
173
|
Name: 'CustomizeRoute',
|
|
162
|
-
Label: '自定义路径',
|
|
174
|
+
Label: this.$t('自定义路径'),
|
|
163
175
|
},
|
|
164
176
|
],
|
|
165
177
|
});
|
|
@@ -322,6 +334,9 @@ export default defineComponent({
|
|
|
322
334
|
this.onCancelClick();
|
|
323
335
|
}
|
|
324
336
|
},
|
|
337
|
+
fieldInput(e) {
|
|
338
|
+
console.log(e)
|
|
339
|
+
}
|
|
325
340
|
},
|
|
326
341
|
});
|
|
327
342
|
</script>
|
package/view/system/index.vue
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
class="step-left flow-step system-config-wrapper"
|
|
5
5
|
v-if="data && data.StepsDefinition && data.StepsDefinition.length"
|
|
6
6
|
v-model="currentStep"
|
|
7
|
+
flat
|
|
8
|
+
bordered
|
|
7
9
|
animated
|
|
8
10
|
header-nav
|
|
9
11
|
>
|
|
@@ -77,16 +79,27 @@
|
|
|
77
79
|
</template>
|
|
78
80
|
|
|
79
81
|
<script>
|
|
80
|
-
import mixins from 'free-fe-mixins';
|
|
81
82
|
import { updateConfig } from '../../router/system/api';
|
|
82
83
|
import { defineComponent } from 'vue';
|
|
84
|
+
import { useObjectData, objectDataProps } from '../../composible/useObjectData';
|
|
83
85
|
|
|
84
86
|
export default defineComponent({
|
|
85
87
|
name: 'SystemConfigPage',
|
|
86
|
-
mixins: [mixins.ObjectDataMixin],
|
|
87
88
|
props: {
|
|
89
|
+
...objectDataProps,
|
|
88
90
|
buttonsVisible: { type: Function, default: () => true },
|
|
89
91
|
},
|
|
92
|
+
setup(props, ctx) {
|
|
93
|
+
const {
|
|
94
|
+
data,
|
|
95
|
+
refreshData,
|
|
96
|
+
} = useObjectData(props, ctx);
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
data,
|
|
100
|
+
refreshData,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
90
103
|
data() {
|
|
91
104
|
return {
|
|
92
105
|
currentStep: 1,
|