hy-dispatch-ui-v3 0.2.59 → 0.2.61
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 +131 -6
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/api/index.mjs +137 -0
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
- package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/es/bussiness/index.mjs +1 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
- package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
- package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
- package/es/components/hyForm/form.vue.mjs +83 -31
- package/es/components/hyForm/js/index.mjs +9 -2
- package/es/components/hyForm/js/useAppForm.mjs +6 -36
- package/es/components/hyMap/map.vue.mjs +3 -3
- package/es/components/hyMenu/menu.vue.mjs +38 -23
- package/es/components/hyMenu/style/menu.scss +3 -1
- package/es/components/hyOrgCascader/js/index.mjs +2 -2
- package/es/components/hyRadioGroup/index.mjs +6 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
- package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
- package/es/components/hySearch/js/useAppSearch.mjs +3 -33
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
- package/es/components/hyTable/js/index.mjs +6 -3
- package/es/components/hyTable/js/search.mjs +1 -0
- package/es/components/hyTable/table.vue.mjs +11 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
- package/es/components/hyTree/js/index.mjs +69 -53
- package/es/components/hyTree/tree.vue.mjs +36 -1
- package/es/components/hyVideoPlayer/js/index.mjs +0 -1
- package/es/components/index.mjs +1 -0
- package/es/hooks/useApi.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +1 -1
- package/es/index.mjs +4 -1
- package/es/locale/en.mjs +17 -1
- package/es/locale/zh_CN.mjs +17 -1
- package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/es/style/index.scss +53 -0
- package/es/style/theme.scss +0 -53
- package/es/utils/form.mjs +56 -7
- package/es/utils/handler.mjs +5 -0
- package/es/utils/index.mjs +2 -1
- package/es/utils/map/hook/bigMap.mjs +4 -0
- package/es/utils/map/hook/gaode.mjs +3 -0
- package/es/utils/map/hook/leafletjs.mjs +10 -10
- package/es/utils/map/index.mjs +27 -7
- package/es/utils/tree.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
- package/lib/api/index.js +147 -0
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
- package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
- package/lib/bussiness/index.js +5 -0
- package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
- package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
- package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
- package/lib/components/hyForm/form.vue.js +79 -27
- package/lib/components/hyForm/js/index.js +9 -1
- package/lib/components/hyForm/js/useAppForm.js +5 -35
- package/lib/components/hyMap/map.vue.js +3 -3
- package/lib/components/hyMenu/menu.vue.js +37 -22
- package/lib/components/hyMenu/style/menu.scss +3 -1
- package/lib/components/hyOrgCascader/js/index.js +2 -2
- package/lib/components/hyRadioGroup/index.js +11 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
- package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
- package/lib/components/hySearch/js/useAppSearch.js +2 -32
- package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
- package/lib/components/hyTable/js/index.js +6 -3
- package/lib/components/hyTable/js/search.js +1 -0
- package/lib/components/hyTable/table.vue.js +43 -36
- package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
- package/lib/components/hyTableForm/tableForm.vue.js +6 -0
- package/lib/components/hyTree/js/index.js +69 -53
- package/lib/components/hyTree/tree.vue.js +36 -1
- package/lib/components/hyVideoPlayer/js/index.js +0 -1
- package/lib/components/index.js +14 -12
- package/lib/hooks/useApi.js +2 -2
- package/lib/index.js +61 -49
- package/lib/locale/en.js +17 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
- package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
- package/lib/style/index.scss +53 -0
- package/lib/style/theme.scss +0 -53
- package/lib/utils/form.js +57 -5
- package/lib/utils/handler.js +5 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/map/hook/bigMap.js +4 -0
- package/lib/utils/map/hook/gaode.js +3 -0
- package/lib/utils/map/hook/leafletjs.js +10 -10
- package/lib/utils/map/index.js +26 -6
- package/lib/utils/tree.js +10 -0
- package/lib/version.js +1 -1
- package/package.json +2 -2
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
-
var elementPlus = require('element-plus');
|
|
7
|
-
var iconsVue = require('@element-plus/icons-vue');
|
|
8
6
|
var index = require('../hyTooltip/index.js');
|
|
9
7
|
var index$1 = require('../hyIcon/index.js');
|
|
10
8
|
|
|
@@ -25,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
25
23
|
},
|
|
26
24
|
showShrink: {
|
|
27
25
|
type: Boolean,
|
|
28
|
-
default:
|
|
26
|
+
default: true
|
|
29
27
|
}
|
|
30
28
|
}, {
|
|
31
29
|
"expand": { type: Boolean, default: true },
|
|
@@ -70,18 +68,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
70
68
|
}, [
|
|
71
69
|
vue.createElementVNode("div", { class: "operator-label clickBox" }, [
|
|
72
70
|
vue.createVNode(vue.unref(index$1.HyIcon), {
|
|
73
|
-
"svg-name": `${item.iconName}`,
|
|
74
|
-
"class-name": "!w-
|
|
71
|
+
"svg-name": `${item.iconNameV3 || item.iconName}`,
|
|
72
|
+
"class-name": "!w-4 !h-4 flex-shrink-0"
|
|
75
73
|
}, null, 8, ["svg-name"]),
|
|
76
74
|
vue.createElementVNode(
|
|
77
75
|
"div",
|
|
78
76
|
{
|
|
79
|
-
class: vue.normalizeClass([{
|
|
77
|
+
class: vue.normalizeClass([{
|
|
78
|
+
"ml-4 mr-3": expand.value,
|
|
79
|
+
"text-center mt-1": !expand.value
|
|
80
|
+
}, "over_one_line w-full"])
|
|
80
81
|
},
|
|
81
82
|
vue.toDisplayString(expand.value ? item.label : item.tip || item.label),
|
|
82
83
|
3
|
|
83
84
|
/* TEXT, CLASS */
|
|
84
|
-
)
|
|
85
|
+
),
|
|
86
|
+
expand.value && __props.modelValue === item.path ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
|
|
87
|
+
key: 0,
|
|
88
|
+
"svg-name": "analytics-v3-card-bili",
|
|
89
|
+
class: "text-theme",
|
|
90
|
+
"class-name": "!w-3 !h-3 flex-shrink-0"
|
|
91
|
+
})) : vue.createCommentVNode("v-if", true)
|
|
85
92
|
])
|
|
86
93
|
], 10, ["onClick"])
|
|
87
94
|
]),
|
|
@@ -95,23 +102,31 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
95
102
|
]),
|
|
96
103
|
__props.showShrink ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
97
104
|
key: 0,
|
|
98
|
-
class: vue.normalizeClass(["w-full h-[44px] border-t border-border box-border cursor-pointer relative", { "justify-end pr-3": expand.value, "justify-center": !expand.value }]),
|
|
105
|
+
class: vue.normalizeClass(["w-full h-[44px] border-t border-border box-border cursor-pointer relative flex items-center", { "justify-end pr-3": expand.value, "justify-center": !expand.value }]),
|
|
99
106
|
onClick: ($event) => onExpandHandler()
|
|
100
107
|
}, [
|
|
101
|
-
vue.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
expand.value ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
|
|
109
|
+
key: 0,
|
|
110
|
+
"svg-name": "ops-linear-shouqi",
|
|
111
|
+
"class-name": "!w-4 !h-4 flex-shrink-0"
|
|
112
|
+
})) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
|
|
113
|
+
key: 1,
|
|
114
|
+
"svg-name": "ops-linear-zhankai",
|
|
115
|
+
"class-name": "!w-4 !h-4 flex-shrink-0"
|
|
116
|
+
})),
|
|
117
|
+
vue.createCommentVNode(" <el-icon"),
|
|
118
|
+
vue.createCommentVNode(' size="20"'),
|
|
119
|
+
vue.createCommentVNode(' :style="{'),
|
|
120
|
+
vue.createCommentVNode(" transform: expand"),
|
|
121
|
+
vue.createCommentVNode(" ? 'translate(0px, -50%) rotateY(0deg) rotateZ(90deg)'"),
|
|
122
|
+
vue.createCommentVNode(" : 'translate(50%, -50%) rotateY(-180deg) rotateZ(90deg)',"),
|
|
123
|
+
vue.createCommentVNode(" transition: 'all 0.3s linear',"),
|
|
124
|
+
vue.createCommentVNode(' }"'),
|
|
125
|
+
vue.createCommentVNode(' class="absolute top-1/2"'),
|
|
126
|
+
vue.createCommentVNode(` :class="{ 'right-3': expand, 'right-1/2': !expand }"`),
|
|
127
|
+
vue.createCommentVNode(" >"),
|
|
128
|
+
vue.createCommentVNode(" <Download />"),
|
|
129
|
+
vue.createCommentVNode(" </el-icon>")
|
|
115
130
|
], 10, ["onClick"])) : vue.createCommentVNode("v-if", true)
|
|
116
131
|
],
|
|
117
132
|
2
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
left: 0;
|
|
54
54
|
top: 50%;
|
|
55
55
|
transform: translateY(-50%);
|
|
56
|
+
border-radius: 10px;
|
|
56
57
|
background-color: rgba(var(--hy-theme));
|
|
57
58
|
}
|
|
58
59
|
.operator-label {
|
|
@@ -115,6 +116,7 @@
|
|
|
115
116
|
left: 0;
|
|
116
117
|
top: 50%;
|
|
117
118
|
transform: translateY(-50%);
|
|
119
|
+
border-radius: 10px;
|
|
118
120
|
background-color: rgba(var(--hy-theme));
|
|
119
121
|
}
|
|
120
122
|
.operator-label {
|
|
@@ -138,7 +140,7 @@
|
|
|
138
140
|
rgba(var(--hy-theme), 0) 2%,
|
|
139
141
|
rgba(var(--hy-theme), 0.4) 100%
|
|
140
142
|
);
|
|
141
|
-
border-radius: 0px 4px 4px 0px;
|
|
143
|
+
//border-radius: 0px 4px 4px 0px;
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var Axios = require('axios');
|
|
4
4
|
var vue = require('vue');
|
|
5
5
|
var useApi = require('../../../hooks/useApi.js');
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ function getOrgTreeSimple() {
|
|
|
12
12
|
if (cancelSource) {
|
|
13
13
|
cancelSource.cancel("\u4E2D\u65AD\u8BF7\u6C42");
|
|
14
14
|
}
|
|
15
|
-
cancelSource =
|
|
15
|
+
cancelSource = Axios.CancelToken.source();
|
|
16
16
|
throttleFn = new Promise((resolve, reject) => {
|
|
17
17
|
vue.unref(api).post(
|
|
18
18
|
"organization/orgTreeSimple",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var radioGroup = require('./radioGroup.vue.js');
|
|
6
|
+
var handler = require('../../utils/handler.js');
|
|
7
|
+
|
|
8
|
+
const HyRadioGroup = handler.withInstall(radioGroup.default);
|
|
9
|
+
|
|
10
|
+
exports.HyRadioGroup = HyRadioGroup;
|
|
11
|
+
exports.default = HyRadioGroup;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
import "./style/radioGroup.scss";
|
|
8
|
+
|
|
9
|
+
const __default__ = vue.defineComponent({
|
|
10
|
+
name: "HyRadioGroup"
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
13
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
14
|
+
options: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "default"
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
"modelValue": {
|
|
28
|
+
type: [String, Number, Boolean]
|
|
29
|
+
},
|
|
30
|
+
"modelModifiers": {}
|
|
31
|
+
}),
|
|
32
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
|
|
33
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
34
|
+
const props = __props;
|
|
35
|
+
const emits = __emit;
|
|
36
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
37
|
+
const sliderRef = vue.useTemplateRef("sliderRef");
|
|
38
|
+
const selectIndex = vue.ref(0);
|
|
39
|
+
const radioProps = vue.computed(() => {
|
|
40
|
+
return {
|
|
41
|
+
value: "value",
|
|
42
|
+
label: "label",
|
|
43
|
+
disabled: "disabled",
|
|
44
|
+
...props.props || {}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
function switchSelect(target) {
|
|
48
|
+
modelValue.value = target[radioProps.value.value];
|
|
49
|
+
emits("change", modelValue.value);
|
|
50
|
+
}
|
|
51
|
+
async function sliderHandler() {
|
|
52
|
+
selectIndex.value = props.options.findIndex((item) => {
|
|
53
|
+
return item[radioProps.value.value] === modelValue.value;
|
|
54
|
+
});
|
|
55
|
+
await vue.nextTick();
|
|
56
|
+
const slider = sliderRef.value;
|
|
57
|
+
if (slider) {
|
|
58
|
+
const proportion = 100 / props.options.length;
|
|
59
|
+
const left = selectIndex.value > 0 ? selectIndex.value * proportion : 0;
|
|
60
|
+
console.log("proportion", proportion, left, selectIndex.value);
|
|
61
|
+
slider.style.left = `${left}%`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
vue.watch(
|
|
65
|
+
() => [modelValue.value, props.options],
|
|
66
|
+
() => {
|
|
67
|
+
sliderHandler();
|
|
68
|
+
},
|
|
69
|
+
{ immediate: true }
|
|
70
|
+
);
|
|
71
|
+
__expose({});
|
|
72
|
+
return (_ctx, _cache) => {
|
|
73
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
74
|
+
"ul",
|
|
75
|
+
{
|
|
76
|
+
class: vue.normalizeClass(["w-full flex text-xs rounded border border-border box-border relative", [
|
|
77
|
+
__props.size === "large" ? "h-[40px]" : __props.size === "small" ? "h-[24px]" : "h-[32px]",
|
|
78
|
+
__props.size === "small" ? "text-xs" : "text-sm"
|
|
79
|
+
]])
|
|
80
|
+
},
|
|
81
|
+
[
|
|
82
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
83
|
+
vue.Fragment,
|
|
84
|
+
null,
|
|
85
|
+
vue.renderList(__props.options, (item, index) => {
|
|
86
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
87
|
+
key: index,
|
|
88
|
+
class: "w-0 flex-1 flex items-center justify-center text-main clickBox",
|
|
89
|
+
onClick: ($event) => switchSelect(item)
|
|
90
|
+
}, [
|
|
91
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
|
92
|
+
item,
|
|
93
|
+
index
|
|
94
|
+
}, () => [
|
|
95
|
+
vue.createTextVNode(
|
|
96
|
+
vue.toDisplayString(item[radioProps.value.label]),
|
|
97
|
+
1
|
|
98
|
+
/* TEXT */
|
|
99
|
+
)
|
|
100
|
+
])
|
|
101
|
+
], 8, ["onClick"]);
|
|
102
|
+
}),
|
|
103
|
+
128
|
|
104
|
+
/* KEYED_FRAGMENT */
|
|
105
|
+
)),
|
|
106
|
+
selectIndex.value >= 0 ? (vue.openBlock(), vue.createElementBlock(
|
|
107
|
+
"li",
|
|
108
|
+
{
|
|
109
|
+
key: 0,
|
|
110
|
+
ref_key: "sliderRef",
|
|
111
|
+
ref: sliderRef,
|
|
112
|
+
class: "slider rounded box-border absolute h-full top-0 left-0 z-0 duration-500 border border-theme shadow-[0_0_6px_0] shadow-theme",
|
|
113
|
+
style: vue.normalizeStyle([{ width: `calc(100% / ${__props.options.length})` }, { "background": "linear-gradient(180deg, #2a4968 0%, #0ea0bb 100%)" }])
|
|
114
|
+
},
|
|
115
|
+
null,
|
|
116
|
+
4
|
|
117
|
+
/* STYLE */
|
|
118
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
119
|
+
],
|
|
120
|
+
2
|
|
121
|
+
/* CLASS */
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
exports.default = _sfc_main;
|
|
File without changes
|
|
@@ -60,6 +60,13 @@ const _sfc_main = {
|
|
|
60
60
|
form.setValueByProp(props.model, prop, val);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
+
const columnAttrs = vue.computed(() => {
|
|
64
|
+
return {
|
|
65
|
+
...props.column.attrs,
|
|
66
|
+
label: form.columnLabelHandler(props.column, props.model),
|
|
67
|
+
placeholder: form.columnPlaceholderHandler(props.column, props.model)
|
|
68
|
+
};
|
|
69
|
+
});
|
|
63
70
|
function onChangeHandler(value, column) {
|
|
64
71
|
emits("search");
|
|
65
72
|
}
|
|
@@ -100,14 +107,14 @@ const _sfc_main = {
|
|
|
100
107
|
"div",
|
|
101
108
|
{
|
|
102
109
|
class: vue.normalizeClass(["flex items-center text-auxiliary text-xs whitespace-nowrap", {
|
|
103
|
-
"border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || __props.column.
|
|
110
|
+
"border-r border-border px-3": __props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] || vue.unref(form.columnLabelHandler)(__props.column, props.model)
|
|
104
111
|
}])
|
|
105
112
|
},
|
|
106
113
|
[
|
|
107
114
|
__props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? vue.renderSlot(_ctx.$slots, __props.column.labelSlot, { column: __props.column }, void 0, void 0, 0) : (vue.openBlock(), vue.createElementBlock(
|
|
108
115
|
"span",
|
|
109
116
|
{ key: 1 },
|
|
110
|
-
vue.toDisplayString(__props.column.
|
|
117
|
+
vue.toDisplayString(vue.unref(form.columnLabelHandler)(__props.column, props.model)),
|
|
111
118
|
1
|
|
112
119
|
/* TEXT */
|
|
113
120
|
))
|
|
@@ -132,7 +139,7 @@ const _sfc_main = {
|
|
|
132
139
|
vue.createVNode(vue.unref(index$1.HyInput), vue.mergeProps({
|
|
133
140
|
modelValue: bindValue.value,
|
|
134
141
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
135
|
-
},
|
|
142
|
+
}, columnAttrs.value, {
|
|
136
143
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
137
144
|
onKeydown: vue.withKeys(($event) => onKeydownEnterHander($event, __props.column), ["enter"]),
|
|
138
145
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
@@ -148,7 +155,7 @@ const _sfc_main = {
|
|
|
148
155
|
vue.createVNode(vue.unref(elementPlus.ElSelect), vue.mergeProps({
|
|
149
156
|
modelValue: bindValue.value,
|
|
150
157
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
151
|
-
},
|
|
158
|
+
}, columnAttrs.value, {
|
|
152
159
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
153
160
|
options: vue.unref(index.optionsHandler)(props, __props.column),
|
|
154
161
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
@@ -166,7 +173,7 @@ const _sfc_main = {
|
|
|
166
173
|
"daterange",
|
|
167
174
|
"monthrange",
|
|
168
175
|
"yearrange"
|
|
169
|
-
].includes(
|
|
176
|
+
].includes(columnAttrs.value?.type) && vue.unref(is.isArray)(__props.column.field) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyDatePicker), vue.mergeProps({
|
|
170
177
|
key: 0,
|
|
171
178
|
start: bindValue.value,
|
|
172
179
|
"onUpdate:start": ($event) => bindValue.value = $event,
|
|
@@ -175,7 +182,7 @@ const _sfc_main = {
|
|
|
175
182
|
"is-range": true,
|
|
176
183
|
style: { "width": "100%" },
|
|
177
184
|
timeRangeFill: __props.column.timeRangeFill
|
|
178
|
-
},
|
|
185
|
+
}, columnAttrs.value, {
|
|
179
186
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
180
187
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
181
188
|
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "timeRangeFill", "disabled", "onChange"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$2.HyDatePicker), vue.mergeProps({
|
|
@@ -185,7 +192,7 @@ const _sfc_main = {
|
|
|
185
192
|
"is-range": false,
|
|
186
193
|
style: { "width": "100%" },
|
|
187
194
|
timeRangeFill: __props.column.timeRangeFill
|
|
188
|
-
},
|
|
195
|
+
}, columnAttrs.value, {
|
|
189
196
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
190
197
|
onChange: ($event) => onChangeHandler($event, __props.column)
|
|
191
198
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "timeRangeFill", "disabled", "onChange"]))
|
|
@@ -197,7 +204,7 @@ const _sfc_main = {
|
|
|
197
204
|
{ key: 4 },
|
|
198
205
|
[
|
|
199
206
|
vue.createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
|
|
200
|
-
|
|
207
|
+
columnAttrs.value.isRange ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyTimePicker), vue.mergeProps({
|
|
201
208
|
key: 0,
|
|
202
209
|
start: bindValue.value,
|
|
203
210
|
"onUpdate:start": ($event) => bindValue.value = $event,
|
|
@@ -205,7 +212,7 @@ const _sfc_main = {
|
|
|
205
212
|
"onUpdate:end": ($event) => bindValue2.value = $event,
|
|
206
213
|
"is-range": true,
|
|
207
214
|
style: { "width": "100%" }
|
|
208
|
-
},
|
|
215
|
+
}, columnAttrs.value, {
|
|
209
216
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
210
217
|
onChange: onChangeHandler
|
|
211
218
|
}), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyTimePicker), vue.mergeProps({
|
|
@@ -214,7 +221,7 @@ const _sfc_main = {
|
|
|
214
221
|
"onUpdate:modelValue": ($event) => bindValue.value = $event,
|
|
215
222
|
"is-range": false,
|
|
216
223
|
style: { "width": "100%" }
|
|
217
|
-
},
|
|
224
|
+
}, columnAttrs.value, {
|
|
218
225
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
219
226
|
onChange: onChangeHandler
|
|
220
227
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
|
|
@@ -229,7 +236,7 @@ const _sfc_main = {
|
|
|
229
236
|
vue.createVNode(vue.unref(index$4.HyOrgCascader), vue.mergeProps({
|
|
230
237
|
modelValue: bindValue.value,
|
|
231
238
|
"onUpdate:modelValue": ($event) => bindValue.value = $event
|
|
232
|
-
},
|
|
239
|
+
}, columnAttrs.value, {
|
|
233
240
|
disabled: vue.unref(index.isDisabled)(props, __props.column),
|
|
234
241
|
onChange: onChangeHandler
|
|
235
242
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
@@ -245,7 +252,7 @@ const _sfc_main = {
|
|
|
245
252
|
4
|
|
246
253
|
/* STYLE */
|
|
247
254
|
),
|
|
248
|
-
__props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(
|
|
255
|
+
__props.column.type === "date-picker" && ["daterange", "datetimerange"].includes(columnAttrs.value?.type) && __props.column.timeRangeOptions?.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
249
256
|
key: 0,
|
|
250
257
|
class: "flex text-main select-none"
|
|
251
258
|
}, [
|
|
@@ -6,34 +6,6 @@ var form = require('../../../utils/form.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
|
-
};
|
|
18
|
-
const genPlaceholderHandler = (config) => {
|
|
19
|
-
const { t } = useLocale.useLocale();
|
|
20
|
-
const { type, label, attrs = {} } = config || {};
|
|
21
|
-
let placeholder = attrs.placeholder, startPlaceholder = attrs.startPlaceholder, endPlaceholder = attrs.endPlaceholder;
|
|
22
|
-
switch (type) {
|
|
23
|
-
case "input":
|
|
24
|
-
placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
|
|
25
|
-
break;
|
|
26
|
-
case "select":
|
|
27
|
-
case "date-picker":
|
|
28
|
-
case "time-picker":
|
|
29
|
-
case "org-cascader":
|
|
30
|
-
placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
|
|
31
|
-
break;
|
|
32
|
-
default:
|
|
33
|
-
placeholder = placeholder || label;
|
|
34
|
-
}
|
|
35
|
-
return { placeholder, startPlaceholder, endPlaceholder };
|
|
36
|
-
};
|
|
37
9
|
const genColumnWidth = (config) => {
|
|
38
10
|
let { width, inputWidth, type, attrs } = config || {};
|
|
39
11
|
if (!width && !inputWidth) {
|
|
@@ -86,12 +58,10 @@ const timeRangeOptionsHandler = (config) => {
|
|
|
86
58
|
}, []);
|
|
87
59
|
};
|
|
88
60
|
function appSearchItemHandler(column = {}) {
|
|
89
|
-
const label =
|
|
90
|
-
const { placeholder} = genPlaceholderHandler({ ...column, label });
|
|
61
|
+
const label = form.genColumnDefaultLabel(column);
|
|
91
62
|
const attrs = {
|
|
92
63
|
clearable: true,
|
|
93
|
-
...column.attrs || {}
|
|
94
|
-
placeholder
|
|
64
|
+
...column.attrs || {}
|
|
95
65
|
};
|
|
96
66
|
const { width, inputWidth } = genColumnWidth(column);
|
|
97
67
|
column = handler.mergeDeep(
|
|
@@ -461,7 +461,15 @@ const _sfc_main = {
|
|
|
461
461
|
}, {
|
|
462
462
|
default: vue.withCtx(() => [
|
|
463
463
|
vue.createElementVNode("div", {
|
|
464
|
-
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent
|
|
464
|
+
class: vue.normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent rounded box-border", [
|
|
465
|
+
citem.className,
|
|
466
|
+
vue.unref(index.operatorDisabledHandler)(citem, {
|
|
467
|
+
column,
|
|
468
|
+
row,
|
|
469
|
+
$index,
|
|
470
|
+
cellIndex
|
|
471
|
+
}) ? "cursor-not-allowed text-[var(--hy-el-text-color-disabled)] hover:border-[rgba(var(--hy-auxiliary),1)] hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-auxiliary),0.5)]" : "cursor-pointer hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)]"
|
|
472
|
+
]]),
|
|
465
473
|
onClick: ($event) => vue.unref(index.operatorClickHandler)(
|
|
466
474
|
cindex,
|
|
467
475
|
column,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var elementPlus = require('element-plus');
|
|
5
|
-
var is = require('../../../utils/is.js');
|
|
6
|
-
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
5
|
var usePermissionMap = require('../../../hooks/usePermissionMap.js');
|
|
6
|
+
var useLocale = require('../../../hooks/useLocale.js');
|
|
7
|
+
var is = require('../../../utils/is.js');
|
|
8
8
|
|
|
9
9
|
function tableColumnShowHandler(column) {
|
|
10
10
|
if (column.permission && !is.isPermission(column.permission)) {
|
|
@@ -125,6 +125,7 @@ function operatorFilterHandler(column, scope, type = "all") {
|
|
|
125
125
|
function operatorClickHandler(command, column, scope, type = "all") {
|
|
126
126
|
const operator = operatorFilterHandler(column, scope, type);
|
|
127
127
|
const target = operator[command];
|
|
128
|
+
if (operatorDisabledHandler(target, scope)) return;
|
|
128
129
|
target?.handler && target.handler(scope);
|
|
129
130
|
}
|
|
130
131
|
function renderHeaderHandler(column, scope) {
|
|
@@ -396,7 +397,9 @@ const useAppTableWrapper = (hy) => {
|
|
|
396
397
|
// 搜索选中
|
|
397
398
|
isSearchFocus,
|
|
398
399
|
onSearchInputHandler,
|
|
399
|
-
onSearchBlurHandler
|
|
400
|
+
onSearchBlurHandler,
|
|
401
|
+
showAppTableLoading,
|
|
402
|
+
closeAppTableLoading
|
|
400
403
|
};
|
|
401
404
|
};
|
|
402
405
|
|