widget.qw 1.0.84 → 1.0.85
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/.env.development +2 -2
- package/build/style.css +70 -20
- package/build/widget.qw.es.js +114 -12
- package/build/widget.qw.umd.js +113 -11
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/api/index.js +8 -0
- package/src/components/CascaderPop.vue +5 -3
- package/src/components/HeadBar.vue +130 -0
- package/src/components/index.js +5 -0
- package/src/router/index.ts +5 -0
- package/src/views/cascaderpicker/index.vue +0 -0
- package/src/views/cascaderpicker/userpicker.vue +183 -0
- package/src/views/headbar/index.vue +28 -0
- package/src/views/home/index.vue +0 -0
package/.env.development
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
NODE_ENV ='development'
|
|
2
2
|
|
|
3
|
-
VITE_DOMAIN= 'http://
|
|
3
|
+
VITE_DOMAIN= 'http://10.192.1.208:88'
|
|
4
4
|
VITE_TOKEN_KEY='Authorization'
|
|
5
5
|
VITE_TOKEN_PREFIX='Bearer '
|
|
6
6
|
VITE_NEED_LOGIN_CODE=401
|
|
7
7
|
# 注意:发布时 VITE_IS_DEBUG必须配置为false
|
|
8
8
|
# 本地开发时 VITE_IS_DEBUG必须配置为true
|
|
9
9
|
VITE_IS_DEBUG=true
|
|
10
|
-
VITE_DEBUG_TOKEN= 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.
|
|
10
|
+
VITE_DEBUG_TOKEN= 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiIwMTQzOTEiLCJyblN0ciI6ImtNb1ZseW1xUGRzY3Rxa0lUU2Z2STlYQWdzZHB2ZGZjIn0.DdbQRJMD7NnuyOjlLPUxAXrkxkb7Bu-AOSeABWx38bE'
|
package/build/style.css
CHANGED
|
@@ -1,4 +1,53 @@
|
|
|
1
|
-
@charset "UTF-8"
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.enterprise-header[data-v-14acf94f] {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
height: 48px;
|
|
7
|
+
background-color: #2d8cf0; /* 企业微信风格蓝色 */
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
color: white;
|
|
10
|
+
color: #000;
|
|
11
|
+
position: relative;
|
|
12
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
13
|
+
margin-bottom: 4px;
|
|
14
|
+
}
|
|
15
|
+
.header-title[data-v-14acf94f] {
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
max-width: 70%;
|
|
22
|
+
}
|
|
23
|
+
.header-btn[data-v-14acf94f] {
|
|
24
|
+
position: absolute;
|
|
25
|
+
width: 48px;
|
|
26
|
+
height: 48px;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
background: transparent;
|
|
31
|
+
border: none;
|
|
32
|
+
color: white;
|
|
33
|
+
color: #000;
|
|
34
|
+
font-size: 20px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
padding: 0;
|
|
37
|
+
}
|
|
38
|
+
.header-btn[data-v-14acf94f]:disabled {
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
}
|
|
42
|
+
.back-btn[data-v-14acf94f] {
|
|
43
|
+
left: 0;
|
|
44
|
+
}
|
|
45
|
+
.home-btn[data-v-14acf94f] {
|
|
46
|
+
right: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
.widget[data-v-1e9a1a8a] {
|
|
2
51
|
text-align: center;
|
|
3
52
|
padding: 15px 15px;
|
|
4
53
|
}
|
|
@@ -694,25 +743,25 @@
|
|
|
694
743
|
margin:3px;
|
|
695
744
|
}
|
|
696
745
|
|
|
697
|
-
.cascader-pop[data-v-
|
|
746
|
+
.cascader-pop[data-v-026ce5e7] {
|
|
698
747
|
width: 100%;
|
|
699
748
|
overflow: hidden;
|
|
700
749
|
}
|
|
701
|
-
.cascader-selector[data-v-
|
|
750
|
+
.cascader-selector[data-v-026ce5e7] {
|
|
702
751
|
padding: 10px;
|
|
703
752
|
}
|
|
704
|
-
.search-buttons[data-v-
|
|
753
|
+
.search-buttons[data-v-026ce5e7] {
|
|
705
754
|
display: flex;
|
|
706
755
|
gap: 10px;
|
|
707
756
|
}
|
|
708
|
-
.clear-btn[data-v-
|
|
757
|
+
.clear-btn[data-v-026ce5e7] {
|
|
709
758
|
background-color: #f2f3f5;
|
|
710
759
|
border: none;
|
|
711
760
|
border-radius: 4px;
|
|
712
761
|
padding: 4px 8px;
|
|
713
762
|
font-size: 14px;
|
|
714
763
|
}
|
|
715
|
-
.confirm-btn[data-v-
|
|
764
|
+
.confirm-btn[data-v-026ce5e7] {
|
|
716
765
|
background-color: #1989fa;
|
|
717
766
|
color: white;
|
|
718
767
|
border: none;
|
|
@@ -720,45 +769,46 @@
|
|
|
720
769
|
padding: 4px 8px;
|
|
721
770
|
font-size: 14px;
|
|
722
771
|
}
|
|
723
|
-
.no-results[data-v-
|
|
772
|
+
.no-results[data-v-026ce5e7] {
|
|
724
773
|
text-align: center;
|
|
725
774
|
padding: 20px;
|
|
726
775
|
color: #969799;
|
|
727
776
|
}
|
|
728
|
-
.cascader-header[data-v-
|
|
777
|
+
.cascader-header[data-v-026ce5e7] {
|
|
729
778
|
padding: 10px;
|
|
730
779
|
border-bottom: 1px solid #ebedf0;
|
|
731
780
|
display: flex;
|
|
732
781
|
justify-content: space-between;
|
|
733
782
|
align-items: center;
|
|
734
783
|
}
|
|
735
|
-
.current-path[data-v-
|
|
784
|
+
.current-path[data-v-026ce5e7] {
|
|
736
785
|
flex: 1;
|
|
737
786
|
font-size: 14px;
|
|
787
|
+
margin-left:5px;
|
|
738
788
|
color: #323233;
|
|
739
789
|
white-space: nowrap;
|
|
740
790
|
overflow: hidden;
|
|
741
791
|
text-overflow: ellipsis;
|
|
742
792
|
}
|
|
743
|
-
.header-right[data-v-
|
|
793
|
+
.header-right[data-v-026ce5e7] {
|
|
744
794
|
display: flex;
|
|
745
795
|
gap: 8px;
|
|
746
796
|
margin-left: auto;
|
|
747
797
|
}
|
|
748
|
-
.cancel-btn[data-v-
|
|
798
|
+
.cancel-btn[data-v-026ce5e7] {
|
|
749
799
|
color: #969799;
|
|
750
800
|
margin-right: 5px;
|
|
751
801
|
}
|
|
752
|
-
.scroll-container[data-v-
|
|
802
|
+
.scroll-container[data-v-026ce5e7] {
|
|
753
803
|
height: calc(80vh - 150px);
|
|
754
804
|
overflow-y: auto;
|
|
755
805
|
}
|
|
756
|
-
.cell-content[data-v-
|
|
806
|
+
.cell-content[data-v-026ce5e7] {
|
|
757
807
|
display: flex;
|
|
758
808
|
align-items: center;
|
|
759
809
|
gap: 12px;
|
|
760
810
|
}
|
|
761
|
-
.circle-selector[data-v-
|
|
811
|
+
.circle-selector[data-v-026ce5e7] {
|
|
762
812
|
width: 20px;
|
|
763
813
|
height: 20px;
|
|
764
814
|
border-radius: 50%;
|
|
@@ -768,29 +818,29 @@
|
|
|
768
818
|
transition: all 0.2s;
|
|
769
819
|
flex-shrink: 0;
|
|
770
820
|
}
|
|
771
|
-
.circle-selector.selected[data-v-
|
|
821
|
+
.circle-selector.selected[data-v-026ce5e7] {
|
|
772
822
|
background-color: #1989fa;
|
|
773
823
|
border-color: #1989fa;
|
|
774
824
|
}
|
|
775
|
-
.circle-selector.selected .van-icon[data-v-
|
|
825
|
+
.circle-selector.selected .van-icon[data-v-026ce5e7] {
|
|
776
826
|
color: white;
|
|
777
827
|
font-size: 14px;
|
|
778
828
|
}
|
|
779
|
-
.van-cell__right-icon[data-v-
|
|
829
|
+
.van-cell__right-icon[data-v-026ce5e7] {
|
|
780
830
|
color: #969799;
|
|
781
831
|
font-size: 16px;
|
|
782
832
|
margin-left: 8px;
|
|
783
833
|
}
|
|
784
|
-
.name[data-v-
|
|
834
|
+
.name[data-v-026ce5e7] {
|
|
785
835
|
flex: 1;
|
|
786
836
|
overflow: hidden;
|
|
787
837
|
text-overflow: ellipsis;
|
|
788
838
|
white-space: nowrap;
|
|
789
839
|
}
|
|
790
|
-
.cancel-btn[data-v-
|
|
840
|
+
.cancel-btn[data-v-026ce5e7] {
|
|
791
841
|
color: #969799;
|
|
792
842
|
}
|
|
793
|
-
.search-field[data-v-
|
|
843
|
+
.search-field[data-v-026ce5e7] {
|
|
794
844
|
background: #fff;
|
|
795
845
|
padding: 10px 16px;
|
|
796
846
|
border-bottom: 1px solid #ebedf0;
|
package/build/widget.qw.es.js
CHANGED
|
@@ -38,8 +38,104 @@ var __async = (__this, __arguments, generator) => {
|
|
|
38
38
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
import { computed, onUnmounted, onDeactivated, isRef, watch, onMounted, nextTick, onActivated, unref, ref, reactive, getCurrentInstance, provide,
|
|
41
|
+
import { inject, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, toDisplayString, onUnmounted, onDeactivated, isRef, watch, onMounted, nextTick, onActivated, unref, ref, reactive, getCurrentInstance, provide, isVNode, defineComponent, onBeforeUnmount, watchEffect, mergeProps, Transition, Teleport, withDirectives, vShow, Fragment, createApp, resolveDirective, createBlock, createCommentVNode, withCtx, renderList, createTextVNode, createSlots, withModifiers, onBeforeUpdate, normalizeClass, renderSlot } from "vue";
|
|
42
42
|
var vm = {};
|
|
43
|
+
/*!
|
|
44
|
+
* vue-router v4.0.15
|
|
45
|
+
* (c) 2022 Eduardo San Martin Morote
|
|
46
|
+
* @license MIT
|
|
47
|
+
*/
|
|
48
|
+
const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
49
|
+
const PolySymbol = (name2) => hasSymbol ? Symbol(name2) : "_vr_" + name2;
|
|
50
|
+
const routerKey = /* @__PURE__ */ PolySymbol("r");
|
|
51
|
+
const routeLocationKey = /* @__PURE__ */ PolySymbol("rl");
|
|
52
|
+
var NavigationType;
|
|
53
|
+
(function(NavigationType2) {
|
|
54
|
+
NavigationType2["pop"] = "pop";
|
|
55
|
+
NavigationType2["push"] = "push";
|
|
56
|
+
})(NavigationType || (NavigationType = {}));
|
|
57
|
+
var NavigationDirection;
|
|
58
|
+
(function(NavigationDirection2) {
|
|
59
|
+
NavigationDirection2["back"] = "back";
|
|
60
|
+
NavigationDirection2["forward"] = "forward";
|
|
61
|
+
NavigationDirection2["unknown"] = "";
|
|
62
|
+
})(NavigationDirection || (NavigationDirection = {}));
|
|
63
|
+
var NavigationFailureType;
|
|
64
|
+
(function(NavigationFailureType2) {
|
|
65
|
+
NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
|
|
66
|
+
NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
|
|
67
|
+
NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
|
|
68
|
+
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
69
|
+
function useRouter() {
|
|
70
|
+
return inject(routerKey);
|
|
71
|
+
}
|
|
72
|
+
function useRoute() {
|
|
73
|
+
return inject(routeLocationKey);
|
|
74
|
+
}
|
|
75
|
+
var HeadBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.enterprise-header[data-v-14acf94f] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n background-color: #2d8cf0; /* \u4F01\u4E1A\u5FAE\u4FE1\u98CE\u683C\u84DD\u8272 */\r\n background-color: #fff;\r\n color: white;\r\n color: #000;\r\n position: relative;\r\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);\r\n margin-bottom: 4px;\n}\n.header-title[data-v-14acf94f] {\r\n font-size: 14px;\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 70%;\n}\n.header-btn[data-v-14acf94f] {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: transparent;\r\n border: none;\r\n color: white;\r\n color: #000;\r\n font-size: 20px;\r\n cursor: pointer;\r\n padding: 0;\n}\n.header-btn[data-v-14acf94f]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-14acf94f] {\r\n left: 0;\n}\n.home-btn[data-v-14acf94f] {\r\n right: 0;\n}\r\n \r\n \r\n ")();
|
|
76
|
+
var _export_sfc = (sfc, props) => {
|
|
77
|
+
const target = sfc.__vccOpts || sfc;
|
|
78
|
+
for (const [key, val] of props) {
|
|
79
|
+
target[key] = val;
|
|
80
|
+
}
|
|
81
|
+
return target;
|
|
82
|
+
};
|
|
83
|
+
const _hoisted_1$l = {
|
|
84
|
+
class: "enterprise-header"
|
|
85
|
+
};
|
|
86
|
+
const _hoisted_2$e = {
|
|
87
|
+
class: "header-title"
|
|
88
|
+
};
|
|
89
|
+
const _sfc_main$x = {
|
|
90
|
+
__name: "HeadBar",
|
|
91
|
+
props: {
|
|
92
|
+
title: {
|
|
93
|
+
type: String,
|
|
94
|
+
required: true,
|
|
95
|
+
default: "\u9875\u9762\u6807\u9898"
|
|
96
|
+
},
|
|
97
|
+
homePath: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: "/"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
setup(__props) {
|
|
103
|
+
const props = __props;
|
|
104
|
+
const router2 = useRouter();
|
|
105
|
+
const route = useRoute();
|
|
106
|
+
const canGoBack = computed(() => {
|
|
107
|
+
return window.history.length > 1;
|
|
108
|
+
});
|
|
109
|
+
const handleBack = () => {
|
|
110
|
+
console.log("back", router2, route);
|
|
111
|
+
if (canGoBack.value) {
|
|
112
|
+
router2.back();
|
|
113
|
+
} else {
|
|
114
|
+
router2.push(props.homePath);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const handleHome = () => {
|
|
118
|
+
if (route.path !== props.homePath) {
|
|
119
|
+
router2.push(props.homePath);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
const _component_van_icon = resolveComponent("van-icon");
|
|
124
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [createElementVNode("button", {
|
|
125
|
+
class: "header-btn back-btn",
|
|
126
|
+
onClick: handleBack
|
|
127
|
+
}, [createVNode(_component_van_icon, {
|
|
128
|
+
name: "arrow-left"
|
|
129
|
+
})]), createElementVNode("div", _hoisted_2$e, toDisplayString(__props.title), 1), createElementVNode("button", {
|
|
130
|
+
class: "header-btn home-btn",
|
|
131
|
+
onClick: handleHome
|
|
132
|
+
}, [createVNode(_component_van_icon, {
|
|
133
|
+
name: "wap-home-o"
|
|
134
|
+
})])]);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-14acf94f"]]);
|
|
43
139
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
44
140
|
function getAugmentedNamespace(n) {
|
|
45
141
|
if (n.__esModule)
|
|
@@ -3268,6 +3364,13 @@ const get_wxuser_by_id = (data2) => {
|
|
|
3268
3364
|
data: data2
|
|
3269
3365
|
});
|
|
3270
3366
|
};
|
|
3367
|
+
function auth_children(data2) {
|
|
3368
|
+
return service$3({
|
|
3369
|
+
url: vm.urlCallback() + "/qw-api/server-auth/auth/children",
|
|
3370
|
+
method: "POST",
|
|
3371
|
+
data: data2
|
|
3372
|
+
});
|
|
3373
|
+
}
|
|
3271
3374
|
const wx_user_list = (data2) => {
|
|
3272
3375
|
return request({
|
|
3273
3376
|
url: vm.urlCallback() + "/qw-api/server-auth/auth/wx_user_list",
|
|
@@ -3337,6 +3440,7 @@ var ApiUtil = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
3337
3440
|
get_subdepartments_users,
|
|
3338
3441
|
get_user_by_id,
|
|
3339
3442
|
get_wxuser_by_id,
|
|
3443
|
+
auth_children,
|
|
3340
3444
|
wx_user_list,
|
|
3341
3445
|
file_upload,
|
|
3342
3446
|
auth_get_user_info,
|
|
@@ -17127,13 +17231,6 @@ var lodash$1 = { exports: {} };
|
|
|
17127
17231
|
var lodash = lodash$1.exports;
|
|
17128
17232
|
var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-1e9a1a8a] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-1e9a1a8a] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-1e9a1a8a] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-1e9a1a8a] {\n width: 120px;\n}\n.apply-btn[data-v-1e9a1a8a] {\n width: 60vw;\n}\n.task-list[data-v-1e9a1a8a] {\n margin-top: 15px;\n}\n.task-title[data-v-1e9a1a8a] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-1e9a1a8a] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-1e9a1a8a] {\n padding: 25px 15px 0 15px;\n font-size: 16px;\n font-weight: bold;\n color: #666;\n text-align: left;\n}")();
|
|
17129
17233
|
var AuditBar_vue_vue_type_style_index_1_lang = /* @__PURE__ */ (() => "\n:root:root {\r\n --van-popover-action-width: 70vw;\n}\r\n")();
|
|
17130
|
-
var _export_sfc = (sfc, props) => {
|
|
17131
|
-
const target = sfc.__vccOpts || sfc;
|
|
17132
|
-
for (const [key, val] of props) {
|
|
17133
|
-
target[key] = val;
|
|
17134
|
-
}
|
|
17135
|
-
return target;
|
|
17136
|
-
};
|
|
17137
17234
|
const _hoisted_1$k = {
|
|
17138
17235
|
class: "widget"
|
|
17139
17236
|
};
|
|
@@ -21972,7 +22069,7 @@ const _sfc_main$4 = {
|
|
|
21972
22069
|
}
|
|
21973
22070
|
};
|
|
21974
22071
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6744b874"]]);
|
|
21975
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
22072
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-026ce5e7] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-026ce5e7] {\r\n padding: 10px;\n}\n.search-buttons[data-v-026ce5e7] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-026ce5e7] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-026ce5e7] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-026ce5e7] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-026ce5e7] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-026ce5e7] {\r\n flex: 1;\r\n font-size: 14px;\r\n margin-left:5px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-026ce5e7] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-026ce5e7] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-026ce5e7] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-026ce5e7] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-026ce5e7] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-026ce5e7] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-026ce5e7] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-026ce5e7] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-026ce5e7] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-026ce5e7] {\r\n color: #969799;\n}\n.search-field[data-v-026ce5e7] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
21976
22073
|
const _hoisted_1$3 = {
|
|
21977
22074
|
class: "cascader-selector"
|
|
21978
22075
|
};
|
|
@@ -22131,8 +22228,9 @@ const _sfc_main$3 = {
|
|
|
22131
22228
|
params.hasChildren = false;
|
|
22132
22229
|
params.hasPaths = true;
|
|
22133
22230
|
yield props.idQueryNode(params, (node) => {
|
|
22134
|
-
data2.parentNode =
|
|
22135
|
-
|
|
22231
|
+
data2.parentNode = node;
|
|
22232
|
+
let childNode = util.findNode(modelValue.value, data2.parentNode.children);
|
|
22233
|
+
emit("select", childNode);
|
|
22136
22234
|
});
|
|
22137
22235
|
} else {
|
|
22138
22236
|
let params = {};
|
|
@@ -22244,7 +22342,7 @@ const _sfc_main$3 = {
|
|
|
22244
22342
|
};
|
|
22245
22343
|
}
|
|
22246
22344
|
};
|
|
22247
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
22345
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-026ce5e7"]]);
|
|
22248
22346
|
const _hoisted_1$2 = {
|
|
22249
22347
|
style: {
|
|
22250
22348
|
"display": "flex",
|
|
@@ -22882,6 +22980,10 @@ const secret_notify = () => {
|
|
|
22882
22980
|
showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
|
|
22883
22981
|
};
|
|
22884
22982
|
const components = [
|
|
22983
|
+
{
|
|
22984
|
+
name: "WidgetQwHeadBar",
|
|
22985
|
+
widget: HeadBar
|
|
22986
|
+
},
|
|
22885
22987
|
{
|
|
22886
22988
|
name: "WidgetQwAuditBar",
|
|
22887
22989
|
widget: AuditBar
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -43,6 +43,102 @@ var __async = (__this, __arguments, generator) => {
|
|
|
43
43
|
})(this, function(exports, vue) {
|
|
44
44
|
"use strict";
|
|
45
45
|
var vm = {};
|
|
46
|
+
/*!
|
|
47
|
+
* vue-router v4.0.15
|
|
48
|
+
* (c) 2022 Eduardo San Martin Morote
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/
|
|
51
|
+
const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
52
|
+
const PolySymbol = (name2) => hasSymbol ? Symbol(name2) : "_vr_" + name2;
|
|
53
|
+
const routerKey = /* @__PURE__ */ PolySymbol("r");
|
|
54
|
+
const routeLocationKey = /* @__PURE__ */ PolySymbol("rl");
|
|
55
|
+
var NavigationType;
|
|
56
|
+
(function(NavigationType2) {
|
|
57
|
+
NavigationType2["pop"] = "pop";
|
|
58
|
+
NavigationType2["push"] = "push";
|
|
59
|
+
})(NavigationType || (NavigationType = {}));
|
|
60
|
+
var NavigationDirection;
|
|
61
|
+
(function(NavigationDirection2) {
|
|
62
|
+
NavigationDirection2["back"] = "back";
|
|
63
|
+
NavigationDirection2["forward"] = "forward";
|
|
64
|
+
NavigationDirection2["unknown"] = "";
|
|
65
|
+
})(NavigationDirection || (NavigationDirection = {}));
|
|
66
|
+
var NavigationFailureType;
|
|
67
|
+
(function(NavigationFailureType2) {
|
|
68
|
+
NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
|
|
69
|
+
NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
|
|
70
|
+
NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
|
|
71
|
+
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
72
|
+
function useRouter() {
|
|
73
|
+
return vue.inject(routerKey);
|
|
74
|
+
}
|
|
75
|
+
function useRoute() {
|
|
76
|
+
return vue.inject(routeLocationKey);
|
|
77
|
+
}
|
|
78
|
+
var HeadBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.enterprise-header[data-v-14acf94f] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n background-color: #2d8cf0; /* \u4F01\u4E1A\u5FAE\u4FE1\u98CE\u683C\u84DD\u8272 */\r\n background-color: #fff;\r\n color: white;\r\n color: #000;\r\n position: relative;\r\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);\r\n margin-bottom: 4px;\n}\n.header-title[data-v-14acf94f] {\r\n font-size: 14px;\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 70%;\n}\n.header-btn[data-v-14acf94f] {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: transparent;\r\n border: none;\r\n color: white;\r\n color: #000;\r\n font-size: 20px;\r\n cursor: pointer;\r\n padding: 0;\n}\n.header-btn[data-v-14acf94f]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-14acf94f] {\r\n left: 0;\n}\n.home-btn[data-v-14acf94f] {\r\n right: 0;\n}\r\n \r\n \r\n ")();
|
|
79
|
+
var _export_sfc = (sfc, props) => {
|
|
80
|
+
const target = sfc.__vccOpts || sfc;
|
|
81
|
+
for (const [key, val] of props) {
|
|
82
|
+
target[key] = val;
|
|
83
|
+
}
|
|
84
|
+
return target;
|
|
85
|
+
};
|
|
86
|
+
const _hoisted_1$l = {
|
|
87
|
+
class: "enterprise-header"
|
|
88
|
+
};
|
|
89
|
+
const _hoisted_2$e = {
|
|
90
|
+
class: "header-title"
|
|
91
|
+
};
|
|
92
|
+
const _sfc_main$x = {
|
|
93
|
+
__name: "HeadBar",
|
|
94
|
+
props: {
|
|
95
|
+
title: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: true,
|
|
98
|
+
default: "\u9875\u9762\u6807\u9898"
|
|
99
|
+
},
|
|
100
|
+
homePath: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: "/"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
setup(__props) {
|
|
106
|
+
const props = __props;
|
|
107
|
+
const router2 = useRouter();
|
|
108
|
+
const route = useRoute();
|
|
109
|
+
const canGoBack = vue.computed(() => {
|
|
110
|
+
return window.history.length > 1;
|
|
111
|
+
});
|
|
112
|
+
const handleBack = () => {
|
|
113
|
+
console.log("back", router2, route);
|
|
114
|
+
if (canGoBack.value) {
|
|
115
|
+
router2.back();
|
|
116
|
+
} else {
|
|
117
|
+
router2.push(props.homePath);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const handleHome = () => {
|
|
121
|
+
if (route.path !== props.homePath) {
|
|
122
|
+
router2.push(props.homePath);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return (_ctx, _cache) => {
|
|
126
|
+
const _component_van_icon = vue.resolveComponent("van-icon");
|
|
127
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [vue.createElementVNode("button", {
|
|
128
|
+
class: "header-btn back-btn",
|
|
129
|
+
onClick: handleBack
|
|
130
|
+
}, [vue.createVNode(_component_van_icon, {
|
|
131
|
+
name: "arrow-left"
|
|
132
|
+
})]), vue.createElementVNode("div", _hoisted_2$e, vue.toDisplayString(__props.title), 1), vue.createElementVNode("button", {
|
|
133
|
+
class: "header-btn home-btn",
|
|
134
|
+
onClick: handleHome
|
|
135
|
+
}, [vue.createVNode(_component_van_icon, {
|
|
136
|
+
name: "wap-home-o"
|
|
137
|
+
})])]);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-14acf94f"]]);
|
|
46
142
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
47
143
|
function getAugmentedNamespace(n) {
|
|
48
144
|
if (n.__esModule)
|
|
@@ -3271,6 +3367,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3271
3367
|
data: data2
|
|
3272
3368
|
});
|
|
3273
3369
|
};
|
|
3370
|
+
function auth_children(data2) {
|
|
3371
|
+
return service$3({
|
|
3372
|
+
url: vm.urlCallback() + "/qw-api/server-auth/auth/children",
|
|
3373
|
+
method: "POST",
|
|
3374
|
+
data: data2
|
|
3375
|
+
});
|
|
3376
|
+
}
|
|
3274
3377
|
const wx_user_list = (data2) => {
|
|
3275
3378
|
return request({
|
|
3276
3379
|
url: vm.urlCallback() + "/qw-api/server-auth/auth/wx_user_list",
|
|
@@ -3340,6 +3443,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3340
3443
|
get_subdepartments_users,
|
|
3341
3444
|
get_user_by_id,
|
|
3342
3445
|
get_wxuser_by_id,
|
|
3446
|
+
auth_children,
|
|
3343
3447
|
wx_user_list,
|
|
3344
3448
|
file_upload,
|
|
3345
3449
|
auth_get_user_info,
|
|
@@ -17130,13 +17234,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17130
17234
|
var lodash = lodash$1.exports;
|
|
17131
17235
|
var AuditBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".widget[data-v-1e9a1a8a] {\n text-align: center;\n padding: 15px 15px;\n}\n.memo[data-v-1e9a1a8a] {\n margin-bottom: 15px;\n}\n.refuse-btn[data-v-1e9a1a8a] {\n width: 120px;\n margin-right: 15px;\n}\n.pass-btn[data-v-1e9a1a8a] {\n width: 120px;\n}\n.apply-btn[data-v-1e9a1a8a] {\n width: 60vw;\n}\n.task-list[data-v-1e9a1a8a] {\n margin-top: 15px;\n}\n.task-title[data-v-1e9a1a8a] {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n text-align: left;\n}\n.task-user[data-v-1e9a1a8a] {\n font-size: 13px;\n color: #666;\n text-align: left;\n margin-top: 5px;\n}\n.audit-title[data-v-1e9a1a8a] {\n padding: 25px 15px 0 15px;\n font-size: 16px;\n font-weight: bold;\n color: #666;\n text-align: left;\n}")();
|
|
17132
17236
|
var AuditBar_vue_vue_type_style_index_1_lang = /* @__PURE__ */ (() => "\n:root:root {\r\n --van-popover-action-width: 70vw;\n}\r\n")();
|
|
17133
|
-
var _export_sfc = (sfc, props) => {
|
|
17134
|
-
const target = sfc.__vccOpts || sfc;
|
|
17135
|
-
for (const [key, val] of props) {
|
|
17136
|
-
target[key] = val;
|
|
17137
|
-
}
|
|
17138
|
-
return target;
|
|
17139
|
-
};
|
|
17140
17237
|
const _hoisted_1$k = {
|
|
17141
17238
|
class: "widget"
|
|
17142
17239
|
};
|
|
@@ -21975,7 +22072,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21975
22072
|
}
|
|
21976
22073
|
};
|
|
21977
22074
|
var TreePicker = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6744b874"]]);
|
|
21978
|
-
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-
|
|
22075
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-026ce5e7] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-026ce5e7] {\r\n padding: 10px;\n}\n.search-buttons[data-v-026ce5e7] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-026ce5e7] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-026ce5e7] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-026ce5e7] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-026ce5e7] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-026ce5e7] {\r\n flex: 1;\r\n font-size: 14px;\r\n margin-left:5px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-026ce5e7] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-026ce5e7] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-026ce5e7] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-026ce5e7] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-026ce5e7] {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s;\r\n flex-shrink: 0;\n}\n.circle-selector.selected[data-v-026ce5e7] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-026ce5e7] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-026ce5e7] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-026ce5e7] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-026ce5e7] {\r\n color: #969799;\n}\n.search-field[data-v-026ce5e7] {\r\n background: #fff;\r\n padding: 10px 16px;\r\n border-bottom: 1px solid #ebedf0;\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n margin-bottom: 10px;\r\n flex-shrink: 0;\r\n /* \u9632\u6B62\u538B\u7F29 */\n}\r\n")();
|
|
21979
22076
|
const _hoisted_1$3 = {
|
|
21980
22077
|
class: "cascader-selector"
|
|
21981
22078
|
};
|
|
@@ -22134,8 +22231,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22134
22231
|
params.hasChildren = false;
|
|
22135
22232
|
params.hasPaths = true;
|
|
22136
22233
|
yield props.idQueryNode(params, (node) => {
|
|
22137
|
-
data2.parentNode =
|
|
22138
|
-
|
|
22234
|
+
data2.parentNode = node;
|
|
22235
|
+
let childNode = util.findNode(modelValue.value, data2.parentNode.children);
|
|
22236
|
+
emit("select", childNode);
|
|
22139
22237
|
});
|
|
22140
22238
|
} else {
|
|
22141
22239
|
let params = {};
|
|
@@ -22247,7 +22345,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22247
22345
|
};
|
|
22248
22346
|
}
|
|
22249
22347
|
};
|
|
22250
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
22348
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-026ce5e7"]]);
|
|
22251
22349
|
const _hoisted_1$2 = {
|
|
22252
22350
|
style: {
|
|
22253
22351
|
"display": "flex",
|
|
@@ -22885,6 +22983,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22885
22983
|
showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
|
|
22886
22984
|
};
|
|
22887
22985
|
const components = [
|
|
22986
|
+
{
|
|
22987
|
+
name: "WidgetQwHeadBar",
|
|
22988
|
+
widget: HeadBar
|
|
22989
|
+
},
|
|
22888
22990
|
{
|
|
22889
22991
|
name: "WidgetQwAuditBar",
|
|
22890
22992
|
widget: AuditBar
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
package/src/api/index.js
CHANGED
|
@@ -100,6 +100,14 @@ export const get_wxuser_by_id = (data) => {
|
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
export function auth_children(data) {
|
|
104
|
+
return request_json({
|
|
105
|
+
url: vm.urlCallback() + "/qw-api/server-auth/auth/children",
|
|
106
|
+
method: "POST",
|
|
107
|
+
data: data,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
103
111
|
// 关键字查询用户列表
|
|
104
112
|
export const wx_user_list = (data) => {
|
|
105
113
|
return request({
|
|
@@ -193,7 +193,7 @@ const query = async () => {
|
|
|
193
193
|
let childNode = util.findNode(modelValue.value, data.parentNode.children)
|
|
194
194
|
emit('select', childNode)
|
|
195
195
|
})
|
|
196
|
-
}
|
|
196
|
+
}
|
|
197
197
|
//选中节点时
|
|
198
198
|
else {
|
|
199
199
|
//未显示底部弹窗时,只查节点本身
|
|
@@ -205,8 +205,9 @@ const query = async () => {
|
|
|
205
205
|
params.hasPaths = true
|
|
206
206
|
|
|
207
207
|
await props.idQueryNode(params, (node) => {
|
|
208
|
-
data.parentNode =
|
|
209
|
-
|
|
208
|
+
data.parentNode = node
|
|
209
|
+
let childNode = util.findNode(modelValue.value, data.parentNode.children)
|
|
210
|
+
emit('select', childNode)
|
|
210
211
|
})
|
|
211
212
|
}
|
|
212
213
|
//显示底部弹窗时,查询带子节点的父节点
|
|
@@ -293,6 +294,7 @@ watch(() => modelValue.value, async (n, o) => {
|
|
|
293
294
|
.current-path {
|
|
294
295
|
flex: 1;
|
|
295
296
|
font-size: 14px;
|
|
297
|
+
margin-left:5px;
|
|
296
298
|
color: #323233;
|
|
297
299
|
white-space: nowrap;
|
|
298
300
|
overflow: hidden;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="enterprise-header">
|
|
3
|
+
<!-- 返回按钮 -->
|
|
4
|
+
<button
|
|
5
|
+
class="header-btn back-btn"
|
|
6
|
+
@click="handleBack"
|
|
7
|
+
>
|
|
8
|
+
<van-icon name="arrow-left" />
|
|
9
|
+
</button>
|
|
10
|
+
|
|
11
|
+
<!-- 标题区域 -->
|
|
12
|
+
<div class="header-title">
|
|
13
|
+
{{ title }}
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<!-- 首页按钮 -->
|
|
17
|
+
<button
|
|
18
|
+
class="header-btn home-btn"
|
|
19
|
+
@click="handleHome"
|
|
20
|
+
>
|
|
21
|
+
<van-icon name="wap-home-o" />
|
|
22
|
+
</button>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
import { useRouter, useRoute } from 'vue-router'
|
|
28
|
+
import { defineProps, computed } from 'vue'
|
|
29
|
+
|
|
30
|
+
// 定义组件属性
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
// 页面标题
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
default: '页面标题'
|
|
37
|
+
},
|
|
38
|
+
// 首页路由路径,默认为根路径
|
|
39
|
+
homePath: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '/'
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
// 路由相关
|
|
46
|
+
const router = useRouter()
|
|
47
|
+
const route = useRoute()
|
|
48
|
+
|
|
49
|
+
// 判断是否可以返回
|
|
50
|
+
const canGoBack = computed(() => {
|
|
51
|
+
// 可以根据实际路由历史判断,这里简单处理
|
|
52
|
+
return window.history.length>1
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// 处理返回逻辑
|
|
56
|
+
const handleBack = () => {
|
|
57
|
+
console.log('back',router,route)
|
|
58
|
+
if (canGoBack.value) {
|
|
59
|
+
router.back()
|
|
60
|
+
} else {
|
|
61
|
+
// 如果不能返回,则跳转到首页
|
|
62
|
+
router.push(props.homePath)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 处理返回首页逻辑
|
|
67
|
+
const handleHome = () => {
|
|
68
|
+
// 如果已经在首页,则不执行跳转
|
|
69
|
+
if (route.path !== props.homePath) {
|
|
70
|
+
router.push(props.homePath)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style scoped>
|
|
76
|
+
.enterprise-header {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
height: 48px;
|
|
81
|
+
background-color: #2d8cf0; /* 企业微信风格蓝色 */
|
|
82
|
+
background-color: #fff;
|
|
83
|
+
color: white;
|
|
84
|
+
color: #000;
|
|
85
|
+
position: relative;
|
|
86
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
87
|
+
margin-bottom: 4px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.header-title {
|
|
91
|
+
font-size: 14px;
|
|
92
|
+
font-weight: 500;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
text-overflow: ellipsis;
|
|
96
|
+
max-width: 70%;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.header-btn {
|
|
100
|
+
position: absolute;
|
|
101
|
+
width: 48px;
|
|
102
|
+
height: 48px;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
background: transparent;
|
|
107
|
+
border: none;
|
|
108
|
+
color: white;
|
|
109
|
+
color: #000;
|
|
110
|
+
font-size: 20px;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
padding: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.header-btn:disabled {
|
|
116
|
+
opacity: 0.5;
|
|
117
|
+
cursor: not-allowed;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.back-btn {
|
|
121
|
+
left: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.home-btn {
|
|
125
|
+
right: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
</style>
|
|
130
|
+
|
package/src/components/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// 引入封装好的组件
|
|
2
2
|
import vm from "../vm";
|
|
3
|
+
import HeadBar from "./HeadBar.vue";
|
|
3
4
|
import AuditBar from "./AuditBar.vue";
|
|
4
5
|
import Input from "./Input.vue";
|
|
5
6
|
import SinglePicker from "./SinglePicker.vue";
|
|
@@ -31,6 +32,10 @@ import SingleApiPicker from "./SingleApiPicker.vue";
|
|
|
31
32
|
import ObjsEditor from './ObjsEditor.vue'
|
|
32
33
|
|
|
33
34
|
const components = [
|
|
35
|
+
{
|
|
36
|
+
name: "WidgetQwHeadBar",
|
|
37
|
+
widget: HeadBar,
|
|
38
|
+
},
|
|
34
39
|
{
|
|
35
40
|
name: "WidgetQwAuditBar",
|
|
36
41
|
widget: AuditBar,
|
package/src/router/index.ts
CHANGED
|
@@ -9,6 +9,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
9
9
|
path: "/home",
|
|
10
10
|
name: "Home",
|
|
11
11
|
component: () => import("../views/home/index.vue"),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
path: "/headbar",
|
|
15
|
+
name: "Headbar",
|
|
16
|
+
component: () => import("../views/headbar/index.vue"),
|
|
12
17
|
},
|
|
13
18
|
{
|
|
14
19
|
path: "/auditbar",
|
|
Binary file
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="widget">
|
|
3
|
+
<widget-qw-cascader-picker :multiple="props.multiple" v-model="modelValue" :label="props.label"
|
|
4
|
+
:placeholder="props.placeholder" :keywordQueryNode="keywordQueryNode" :idQueryNode="idQueryNode"
|
|
5
|
+
@select="onSelect" :auth="props.auth" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
import { onMounted, reactive, defineProps, watch } from "vue";
|
|
11
|
+
import util from '@/util'
|
|
12
|
+
import { useVModel } from "@vueuse/core";
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ''
|
|
18
|
+
},
|
|
19
|
+
multiple: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
rootId: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: '1'
|
|
26
|
+
},
|
|
27
|
+
label: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ''
|
|
30
|
+
},
|
|
31
|
+
placeholder: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '请选择员工'
|
|
34
|
+
},
|
|
35
|
+
auth: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'require'
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const data = reactive({
|
|
42
|
+
isShow: false,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const emit = defineEmits(['update:modelValue', 'select'])
|
|
46
|
+
const modelValue = useVModel(props, 'modelValue', emit)
|
|
47
|
+
|
|
48
|
+
const keywordQueryNode = async (params, setNode) => {
|
|
49
|
+
let p = {
|
|
50
|
+
id: params.id,
|
|
51
|
+
hasUsers: true,
|
|
52
|
+
hasChildren: true
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (params.parentId)
|
|
56
|
+
p.parentid = params.parentId
|
|
57
|
+
|
|
58
|
+
if (params.keyword)
|
|
59
|
+
p.keyword = params.keyword
|
|
60
|
+
|
|
61
|
+
//无选中节点时,默认查根节点
|
|
62
|
+
if (!p.id) {
|
|
63
|
+
if (props.rootId) {
|
|
64
|
+
p.id = props.rootId
|
|
65
|
+
p.isReturnParent = false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
let res = await util.auth_children(p)
|
|
70
|
+
if (res.code != 200)
|
|
71
|
+
return
|
|
72
|
+
|
|
73
|
+
let fn = formatNode(res.data)
|
|
74
|
+
setNode(fn)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const idQueryNode = async (params, setNode) => {
|
|
78
|
+
// if (params.hasChildren) {
|
|
79
|
+
let p = {
|
|
80
|
+
id: params.id,
|
|
81
|
+
hasChildren: params.hasChildren,
|
|
82
|
+
hasPaths: true,
|
|
83
|
+
hasUsers: true,
|
|
84
|
+
isReturnParent: params.isReturnParent
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//无选中节点时,默认查根节点
|
|
88
|
+
if (!p.id) {
|
|
89
|
+
if (props.rootId) {
|
|
90
|
+
p.id = props.rootId
|
|
91
|
+
p.isReturnParent = false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
let res = await util.auth_children(p)
|
|
96
|
+
if (res.code != 200)
|
|
97
|
+
return
|
|
98
|
+
|
|
99
|
+
let fn = formatNode(res.data)
|
|
100
|
+
|
|
101
|
+
// let selectNode = fn
|
|
102
|
+
// if(params.id != selectNode.id){
|
|
103
|
+
// selectNode = selectNode.children.find(item=>{
|
|
104
|
+
// return item.id == params.id
|
|
105
|
+
// })
|
|
106
|
+
// }
|
|
107
|
+
|
|
108
|
+
setNode(fn)
|
|
109
|
+
// }
|
|
110
|
+
// else {
|
|
111
|
+
// console.log('11111111111',params)
|
|
112
|
+
|
|
113
|
+
// let res = await util.get_wxuser_by_id({ userId: params.id })
|
|
114
|
+
// if (res.code != 200)
|
|
115
|
+
// return
|
|
116
|
+
|
|
117
|
+
// let fn = formatNode(res.data)
|
|
118
|
+
// setNode(fn)
|
|
119
|
+
// }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const formatNode = (node) => {
|
|
123
|
+
let res = {}
|
|
124
|
+
//部门
|
|
125
|
+
if (!node.userid) {
|
|
126
|
+
let children = []
|
|
127
|
+
if (node.children && node.children.length > 0)
|
|
128
|
+
children = node.children
|
|
129
|
+
if (node.users && node.users.length > 0)
|
|
130
|
+
children = [...children, ...node.users]
|
|
131
|
+
|
|
132
|
+
res = {
|
|
133
|
+
id: node.id,
|
|
134
|
+
parentId: node.parentid,
|
|
135
|
+
paths: formatNodes(node.paths),
|
|
136
|
+
path: node.path,
|
|
137
|
+
children: formatNodes(children),
|
|
138
|
+
label: node.name,
|
|
139
|
+
hasChildren: node.hasChildren,
|
|
140
|
+
level: node.level,
|
|
141
|
+
data: node,
|
|
142
|
+
canCheck: false,
|
|
143
|
+
canExpand: node.hasChildren || (node.users && node.users.length > 0)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//员工
|
|
147
|
+
else {
|
|
148
|
+
res = {
|
|
149
|
+
id: node.userid,
|
|
150
|
+
parentId: node.mainDepartment,
|
|
151
|
+
paths: [],
|
|
152
|
+
path: `${node.name}/${node.position}`,
|
|
153
|
+
children: [],
|
|
154
|
+
label: `${node.name}/${node.position}`,
|
|
155
|
+
hasChildren: false,
|
|
156
|
+
level: 1,
|
|
157
|
+
data: node,
|
|
158
|
+
canCheck: true,
|
|
159
|
+
canExpand: false
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return res
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const formatNodes = (nodes) => {
|
|
167
|
+
if (!nodes || nodes.length < 1)
|
|
168
|
+
return []
|
|
169
|
+
|
|
170
|
+
let res = nodes.map(item => {
|
|
171
|
+
return formatNode(item)
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
return res
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const onSelect = (node) => {
|
|
178
|
+
console.log('onSelect', node)
|
|
179
|
+
emit('select', node)
|
|
180
|
+
}
|
|
181
|
+
</script>
|
|
182
|
+
|
|
183
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<widget-qw-head-bar title="页面1" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import QueryString from "qs";
|
|
9
|
+
import { ref, onMounted, reactive, watch } from "vue";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<style lang="scss" scoped>
|
|
17
|
+
.page {
|
|
18
|
+
height: 100vh;
|
|
19
|
+
background: #fff;
|
|
20
|
+
text-align: center;
|
|
21
|
+
background-size: cover;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
justify-content: flex-start;
|
|
25
|
+
padding: 80px 15px 0 15px;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
package/src/views/home/index.vue
CHANGED
|
Binary file
|