widget.qw 1.0.84 → 1.0.86
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 +116 -13
- package/build/widget.qw.umd.js +115 -12
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/api/index.js +8 -0
- package/src/components/CascaderPop.vue +6 -4
- package/src/components/HeadBar.vue +131 -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-d3934054] {
|
|
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-d3934054] {
|
|
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-d3934054] {
|
|
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-d3934054]:disabled {
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
}
|
|
42
|
+
.back-btn[data-v-d3934054] {
|
|
43
|
+
left: 0;
|
|
44
|
+
}
|
|
45
|
+
.home-btn[data-v-d3934054] {
|
|
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-498f9f58] {
|
|
698
747
|
width: 100%;
|
|
699
748
|
overflow: hidden;
|
|
700
749
|
}
|
|
701
|
-
.cascader-selector[data-v-
|
|
750
|
+
.cascader-selector[data-v-498f9f58] {
|
|
702
751
|
padding: 10px;
|
|
703
752
|
}
|
|
704
|
-
.search-buttons[data-v-
|
|
753
|
+
.search-buttons[data-v-498f9f58] {
|
|
705
754
|
display: flex;
|
|
706
755
|
gap: 10px;
|
|
707
756
|
}
|
|
708
|
-
.clear-btn[data-v-
|
|
757
|
+
.clear-btn[data-v-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
749
799
|
color: #969799;
|
|
750
800
|
margin-right: 5px;
|
|
751
801
|
}
|
|
752
|
-
.scroll-container[data-v-
|
|
802
|
+
.scroll-container[data-v-498f9f58] {
|
|
753
803
|
height: calc(80vh - 150px);
|
|
754
804
|
overflow-y: auto;
|
|
755
805
|
}
|
|
756
|
-
.cell-content[data-v-
|
|
806
|
+
.cell-content[data-v-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
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-498f9f58] {
|
|
780
830
|
color: #969799;
|
|
781
831
|
font-size: 16px;
|
|
782
832
|
margin-left: 8px;
|
|
783
833
|
}
|
|
784
|
-
.name[data-v-
|
|
834
|
+
.name[data-v-498f9f58] {
|
|
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-498f9f58] {
|
|
791
841
|
color: #969799;
|
|
792
842
|
}
|
|
793
|
-
.search-field[data-v-
|
|
843
|
+
.search-field[data-v-498f9f58] {
|
|
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,105 @@ 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,
|
|
41
|
+
import { inject, computed, resolveComponent, openBlock, createElementBlock, unref, createVNode, createCommentVNode, createElementVNode, toDisplayString, onUnmounted, onDeactivated, isRef, watch, onMounted, nextTick, onActivated, ref, reactive, getCurrentInstance, provide, isVNode, defineComponent, onBeforeUnmount, watchEffect, mergeProps, Transition, Teleport, withDirectives, vShow, Fragment, createApp, resolveDirective, createBlock, 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-d3934054] {\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-d3934054] {\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-d3934054] {\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-d3934054]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-d3934054] {\r\n left: 0;\n}\n.home-btn[data-v-d3934054] {\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, [unref(canGoBack) ? (openBlock(), createElementBlock("button", {
|
|
125
|
+
key: 0,
|
|
126
|
+
class: "header-btn back-btn",
|
|
127
|
+
onClick: handleBack
|
|
128
|
+
}, [createVNode(_component_van_icon, {
|
|
129
|
+
name: "arrow-left"
|
|
130
|
+
})])) : createCommentVNode("", true), createElementVNode("div", _hoisted_2$e, toDisplayString(__props.title), 1), createElementVNode("button", {
|
|
131
|
+
class: "header-btn home-btn",
|
|
132
|
+
onClick: handleHome
|
|
133
|
+
}, [createVNode(_component_van_icon, {
|
|
134
|
+
name: "wap-home-o"
|
|
135
|
+
})])]);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-d3934054"]]);
|
|
43
140
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
44
141
|
function getAugmentedNamespace(n) {
|
|
45
142
|
if (n.__esModule)
|
|
@@ -3268,6 +3365,13 @@ const get_wxuser_by_id = (data2) => {
|
|
|
3268
3365
|
data: data2
|
|
3269
3366
|
});
|
|
3270
3367
|
};
|
|
3368
|
+
function auth_children(data2) {
|
|
3369
|
+
return service$3({
|
|
3370
|
+
url: vm.urlCallback() + "/qw-api/server-auth/auth/children",
|
|
3371
|
+
method: "POST",
|
|
3372
|
+
data: data2
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3271
3375
|
const wx_user_list = (data2) => {
|
|
3272
3376
|
return request({
|
|
3273
3377
|
url: vm.urlCallback() + "/qw-api/server-auth/auth/wx_user_list",
|
|
@@ -3337,6 +3441,7 @@ var ApiUtil = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
3337
3441
|
get_subdepartments_users,
|
|
3338
3442
|
get_user_by_id,
|
|
3339
3443
|
get_wxuser_by_id,
|
|
3444
|
+
auth_children,
|
|
3340
3445
|
wx_user_list,
|
|
3341
3446
|
file_upload,
|
|
3342
3447
|
auth_get_user_info,
|
|
@@ -17127,13 +17232,6 @@ var lodash$1 = { exports: {} };
|
|
|
17127
17232
|
var lodash = lodash$1.exports;
|
|
17128
17233
|
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
17234
|
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
17235
|
const _hoisted_1$k = {
|
|
17138
17236
|
class: "widget"
|
|
17139
17237
|
};
|
|
@@ -21972,7 +22070,7 @@ const _sfc_main$4 = {
|
|
|
21972
22070
|
}
|
|
21973
22071
|
};
|
|
21974
22072
|
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-
|
|
22073
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-498f9f58] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-498f9f58] {\r\n padding: 10px;\n}\n.search-buttons[data-v-498f9f58] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-498f9f58] {\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-498f9f58] {\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-498f9f58] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-498f9f58] {\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-498f9f58] {\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-498f9f58] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-498f9f58] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-498f9f58] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-498f9f58] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-498f9f58] {\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-498f9f58] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-498f9f58] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-498f9f58] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-498f9f58] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-498f9f58] {\r\n color: #969799;\n}\n.search-field[data-v-498f9f58] {\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
22074
|
const _hoisted_1$3 = {
|
|
21977
22075
|
class: "cascader-selector"
|
|
21978
22076
|
};
|
|
@@ -22127,12 +22225,13 @@ const _sfc_main$3 = {
|
|
|
22127
22225
|
if (!props.show) {
|
|
22128
22226
|
let params = {};
|
|
22129
22227
|
params.id = modelValue.value;
|
|
22130
|
-
params.isReturnParent =
|
|
22228
|
+
params.isReturnParent = true;
|
|
22131
22229
|
params.hasChildren = false;
|
|
22132
22230
|
params.hasPaths = true;
|
|
22133
22231
|
yield props.idQueryNode(params, (node) => {
|
|
22134
|
-
data2.parentNode =
|
|
22135
|
-
|
|
22232
|
+
data2.parentNode = node;
|
|
22233
|
+
let childNode = util.findNode(modelValue.value, data2.parentNode.children);
|
|
22234
|
+
emit("select", childNode);
|
|
22136
22235
|
});
|
|
22137
22236
|
} else {
|
|
22138
22237
|
let params = {};
|
|
@@ -22244,7 +22343,7 @@ const _sfc_main$3 = {
|
|
|
22244
22343
|
};
|
|
22245
22344
|
}
|
|
22246
22345
|
};
|
|
22247
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
22346
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-498f9f58"]]);
|
|
22248
22347
|
const _hoisted_1$2 = {
|
|
22249
22348
|
style: {
|
|
22250
22349
|
"display": "flex",
|
|
@@ -22882,6 +22981,10 @@ const secret_notify = () => {
|
|
|
22882
22981
|
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
22982
|
};
|
|
22884
22983
|
const components = [
|
|
22984
|
+
{
|
|
22985
|
+
name: "WidgetQwHeadBar",
|
|
22986
|
+
widget: HeadBar
|
|
22987
|
+
},
|
|
22885
22988
|
{
|
|
22886
22989
|
name: "WidgetQwAuditBar",
|
|
22887
22990
|
widget: AuditBar
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -43,6 +43,103 @@ 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-d3934054] {\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-d3934054] {\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-d3934054] {\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-d3934054]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-d3934054] {\r\n left: 0;\n}\n.home-btn[data-v-d3934054] {\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.unref(canGoBack) ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: "header-btn back-btn",
|
|
130
|
+
onClick: handleBack
|
|
131
|
+
}, [vue.createVNode(_component_van_icon, {
|
|
132
|
+
name: "arrow-left"
|
|
133
|
+
})])) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_2$e, vue.toDisplayString(__props.title), 1), vue.createElementVNode("button", {
|
|
134
|
+
class: "header-btn home-btn",
|
|
135
|
+
onClick: handleHome
|
|
136
|
+
}, [vue.createVNode(_component_van_icon, {
|
|
137
|
+
name: "wap-home-o"
|
|
138
|
+
})])]);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-d3934054"]]);
|
|
46
143
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
47
144
|
function getAugmentedNamespace(n) {
|
|
48
145
|
if (n.__esModule)
|
|
@@ -3271,6 +3368,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3271
3368
|
data: data2
|
|
3272
3369
|
});
|
|
3273
3370
|
};
|
|
3371
|
+
function auth_children(data2) {
|
|
3372
|
+
return service$3({
|
|
3373
|
+
url: vm.urlCallback() + "/qw-api/server-auth/auth/children",
|
|
3374
|
+
method: "POST",
|
|
3375
|
+
data: data2
|
|
3376
|
+
});
|
|
3377
|
+
}
|
|
3274
3378
|
const wx_user_list = (data2) => {
|
|
3275
3379
|
return request({
|
|
3276
3380
|
url: vm.urlCallback() + "/qw-api/server-auth/auth/wx_user_list",
|
|
@@ -3340,6 +3444,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3340
3444
|
get_subdepartments_users,
|
|
3341
3445
|
get_user_by_id,
|
|
3342
3446
|
get_wxuser_by_id,
|
|
3447
|
+
auth_children,
|
|
3343
3448
|
wx_user_list,
|
|
3344
3449
|
file_upload,
|
|
3345
3450
|
auth_get_user_info,
|
|
@@ -17130,13 +17235,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
17130
17235
|
var lodash = lodash$1.exports;
|
|
17131
17236
|
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
17237
|
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
17238
|
const _hoisted_1$k = {
|
|
17141
17239
|
class: "widget"
|
|
17142
17240
|
};
|
|
@@ -21975,7 +22073,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21975
22073
|
}
|
|
21976
22074
|
};
|
|
21977
22075
|
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-
|
|
22076
|
+
var CascaderPop_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.cascader-pop[data-v-498f9f58] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.cascader-selector[data-v-498f9f58] {\r\n padding: 10px;\n}\n.search-buttons[data-v-498f9f58] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-498f9f58] {\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-498f9f58] {\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-498f9f58] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.cascader-header[data-v-498f9f58] {\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-498f9f58] {\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-498f9f58] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-498f9f58] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-498f9f58] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\n.cell-content[data-v-498f9f58] {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\n}\n.circle-selector[data-v-498f9f58] {\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-498f9f58] {\r\n background-color: #1989fa;\r\n border-color: #1989fa;\n}\n.circle-selector.selected .van-icon[data-v-498f9f58] {\r\n color: white;\r\n font-size: 14px;\n}\n.van-cell__right-icon[data-v-498f9f58] {\r\n color: #969799;\r\n font-size: 16px;\r\n margin-left: 8px;\n}\n.name[data-v-498f9f58] {\r\n flex: 1;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\n}\n.cancel-btn[data-v-498f9f58] {\r\n color: #969799;\n}\n.search-field[data-v-498f9f58] {\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
22077
|
const _hoisted_1$3 = {
|
|
21980
22078
|
class: "cascader-selector"
|
|
21981
22079
|
};
|
|
@@ -22130,12 +22228,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22130
22228
|
if (!props.show) {
|
|
22131
22229
|
let params = {};
|
|
22132
22230
|
params.id = modelValue.value;
|
|
22133
|
-
params.isReturnParent =
|
|
22231
|
+
params.isReturnParent = true;
|
|
22134
22232
|
params.hasChildren = false;
|
|
22135
22233
|
params.hasPaths = true;
|
|
22136
22234
|
yield props.idQueryNode(params, (node) => {
|
|
22137
|
-
data2.parentNode =
|
|
22138
|
-
|
|
22235
|
+
data2.parentNode = node;
|
|
22236
|
+
let childNode = util.findNode(modelValue.value, data2.parentNode.children);
|
|
22237
|
+
emit("select", childNode);
|
|
22139
22238
|
});
|
|
22140
22239
|
} else {
|
|
22141
22240
|
let params = {};
|
|
@@ -22247,7 +22346,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22247
22346
|
};
|
|
22248
22347
|
}
|
|
22249
22348
|
};
|
|
22250
|
-
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
22349
|
+
var CascaderPop = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-498f9f58"]]);
|
|
22251
22350
|
const _hoisted_1$2 = {
|
|
22252
22351
|
style: {
|
|
22253
22352
|
"display": "flex",
|
|
@@ -22885,6 +22984,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
22885
22984
|
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
22985
|
};
|
|
22887
22986
|
const components = [
|
|
22987
|
+
{
|
|
22988
|
+
name: "WidgetQwHeadBar",
|
|
22989
|
+
widget: HeadBar
|
|
22990
|
+
},
|
|
22888
22991
|
{
|
|
22889
22992
|
name: "WidgetQwAuditBar",
|
|
22890
22993
|
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,20 +193,21 @@ 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
|
//未显示底部弹窗时,只查节点本身
|
|
200
200
|
if (!props.show) {
|
|
201
201
|
let params = {}
|
|
202
202
|
params.id = modelValue.value
|
|
203
|
-
params.isReturnParent =
|
|
203
|
+
params.isReturnParent = true
|
|
204
204
|
params.hasChildren = false
|
|
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,131 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="enterprise-header">
|
|
3
|
+
<!-- 返回按钮 -->
|
|
4
|
+
<button
|
|
5
|
+
class="header-btn back-btn"
|
|
6
|
+
@click="handleBack"
|
|
7
|
+
v-if="canGoBack"
|
|
8
|
+
>
|
|
9
|
+
<van-icon name="arrow-left" />
|
|
10
|
+
</button>
|
|
11
|
+
|
|
12
|
+
<!-- 标题区域 -->
|
|
13
|
+
<div class="header-title">
|
|
14
|
+
{{ title }}
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- 首页按钮 -->
|
|
18
|
+
<button
|
|
19
|
+
class="header-btn home-btn"
|
|
20
|
+
@click="handleHome"
|
|
21
|
+
>
|
|
22
|
+
<van-icon name="wap-home-o" />
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { useRouter, useRoute } from 'vue-router'
|
|
29
|
+
import { defineProps, computed } from 'vue'
|
|
30
|
+
|
|
31
|
+
// 定义组件属性
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
// 页面标题
|
|
34
|
+
title: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true,
|
|
37
|
+
default: '页面标题'
|
|
38
|
+
},
|
|
39
|
+
// 首页路由路径,默认为根路径
|
|
40
|
+
homePath: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '/'
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
// 路由相关
|
|
47
|
+
const router = useRouter()
|
|
48
|
+
const route = useRoute()
|
|
49
|
+
|
|
50
|
+
// 判断是否可以返回
|
|
51
|
+
const canGoBack = computed(() => {
|
|
52
|
+
// 可以根据实际路由历史判断,这里简单处理
|
|
53
|
+
return window.history.length>1
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
// 处理返回逻辑
|
|
57
|
+
const handleBack = () => {
|
|
58
|
+
console.log('back',router,route)
|
|
59
|
+
if (canGoBack.value) {
|
|
60
|
+
router.back()
|
|
61
|
+
} else {
|
|
62
|
+
// 如果不能返回,则跳转到首页
|
|
63
|
+
router.push(props.homePath)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 处理返回首页逻辑
|
|
68
|
+
const handleHome = () => {
|
|
69
|
+
// 如果已经在首页,则不执行跳转
|
|
70
|
+
if (route.path !== props.homePath) {
|
|
71
|
+
router.push(props.homePath)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style scoped>
|
|
77
|
+
.enterprise-header {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
height: 48px;
|
|
82
|
+
background-color: #2d8cf0; /* 企业微信风格蓝色 */
|
|
83
|
+
background-color: #fff;
|
|
84
|
+
color: white;
|
|
85
|
+
color: #000;
|
|
86
|
+
position: relative;
|
|
87
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
88
|
+
margin-bottom: 4px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.header-title {
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
text-overflow: ellipsis;
|
|
97
|
+
max-width: 70%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.header-btn {
|
|
101
|
+
position: absolute;
|
|
102
|
+
width: 48px;
|
|
103
|
+
height: 48px;
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
background: transparent;
|
|
108
|
+
border: none;
|
|
109
|
+
color: white;
|
|
110
|
+
color: #000;
|
|
111
|
+
font-size: 20px;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
padding: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.header-btn:disabled {
|
|
117
|
+
opacity: 0.5;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.back-btn {
|
|
122
|
+
left: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.home-btn {
|
|
126
|
+
right: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</style>
|
|
131
|
+
|
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
|