hy-dispatch-ui-v3 0.1.2 → 0.1.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/dist/tailwind.css +28 -0
- package/es/components/appButton/appButton.vue.mjs +4 -4
- package/es/components/appButton/style/appButton.scss +4 -4
- package/es/components/appForm/appForm.vue.mjs +17 -3
- package/es/components/appForm/js/useAppForm.mjs +15 -1
- package/es/components/appIcon/style/appIcon.scss +2 -2
- package/es/components/appNoPermissions/appNoPermissions.vue.mjs +48 -0
- package/es/components/appNoPermissions/index.mjs +6 -0
- package/es/components/appNoPermissions/style/appNoPermissions.scss +0 -0
- package/es/components/appNoPermissionsMap/appNoPermissionsMap.vue.mjs +50 -0
- package/es/components/appNoPermissionsMap/index.mjs +6 -0
- package/es/components/appNoPermissionsMap/style/appNoPermissionsMap.scss +0 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +1 -1
- package/es/components/appSearch/appSearch.vue.mjs +22 -6
- package/es/components/appSearch/js/index.mjs +12 -3
- package/es/components/appSearch/js/useAppSearch.mjs +12 -1
- package/es/components/appTable/appTable.vue.mjs +55 -20
- package/es/components/appTable/js/index.mjs +21 -6
- package/es/components/appTable/js/search.mjs +9 -21
- package/es/components/appTable/js/useAppTable.mjs +27 -2
- package/es/components/index.mjs +2 -0
- package/es/index.mjs +2 -0
- package/es/locale/en.mjs +9 -0
- package/es/locale/zh_CN.mjs +10 -1
- package/es/style/index.scss +0 -2
- package/es/version.mjs +1 -1
- package/lib/components/appButton/appButton.vue.js +4 -4
- package/lib/components/appButton/style/appButton.scss +4 -4
- package/lib/components/appForm/appForm.vue.js +17 -3
- package/lib/components/appForm/js/useAppForm.js +15 -1
- package/lib/components/appIcon/style/appIcon.scss +2 -2
- package/lib/components/appNoPermissions/appNoPermissions.vue.js +52 -0
- package/lib/components/appNoPermissions/index.js +11 -0
- package/lib/components/appNoPermissions/style/appNoPermissions.scss +0 -0
- package/lib/components/appNoPermissionsMap/appNoPermissionsMap.vue.js +54 -0
- package/lib/components/appNoPermissionsMap/index.js +11 -0
- package/lib/components/appNoPermissionsMap/style/appNoPermissionsMap.scss +0 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +1 -1
- package/lib/components/appSearch/appSearch.vue.js +23 -7
- package/lib/components/appSearch/js/index.js +12 -2
- package/lib/components/appSearch/js/useAppSearch.js +12 -1
- package/lib/components/appTable/appTable.vue.js +76 -41
- package/lib/components/appTable/js/index.js +21 -6
- package/lib/components/appTable/js/search.js +9 -21
- package/lib/components/appTable/js/useAppTable.js +27 -2
- package/lib/components/index.js +14 -10
- package/lib/index.js +14 -10
- package/lib/locale/en.js +9 -0
- package/lib/locale/zh_CN.js +10 -1
- package/lib/style/index.scss +0 -2
- package/lib/version.js +1 -1
- package/package.json +11 -1
|
@@ -250,13 +250,27 @@ const useAppTableWrapper = (hy) => {
|
|
|
250
250
|
emits("on-select-checkbox", selectedList.value, row);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function onTableSelectHandler(selectList = [], row) {
|
|
254
254
|
if (selectList.length === 0 && tableDataSource.value.length === 0) {
|
|
255
|
-
|
|
255
|
+
clearSelection();
|
|
256
256
|
}
|
|
257
257
|
selectedList.value = [...selectList];
|
|
258
258
|
emits("on-select-checkbox", [...selectList], row);
|
|
259
259
|
}
|
|
260
|
+
function clearSelectedList(list = []) {
|
|
261
|
+
selectedList.value = list || [];
|
|
262
|
+
clearSelection();
|
|
263
|
+
list.forEach((row) => {
|
|
264
|
+
const item = tableDataSource.value.find(
|
|
265
|
+
(v) => getRowKey(row) === getRowKey(v)
|
|
266
|
+
);
|
|
267
|
+
if (item) {
|
|
268
|
+
tableRef.value.toggleRowSelection(item, true);
|
|
269
|
+
} else {
|
|
270
|
+
tableRef.value.toggleRowSelection(row, true);
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
260
274
|
function setTableRowClassName(obj) {
|
|
261
275
|
const row = obj.row;
|
|
262
276
|
let className = [];
|
|
@@ -293,12 +307,13 @@ const useAppTableWrapper = (hy) => {
|
|
|
293
307
|
selectedList,
|
|
294
308
|
tableTriggerRef,
|
|
295
309
|
setTableRowClassName,
|
|
296
|
-
|
|
310
|
+
getSelectedList,
|
|
311
|
+
clearSelection,
|
|
312
|
+
clearSelectedList,
|
|
313
|
+
onTableSelectHandler,
|
|
297
314
|
onTableRowContextmenuHandler,
|
|
298
315
|
onTableRowClickHandler,
|
|
299
|
-
onTableColumnsSelectHandler
|
|
300
|
-
getSelectedList,
|
|
301
|
-
clearSelection
|
|
316
|
+
onTableColumnsSelectHandler
|
|
302
317
|
};
|
|
303
318
|
};
|
|
304
319
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ref, nextTick, unref } from 'vue';
|
|
2
|
-
import { useAppSearch } from '../../appSearch/js/useAppSearch.mjs';
|
|
3
2
|
import { useApi } from '../../../hooks/useApi.mjs';
|
|
4
3
|
import { isEmpty, isNumber, isString } from '../../../utils/is.mjs';
|
|
5
4
|
|
|
@@ -14,12 +13,6 @@ function useAppTableSearch(hy) {
|
|
|
14
13
|
clearSelection
|
|
15
14
|
} = hy;
|
|
16
15
|
const { api } = useApi();
|
|
17
|
-
const { formModel, formColumns } = useAppSearch(props.filterColumns, {
|
|
18
|
-
page: 1,
|
|
19
|
-
// 当前分页数
|
|
20
|
-
size: 15
|
|
21
|
-
// 每页数量
|
|
22
|
-
});
|
|
23
16
|
const totalElements = ref(0);
|
|
24
17
|
const showFilter = ref(true);
|
|
25
18
|
function switchShowFilter() {
|
|
@@ -31,7 +24,7 @@ function useAppTableSearch(hy) {
|
|
|
31
24
|
return new Promise((resolve, reject) => {
|
|
32
25
|
if (!isEmpty(page)) {
|
|
33
26
|
if (isNumber(page) || isString(page)) {
|
|
34
|
-
|
|
27
|
+
props.filterModel.page = page;
|
|
35
28
|
}
|
|
36
29
|
}
|
|
37
30
|
const params = getParametersFn();
|
|
@@ -40,13 +33,11 @@ function useAppTableSearch(hy) {
|
|
|
40
33
|
unref(api).post(`${props.controller}/page`, params, options).then(successFun).finally(() => {
|
|
41
34
|
resolve();
|
|
42
35
|
closeAppTableLoading();
|
|
43
|
-
clearSelection();
|
|
44
36
|
});
|
|
45
37
|
} else if (props.url) {
|
|
46
38
|
unref(api).post(props.url, params, options).then(successFun).finally(() => {
|
|
47
39
|
resolve();
|
|
48
40
|
closeAppTableLoading();
|
|
49
|
-
clearSelection();
|
|
50
41
|
});
|
|
51
42
|
} else {
|
|
52
43
|
closeAppTableLoading();
|
|
@@ -55,11 +46,10 @@ function useAppTableSearch(hy) {
|
|
|
55
46
|
});
|
|
56
47
|
function successFun(res) {
|
|
57
48
|
var _a;
|
|
58
|
-
if (!((_a = res.data.content) == null ? void 0 : _a.length) &&
|
|
49
|
+
if (!((_a = res.data.content) == null ? void 0 : _a.length) && props.filterModel.page !== 1) {
|
|
59
50
|
getData(1);
|
|
60
51
|
return;
|
|
61
52
|
}
|
|
62
|
-
console.log("res", res);
|
|
63
53
|
const data = res.data.content ? res.data.content : res.data || [];
|
|
64
54
|
if (props.beforeDataHandler) {
|
|
65
55
|
tableDataSource.value = props.beforeDataHandler(data);
|
|
@@ -73,14 +63,14 @@ function useAppTableSearch(hy) {
|
|
|
73
63
|
async function resetFn() {
|
|
74
64
|
await nextTick();
|
|
75
65
|
appSearchRef.value.resetFields();
|
|
76
|
-
|
|
66
|
+
props.filterModel.query = null;
|
|
77
67
|
getData(1);
|
|
78
68
|
}
|
|
79
69
|
function getParametersFn() {
|
|
80
70
|
return Object.assign(
|
|
81
71
|
{
|
|
82
|
-
...
|
|
83
|
-
page:
|
|
72
|
+
...props.filterModel,
|
|
73
|
+
page: props.filterModel.page - 1
|
|
84
74
|
},
|
|
85
75
|
unref(props.requestParams)
|
|
86
76
|
);
|
|
@@ -96,22 +86,20 @@ function useAppTableSearch(hy) {
|
|
|
96
86
|
closeAppTableLoading();
|
|
97
87
|
}
|
|
98
88
|
function onSizeChangeHandler(val) {
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
props.filterModel.page = 1;
|
|
90
|
+
props.filterModel.size = val;
|
|
101
91
|
getData();
|
|
102
92
|
}
|
|
103
93
|
function onCurrentChangeHandler(val) {
|
|
104
|
-
|
|
94
|
+
props.filterModel.page = val;
|
|
105
95
|
getData();
|
|
106
96
|
}
|
|
107
97
|
let oldQueryValue;
|
|
108
98
|
function onSearchQueryHandler() {
|
|
109
|
-
const isReset = !(isEmpty(oldQueryValue) && isEmpty(
|
|
99
|
+
const isReset = !(isEmpty(oldQueryValue) && isEmpty(props.filterModel.query) || oldQueryValue === props.filterModel.query);
|
|
110
100
|
getData(isReset ? 1 : null);
|
|
111
101
|
}
|
|
112
102
|
return {
|
|
113
|
-
formModel,
|
|
114
|
-
formColumns,
|
|
115
103
|
totalElements,
|
|
116
104
|
showFilter,
|
|
117
105
|
getData,
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { toRef } from 'vue';
|
|
2
|
+
import { useAppSearch } from '../../appSearch/js/useAppSearch.mjs';
|
|
2
3
|
import { isEmpty, isBoolean } from '../../../utils/is.mjs';
|
|
3
4
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
4
5
|
|
|
6
|
+
function getColumnDefaultConfig(column) {
|
|
7
|
+
switch (column.type) {
|
|
8
|
+
case "selection":
|
|
9
|
+
return {
|
|
10
|
+
prop: `${column.type}_prop`,
|
|
11
|
+
reserveSelection: true
|
|
12
|
+
};
|
|
13
|
+
case "index":
|
|
14
|
+
case "expand":
|
|
15
|
+
return {
|
|
16
|
+
prop: `${column.type}_prop`
|
|
17
|
+
};
|
|
18
|
+
default:
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
5
22
|
function getColumnDefaultWidth(column) {
|
|
6
23
|
if (column.width) return column.width;
|
|
7
24
|
if (column.type === "index") return 80;
|
|
@@ -46,7 +63,7 @@ const useAppTable = (config = {}) => {
|
|
|
46
63
|
throw Error("\u3010column.prop\u3011\u4E0D\u80FD\u4E3A\u7A7A");
|
|
47
64
|
}
|
|
48
65
|
tableColumns.push({
|
|
49
|
-
|
|
66
|
+
...getColumnDefaultConfig(column),
|
|
50
67
|
...column,
|
|
51
68
|
type: column.type || "default",
|
|
52
69
|
width: getColumnDefaultWidth(column),
|
|
@@ -57,9 +74,17 @@ const useAppTable = (config = {}) => {
|
|
|
57
74
|
} catch (err) {
|
|
58
75
|
console.error(err);
|
|
59
76
|
}
|
|
77
|
+
const appSearchForm = useAppSearch(filterColumns, {
|
|
78
|
+
page: 1,
|
|
79
|
+
// 当前分页数
|
|
80
|
+
size: 15
|
|
81
|
+
// 每页数量
|
|
82
|
+
});
|
|
83
|
+
console.log("appSearchFormappSearchFormappSearchForm", appSearchForm);
|
|
60
84
|
return {
|
|
61
85
|
tableColumns: toRef(tableColumns),
|
|
62
|
-
|
|
86
|
+
filterModel: appSearchForm.formModel,
|
|
87
|
+
filterColumns: appSearchForm.formColumns
|
|
63
88
|
};
|
|
64
89
|
};
|
|
65
90
|
|
package/es/components/index.mjs
CHANGED
|
@@ -10,6 +10,8 @@ export { AppTooltip } from './appTooltip/index.mjs';
|
|
|
10
10
|
export { AppConfigProvider } from './appConfigProvider/index.mjs';
|
|
11
11
|
export { AppButton } from './appButton/index.mjs';
|
|
12
12
|
export { AppUserAvatar } from './appUserAvatar/index.mjs';
|
|
13
|
+
export { AppNoPermissions } from './appNoPermissions/index.mjs';
|
|
14
|
+
export { AppNoPermissionsMap } from './appNoPermissionsMap/index.mjs';
|
|
13
15
|
export { useAppForm } from './appForm/js/useAppForm.mjs';
|
|
14
16
|
export { useAppSearch } from './appSearch/js/useAppSearch.mjs';
|
|
15
17
|
export { useAppTable } from './appTable/js/useAppTable.mjs';
|
package/es/index.mjs
CHANGED
|
@@ -6,6 +6,8 @@ export { AppDatePicker } from './components/appDatePicker/index.mjs';
|
|
|
6
6
|
export { AppForm } from './components/appForm/index.mjs';
|
|
7
7
|
export { AppIcon } from './components/appIcon/index.mjs';
|
|
8
8
|
export { AppIconBox } from './components/appIconBox/index.mjs';
|
|
9
|
+
export { AppNoPermissions } from './components/appNoPermissions/index.mjs';
|
|
10
|
+
export { AppNoPermissionsMap } from './components/appNoPermissionsMap/index.mjs';
|
|
9
11
|
export { AppOrgCascader } from './components/appOrgCascader/index.mjs';
|
|
10
12
|
export { AppSearch } from './components/appSearch/index.mjs';
|
|
11
13
|
export { AppTable } from './components/appTable/index.mjs';
|
package/es/locale/en.mjs
CHANGED
|
@@ -31,6 +31,9 @@ var en = {
|
|
|
31
31
|
confirm: "Confirm",
|
|
32
32
|
loading: "Loading"
|
|
33
33
|
},
|
|
34
|
+
form: {
|
|
35
|
+
department: "Department"
|
|
36
|
+
},
|
|
34
37
|
table: {
|
|
35
38
|
hideFilter: "Hide filter",
|
|
36
39
|
displayFilter: "Display filter",
|
|
@@ -64,6 +67,12 @@ var en = {
|
|
|
64
67
|
},
|
|
65
68
|
userAvatar: {
|
|
66
69
|
userAvatar: "User Avatar"
|
|
70
|
+
},
|
|
71
|
+
permissino: {
|
|
72
|
+
youDoNotHaveSubordinatePermissionsForThisModule: "You Do Not Have Subordinate Permissions For This Module",
|
|
73
|
+
pleaseContactTheAdministrator: "Please Contact The Administrator",
|
|
74
|
+
youDoNotHaveAMapConfigurationForThisModule: "You Do Not Have A Map Configuration For This Module",
|
|
75
|
+
pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration: "Please Contact The Administrator To Go To The Settings Center For Configuration"
|
|
67
76
|
}
|
|
68
77
|
};
|
|
69
78
|
|
package/es/locale/zh_CN.mjs
CHANGED
|
@@ -31,6 +31,9 @@ var Chinese = {
|
|
|
31
31
|
confirm: "\u786E\u8BA4",
|
|
32
32
|
loading: "\u52A0\u8F7D\u4E2D"
|
|
33
33
|
},
|
|
34
|
+
form: {
|
|
35
|
+
department: "\u6240\u5C5E\u90E8\u95E8"
|
|
36
|
+
},
|
|
34
37
|
table: {
|
|
35
38
|
hideFilter: "\u9690\u85CF\u7B5B\u9009\u5668",
|
|
36
39
|
displayFilter: "\u663E\u793A\u7B5B\u9009\u5668",
|
|
@@ -60,10 +63,16 @@ var Chinese = {
|
|
|
60
63
|
dangerousOperation: "\u5371\u9669\u64CD\u4F5C"
|
|
61
64
|
},
|
|
62
65
|
cascader: {
|
|
63
|
-
pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u90E8\u95E8"
|
|
66
|
+
pleaseSelectDepartment: "\u8BF7\u9009\u62E9\u6240\u5C5E\u90E8\u95E8"
|
|
64
67
|
},
|
|
65
68
|
userAvatar: {
|
|
66
69
|
userAvatar: "\u7528\u6237\u5934\u50CF"
|
|
70
|
+
},
|
|
71
|
+
permissino: {
|
|
72
|
+
youDoNotHaveSubordinatePermissionsForThisModule: "\u60A8\u6CA1\u6709\u8BE5\u6A21\u5757\u4E0B\u7EA7\u6743\u9650",
|
|
73
|
+
pleaseContactTheAdministrator: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458",
|
|
74
|
+
youDoNotHaveAMapConfigurationForThisModule: "\u60A8\u6CA1\u6709\u8BE5\u6A21\u5757\u7684\u5730\u56FE\u914D\u7F6E",
|
|
75
|
+
pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u524D\u5F80\u8BBE\u7F6E\u4E2D\u5FC3\u8FDB\u884C\u914D\u7F6E"
|
|
67
76
|
}
|
|
68
77
|
};
|
|
69
78
|
|
package/es/style/index.scss
CHANGED
package/es/version.mjs
CHANGED
|
@@ -42,10 +42,10 @@ const _sfc_main = {
|
|
|
42
42
|
setup(__props, { emit: __emit }) {
|
|
43
43
|
const props = __props;
|
|
44
44
|
const typeObj = {
|
|
45
|
-
default: "button_default",
|
|
46
|
-
primary: "button_function",
|
|
47
|
-
success: "button_addTo",
|
|
48
|
-
danger: "button_delete"
|
|
45
|
+
default: "hy-button_default",
|
|
46
|
+
primary: "hy-button_function",
|
|
47
|
+
success: "hy-button_addTo",
|
|
48
|
+
danger: "hy-button_delete"
|
|
49
49
|
};
|
|
50
50
|
const emit = __emit;
|
|
51
51
|
const handleClick = (event) => {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.button_default {
|
|
35
|
+
.hy-button_default {
|
|
36
36
|
background: rgba(94, 157, 180, 0.32);
|
|
37
37
|
|
|
38
38
|
.hy-button__border {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.button_function {
|
|
99
|
+
.hy-button_function {
|
|
100
100
|
background: rgba(45, 242, 255, 0.32);
|
|
101
101
|
|
|
102
102
|
.hy-button__border {
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.button_addTo {
|
|
163
|
+
.hy-button_addTo {
|
|
164
164
|
background: rgba(44, 232, 152, 0.32);
|
|
165
165
|
|
|
166
166
|
.hy-button__border {
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.button_delete {
|
|
227
|
+
.hy-button_delete {
|
|
228
228
|
background: rgba(255, 77, 77, 0.32);
|
|
229
229
|
|
|
230
230
|
.hy-button__border {
|
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
var index$1 = require('../appIcon/index.js');
|
|
8
|
-
var
|
|
8
|
+
var index$2 = require('../appDatePicker/index.js');
|
|
9
|
+
var index$3 = require('../appOrgCascader/index.js');
|
|
9
10
|
var index = require('./js/index.js');
|
|
10
11
|
var useAppForm = require('./js/useAppForm.js');
|
|
11
12
|
var useLocale = require('../../hooks/useLocale.js');
|
|
@@ -251,7 +252,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
251
252
|
"daterange",
|
|
252
253
|
"monthrange",
|
|
253
254
|
"yearrange"
|
|
254
|
-
].includes((_a = column.attrs) == null ? void 0 : _a.type) && vue.unref(is.isArray)(column.field) ? (vue.openBlock(), vue.createBlock(
|
|
255
|
+
].includes((_a = column.attrs) == null ? void 0 : _a.type) && vue.unref(is.isArray)(column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.AppDatePicker), vue.mergeProps({
|
|
255
256
|
key: 0,
|
|
256
257
|
start: __props.model[column.field[0]],
|
|
257
258
|
"onUpdate:start": ($event) => __props.model[column.field[0]] = $event,
|
|
@@ -261,7 +262,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
261
262
|
style: { "width": "100%" }
|
|
262
263
|
}, { ref_for: true }, column.attrs, {
|
|
263
264
|
disabled: vue.unref(index.isDisabled)(props, column)
|
|
264
|
-
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(
|
|
265
|
+
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.AppDatePicker), vue.mergeProps({
|
|
265
266
|
key: 1,
|
|
266
267
|
modelValue: __props.model[column.field],
|
|
267
268
|
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
@@ -299,6 +300,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
299
300
|
],
|
|
300
301
|
2112
|
|
301
302
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
303
|
+
)) : column.type === "org-cascader" ? (vue.openBlock(), vue.createElementBlock(
|
|
304
|
+
vue.Fragment,
|
|
305
|
+
{ key: 6 },
|
|
306
|
+
[
|
|
307
|
+
vue.createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
|
|
308
|
+
vue.createVNode(vue.unref(index$3.AppOrgCascader), vue.mergeProps({
|
|
309
|
+
modelValue: __props.model[column.field],
|
|
310
|
+
"onUpdate:modelValue": ($event) => __props.model[column.field] = $event,
|
|
311
|
+
disabled: vue.unref(index.isDisabled)(props, column)
|
|
312
|
+
}, { ref_for: true }, column.attrs), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
313
|
+
],
|
|
314
|
+
2112
|
|
315
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
302
316
|
)) : vue.createCommentVNode("v-if", true)
|
|
303
317
|
],
|
|
304
318
|
64
|
|
@@ -6,6 +6,15 @@ var date = require('../../../utils/date.js');
|
|
|
6
6
|
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
7
|
var is = require('../../../utils/is.js');
|
|
8
8
|
|
|
9
|
+
const genDefaultLabel = (config) => {
|
|
10
|
+
if (config.label) return config.label;
|
|
11
|
+
const { t } = useLocale.useLocale();
|
|
12
|
+
switch (config.type) {
|
|
13
|
+
// 部门级联选择框
|
|
14
|
+
case "org-cascader":
|
|
15
|
+
return t("form.department");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
9
18
|
const genPlaceholderHandler = (config) => {
|
|
10
19
|
const { t } = useLocale.useLocale();
|
|
11
20
|
const { type, label, attrs = {} } = config || {};
|
|
@@ -13,8 +22,10 @@ const genPlaceholderHandler = (config) => {
|
|
|
13
22
|
switch (type) {
|
|
14
23
|
case "input":
|
|
15
24
|
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
25
|
+
break;
|
|
16
26
|
case "select":
|
|
17
27
|
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
28
|
+
break;
|
|
18
29
|
case "date-picker":
|
|
19
30
|
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
20
31
|
attrs == null ? void 0 : attrs.type
|
|
@@ -40,6 +51,7 @@ const genPlaceholderHandler = (config) => {
|
|
|
40
51
|
} else {
|
|
41
52
|
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
42
53
|
}
|
|
54
|
+
break;
|
|
43
55
|
default:
|
|
44
56
|
placeholder = placeholder || label;
|
|
45
57
|
}
|
|
@@ -74,13 +86,15 @@ const rulesHandler = (config) => {
|
|
|
74
86
|
return rules;
|
|
75
87
|
};
|
|
76
88
|
function appFormItemHandler(column = {}) {
|
|
77
|
-
const
|
|
89
|
+
const label = genDefaultLabel(column);
|
|
90
|
+
const { placeholder, startPlaceholder, endPlaceholder } = genPlaceholderHandler({ ...column, label });
|
|
78
91
|
const attrs = { ...column.attrs || {}, placeholder };
|
|
79
92
|
column = handler.mergeDeep(
|
|
80
93
|
{ ...column },
|
|
81
94
|
{
|
|
82
95
|
key: /* @__PURE__ */ Symbol("appFormItemKey"),
|
|
83
96
|
field: column.prop,
|
|
97
|
+
label,
|
|
84
98
|
readonly: column.readonly || false,
|
|
85
99
|
rules: rulesHandler(column)
|
|
86
100
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index = require('../appIcon/index.js');
|
|
7
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
8
|
+
|
|
9
|
+
import "./style/appNoPermissions.scss";
|
|
10
|
+
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "AppNoPermissions"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
15
|
+
props: {
|
|
16
|
+
svgName: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "2-v3-base-no-data-noData"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: [],
|
|
22
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
const { t } = useLocale.useLocale();
|
|
24
|
+
__expose({});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", { class: "w-full h-full bg-background-2 text-auxiliary text-base flex flex-col items-center justify-center" }, [
|
|
27
|
+
vue.createVNode(vue.unref(index.AppIcon), {
|
|
28
|
+
"svg-name": __props.svgName,
|
|
29
|
+
"class-name": "!w-[46px] !h-[46px]"
|
|
30
|
+
}, null, 8, ["svg-name"]),
|
|
31
|
+
vue.createElementVNode("div", { class: "text-center mt-[12px]" }, [
|
|
32
|
+
vue.createElementVNode(
|
|
33
|
+
"p",
|
|
34
|
+
null,
|
|
35
|
+
vue.toDisplayString(vue.unref(t)("permissino.youDoNotHaveSubordinatePermissionsForThisModule")),
|
|
36
|
+
1
|
|
37
|
+
/* TEXT */
|
|
38
|
+
),
|
|
39
|
+
vue.createElementVNode(
|
|
40
|
+
"p",
|
|
41
|
+
null,
|
|
42
|
+
vue.toDisplayString(vue.unref(t)("permissino.pleaseContactTheAdministrator")),
|
|
43
|
+
1
|
|
44
|
+
/* TEXT */
|
|
45
|
+
)
|
|
46
|
+
])
|
|
47
|
+
]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appNoPermissions = require('./appNoPermissions.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppNoPermissions = handler.withInstall(appNoPermissions.default);
|
|
9
|
+
|
|
10
|
+
exports.AppNoPermissions = AppNoPermissions;
|
|
11
|
+
exports.default = AppNoPermissions;
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index = require('../appIcon/index.js');
|
|
7
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
8
|
+
|
|
9
|
+
import "./style/appNoPermissionsMap.scss";
|
|
10
|
+
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "AppNoPermissionsMap"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
15
|
+
props: {
|
|
16
|
+
svgName: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "2-v3-base-no-data-noData"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: [],
|
|
22
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
const { t } = useLocale.useLocale();
|
|
24
|
+
__expose({});
|
|
25
|
+
return (_ctx, _cache) => {
|
|
26
|
+
return vue.openBlock(), vue.createElementBlock("div", { class: "w-full h-full bg-background-2 text-auxiliary text-base flex flex-col items-center justify-center" }, [
|
|
27
|
+
vue.createVNode(vue.unref(index.AppIcon), {
|
|
28
|
+
"svg-name": __props.svgName,
|
|
29
|
+
"class-name": "!w-[46px] !h-[46px]"
|
|
30
|
+
}, null, 8, ["svg-name"]),
|
|
31
|
+
vue.createElementVNode("div", { class: "text-center mt-[12px]" }, [
|
|
32
|
+
vue.createElementVNode(
|
|
33
|
+
"p",
|
|
34
|
+
null,
|
|
35
|
+
vue.toDisplayString(vue.unref(t)("permissino.youDoNotHaveAMapConfigurationForThisModule")),
|
|
36
|
+
1
|
|
37
|
+
/* TEXT */
|
|
38
|
+
),
|
|
39
|
+
vue.createElementVNode(
|
|
40
|
+
"p",
|
|
41
|
+
null,
|
|
42
|
+
vue.toDisplayString(vue.unref(t)(
|
|
43
|
+
"permissino.pleaseContactTheAdministratorToGoToTheSettingsCenterForConfiguration"
|
|
44
|
+
)),
|
|
45
|
+
1
|
|
46
|
+
/* TEXT */
|
|
47
|
+
)
|
|
48
|
+
])
|
|
49
|
+
]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var appNoPermissionsMap = require('./appNoPermissionsMap.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const AppNoPermissionsMap = handler.withInstall(appNoPermissionsMap.default);
|
|
9
|
+
|
|
10
|
+
exports.AppNoPermissionsMap = AppNoPermissionsMap;
|
|
11
|
+
exports.default = AppNoPermissionsMap;
|
|
File without changes
|