@cgboiler/biz-mobile 1.18.8 → 1.18.10
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/md-preview/index.less +101 -101
- package/es/org-picker/OrgPicker.js +81 -15
- package/es/org-picker/index.css +1 -1
- package/es/org-picker/index.less +230 -181
- package/es/org-picker/useApi.d.ts +3 -0
- package/es/org-picker/useApi.js +45 -10
- package/es/project-select/index.less +45 -45
- package/es/project-select/useApi.js +6 -3
- package/es/rich-text-editor/RichTextEditor.js +2 -2
- package/es/vue-sfc-shim.d.ts +8 -8
- package/es/vue-tsx-shim.d.ts +24 -24
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/md-preview/index.less +101 -101
- package/lib/org-picker/OrgPicker.js +81 -15
- package/lib/org-picker/index.css +1 -1
- package/lib/org-picker/index.less +230 -181
- package/lib/org-picker/useApi.d.ts +3 -0
- package/lib/org-picker/useApi.js +45 -10
- package/lib/project-select/index.less +45 -45
- package/lib/project-select/useApi.js +6 -3
- package/lib/vue-sfc-shim.d.ts +8 -8
- package/lib/vue-tsx-shim.d.ts +24 -24
- package/package.json +4 -4
|
@@ -1,181 +1,230 @@
|
|
|
1
|
-
:root:root {
|
|
2
|
-
--van-action-sheet-max-height: 100%;
|
|
3
|
-
}
|
|
4
|
-
.org-list {
|
|
5
|
-
height: 85vh;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
|
|
9
|
-
.highlight {
|
|
10
|
-
color: var(--van-primary-color);
|
|
11
|
-
font-weight: bold;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.breadcrumb-nav {
|
|
15
|
-
margin-bottom: 4px;
|
|
16
|
-
padding: 2px 16px;
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
font-size: 12px;
|
|
19
|
-
|
|
20
|
-
.dept-name {
|
|
21
|
-
&.current-dept {
|
|
22
|
-
color: #969799; /* 提示文字颜色 */
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.separator {
|
|
27
|
-
color: #969799;
|
|
28
|
-
margin: 0 4px;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.search-bar {
|
|
33
|
-
position: sticky;
|
|
34
|
-
top: 0;
|
|
35
|
-
z-index: 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.org-selected-items {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-wrap: nowrap;
|
|
41
|
-
padding: 12px 16px;
|
|
42
|
-
gap: 12px;
|
|
43
|
-
background-color: #fff;
|
|
44
|
-
overflow-x: auto;
|
|
45
|
-
height: 68px;
|
|
46
|
-
border-bottom: 1px solid #eee;
|
|
47
|
-
|
|
48
|
-
.selected-tag {
|
|
49
|
-
flex-shrink: 0;
|
|
50
|
-
background: none;
|
|
51
|
-
border: none;
|
|
52
|
-
padding: 0;
|
|
53
|
-
margin: 0;
|
|
54
|
-
position: relative;
|
|
55
|
-
.close-icon {
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: 0;
|
|
58
|
-
right: 0;
|
|
59
|
-
z-index: 1;
|
|
60
|
-
background-color: #fff;
|
|
61
|
-
border-radius: 50%;
|
|
62
|
-
border: 1px solid #eee;
|
|
63
|
-
width: 10px;
|
|
64
|
-
height: 10px;
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
font-size: 6px;
|
|
69
|
-
color: #969799;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.tag-avatar {
|
|
73
|
-
width: 40px;
|
|
74
|
-
height: 40px;
|
|
75
|
-
img {
|
|
76
|
-
border-radius: 4px;
|
|
77
|
-
border: 1px solid #eee;
|
|
78
|
-
object-fit: contain;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.bottom-section {
|
|
85
|
-
border-top: 1px solid #eee;
|
|
86
|
-
background-color: #fff;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.van-list {
|
|
90
|
-
flex: 1;
|
|
91
|
-
overflow-y: auto;
|
|
92
|
-
padding: 0 16px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.org-content-wrap {
|
|
96
|
-
flex: 1;
|
|
97
|
-
display: flex;
|
|
98
|
-
flex-direction: column;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
position: relative;
|
|
101
|
-
padding-top: 4px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.feed-list-wrap {
|
|
105
|
-
flex: 1;
|
|
106
|
-
display: flex;
|
|
107
|
-
overflow: hidden;
|
|
108
|
-
position: relative;
|
|
109
|
-
justify-content: center;
|
|
110
|
-
}
|
|
111
|
-
.search-result-list {
|
|
112
|
-
position: absolute;
|
|
113
|
-
top: 0; /* Adjust based on search bar and breadcrumb height */
|
|
114
|
-
left: 0;
|
|
115
|
-
right: 0;
|
|
116
|
-
bottom: 0; /* Adjust based on bottom section height if multiple is true */
|
|
117
|
-
z-index: 1;
|
|
118
|
-
background-color: #fff; /* Ensure background is white */
|
|
119
|
-
overflow-y: auto;
|
|
120
|
-
padding: 0 16px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.org-item {
|
|
124
|
-
padding: 12px 0;
|
|
125
|
-
border-bottom: 1px solid #eee;
|
|
126
|
-
cursor: pointer;
|
|
127
|
-
display: flex;
|
|
128
|
-
align-items: center;
|
|
129
|
-
gap: 12px;
|
|
130
|
-
|
|
131
|
-
.org-item-select-icon {
|
|
132
|
-
display: none;
|
|
133
|
-
padding-left: 4px;
|
|
134
|
-
}
|
|
135
|
-
&.selected {
|
|
136
|
-
color: var(--van-primary-color);
|
|
137
|
-
.org-item-select-icon {
|
|
138
|
-
display: inline;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
width:
|
|
145
|
-
height:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
1
|
+
:root:root {
|
|
2
|
+
--van-action-sheet-max-height: 100%;
|
|
3
|
+
}
|
|
4
|
+
.org-list {
|
|
5
|
+
height: 85vh;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
.highlight {
|
|
10
|
+
color: var(--van-primary-color);
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.breadcrumb-nav {
|
|
15
|
+
margin-bottom: 4px;
|
|
16
|
+
padding: 2px 16px;
|
|
17
|
+
border-radius: 4px;
|
|
18
|
+
font-size: 12px;
|
|
19
|
+
|
|
20
|
+
.dept-name {
|
|
21
|
+
&.current-dept {
|
|
22
|
+
color: #969799; /* 提示文字颜色 */
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.separator {
|
|
27
|
+
color: #969799;
|
|
28
|
+
margin: 0 4px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.search-bar {
|
|
33
|
+
position: sticky;
|
|
34
|
+
top: 0;
|
|
35
|
+
z-index: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.org-selected-items {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: nowrap;
|
|
41
|
+
padding: 12px 16px;
|
|
42
|
+
gap: 12px;
|
|
43
|
+
background-color: #fff;
|
|
44
|
+
overflow-x: auto;
|
|
45
|
+
height: 68px;
|
|
46
|
+
border-bottom: 1px solid #eee;
|
|
47
|
+
|
|
48
|
+
.selected-tag {
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
background: none;
|
|
51
|
+
border: none;
|
|
52
|
+
padding: 0;
|
|
53
|
+
margin: 0;
|
|
54
|
+
position: relative;
|
|
55
|
+
.close-icon {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
right: 0;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
background-color: #fff;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
border: 1px solid #eee;
|
|
63
|
+
width: 10px;
|
|
64
|
+
height: 10px;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
font-size: 6px;
|
|
69
|
+
color: #969799;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.tag-avatar {
|
|
73
|
+
width: 40px;
|
|
74
|
+
height: 40px;
|
|
75
|
+
img {
|
|
76
|
+
border-radius: 4px;
|
|
77
|
+
border: 1px solid #eee;
|
|
78
|
+
object-fit: contain;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.bottom-section {
|
|
85
|
+
border-top: 1px solid #eee;
|
|
86
|
+
background-color: #fff;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.van-list {
|
|
90
|
+
flex: 1;
|
|
91
|
+
overflow-y: auto;
|
|
92
|
+
padding: 0 16px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.org-content-wrap {
|
|
96
|
+
flex: 1;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
position: relative;
|
|
101
|
+
padding-top: 4px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.feed-list-wrap {
|
|
105
|
+
flex: 1;
|
|
106
|
+
display: flex;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
position: relative;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
}
|
|
111
|
+
.search-result-list {
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 0; /* Adjust based on search bar and breadcrumb height */
|
|
114
|
+
left: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
bottom: 0; /* Adjust based on bottom section height if multiple is true */
|
|
117
|
+
z-index: 1;
|
|
118
|
+
background-color: #fff; /* Ensure background is white */
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
padding: 0 16px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.org-item {
|
|
124
|
+
padding: 12px 0;
|
|
125
|
+
border-bottom: 1px solid #eee;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: 12px;
|
|
130
|
+
|
|
131
|
+
.org-item-select-icon {
|
|
132
|
+
display: none;
|
|
133
|
+
padding-left: 4px;
|
|
134
|
+
}
|
|
135
|
+
&.selected {
|
|
136
|
+
color: var(--van-primary-color);
|
|
137
|
+
.org-item-select-icon {
|
|
138
|
+
display: inline;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// 部门选择器样式
|
|
143
|
+
.dept-selector {
|
|
144
|
+
width: 20px;
|
|
145
|
+
height: 20px;
|
|
146
|
+
border: 2px solid #ddd;
|
|
147
|
+
border-radius: 4px;
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
flex-shrink: 0;
|
|
152
|
+
|
|
153
|
+
.dept-check-icon {
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
color: var(--van-primary-color);
|
|
156
|
+
font-weight: bold;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// 部门完全选中状态
|
|
161
|
+
&.dept-fully-selected {
|
|
162
|
+
.dept-selector {
|
|
163
|
+
background-color: var(--van-primary-color);
|
|
164
|
+
border-color: var(--van-primary-color);
|
|
165
|
+
|
|
166
|
+
.dept-check-icon {
|
|
167
|
+
color: white;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 部门部分选中状态
|
|
173
|
+
&.dept-partially-selected {
|
|
174
|
+
.dept-selector {
|
|
175
|
+
border-color: var(--van-primary-color);
|
|
176
|
+
|
|
177
|
+
.dept-check-icon {
|
|
178
|
+
color: var(--van-primary-color);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.org-avatar {
|
|
184
|
+
flex-shrink: 0;
|
|
185
|
+
width: 40px;
|
|
186
|
+
height: 40px;
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
img {
|
|
191
|
+
border-radius: 4px;
|
|
192
|
+
border: 1px solid #eee;
|
|
193
|
+
object-fit: contain;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.dept-content {
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
flex: 1;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
gap: 12px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.org-name {
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
flex: 1;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&:last-child {
|
|
211
|
+
border-bottom: none;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.action-buttons {
|
|
216
|
+
padding: 16px;
|
|
217
|
+
display: flex;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
|
|
220
|
+
.confirm-button {
|
|
221
|
+
background-color: var(--van-primary-color);
|
|
222
|
+
color: white;
|
|
223
|
+
padding: 10px 0;
|
|
224
|
+
border-radius: 4px;
|
|
225
|
+
text-align: center;
|
|
226
|
+
width: 100%;
|
|
227
|
+
font-size: 14px;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
@@ -56,4 +56,7 @@ export declare const useApi: () => {
|
|
|
56
56
|
getRecentSelectedUsers: () => Promise<RecentSelection[]>;
|
|
57
57
|
setRecentSelectedUsers: (users: OrgItem[]) => Promise<void>;
|
|
58
58
|
getUserInfoById: (id: string | number) => OrgItem | undefined;
|
|
59
|
+
deptList: import("vue").Ref<any[], any[]>;
|
|
60
|
+
getUsersByDeptId: (deptId: string) => OrgItem[];
|
|
61
|
+
getDeptById: (deptId: string) => any;
|
|
59
62
|
};
|
package/lib/org-picker/useApi.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(stdin_exports, {
|
|
|
42
42
|
module.exports = __toCommonJS(stdin_exports);
|
|
43
43
|
var import_vue = require("vue");
|
|
44
44
|
var import_core = require("@cgboiler/core");
|
|
45
|
+
var import_deptList = require("@cgboiler/core/src/utils/deptList");
|
|
45
46
|
var import_lodash_es = require("lodash-es");
|
|
46
47
|
const orgListCache = /* @__PURE__ */ new Map();
|
|
47
48
|
const fetchData = (url, cacheKey) => __async(void 0, null, function* () {
|
|
@@ -55,7 +56,7 @@ const fetchData = (url, cacheKey) => __async(void 0, null, function* () {
|
|
|
55
56
|
return res;
|
|
56
57
|
});
|
|
57
58
|
const fetchOrgList = (deptId) => __async(void 0, null, function* () {
|
|
58
|
-
const url = `https://wflow.
|
|
59
|
+
const url = `https://wflow.cgboiler.com/v1/oa/org/tree/cloud?deptId=${deptId}&type=user`;
|
|
59
60
|
return fetchData(url, deptId || "");
|
|
60
61
|
});
|
|
61
62
|
const userList = (0, import_vue.ref)([]);
|
|
@@ -66,19 +67,31 @@ const userMap = (0, import_vue.computed)(() => {
|
|
|
66
67
|
});
|
|
67
68
|
return map;
|
|
68
69
|
});
|
|
70
|
+
const deptList = (0, import_vue.ref)([]);
|
|
71
|
+
const deptMap = (0, import_vue.computed)(() => {
|
|
72
|
+
const map = /* @__PURE__ */ new Map();
|
|
73
|
+
deptList.value.forEach((item) => {
|
|
74
|
+
map.set(item.id, item);
|
|
75
|
+
});
|
|
76
|
+
return map;
|
|
77
|
+
});
|
|
69
78
|
function initUserList() {
|
|
70
79
|
return __async(this, null, function* () {
|
|
71
80
|
userList.value = yield (0, import_core.getUserList)();
|
|
72
81
|
});
|
|
73
82
|
}
|
|
83
|
+
function initDeptList() {
|
|
84
|
+
return __async(this, null, function* () {
|
|
85
|
+
deptList.value = yield (0, import_deptList.getDeptList)();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
74
88
|
initUserList();
|
|
89
|
+
initDeptList();
|
|
75
90
|
const useApi = () => {
|
|
76
91
|
const orgList = (0, import_vue.ref)([]);
|
|
77
92
|
const orgSearchList = (0, import_vue.ref)([]);
|
|
78
93
|
const currentDeptId = (0, import_vue.ref)("1");
|
|
79
|
-
const deptPath = (0, import_vue.ref)([
|
|
80
|
-
{ id: "1", name: "\u54C8\u5C14\u6EE8\u8F74\u627F\u96C6\u56E2\u6709\u9650\u516C\u53F8" }
|
|
81
|
-
]);
|
|
94
|
+
const deptPath = (0, import_vue.ref)([{ id: "1", name: "\u5DDD\u9505\u516C\u53F8" }]);
|
|
82
95
|
const dataId = (0, import_vue.ref)("");
|
|
83
96
|
const userInfo = (0, import_vue.ref)({});
|
|
84
97
|
const getOrgList = (deptId) => __async(void 0, null, function* () {
|
|
@@ -108,8 +121,11 @@ const useApi = () => {
|
|
|
108
121
|
orgSearchList.value = [];
|
|
109
122
|
return;
|
|
110
123
|
}
|
|
111
|
-
const url = `https://wflow.
|
|
112
|
-
|
|
124
|
+
const url = `https://wflow.cgboiler.com/v1/oa/org/tree/user/search/cloud?userName=${userName}`;
|
|
125
|
+
const searchResults = yield fetchData(url);
|
|
126
|
+
orgSearchList.value = searchResults.filter(
|
|
127
|
+
(item) => item.type !== "user" || item.status !== 5
|
|
128
|
+
);
|
|
113
129
|
}), 300);
|
|
114
130
|
const RECENT_SELECTED_USERS_KEY = "recent_selected_users_history";
|
|
115
131
|
const MAX_RECENT_SELECTIONS = 15;
|
|
@@ -124,7 +140,7 @@ const useApi = () => {
|
|
|
124
140
|
}
|
|
125
141
|
});
|
|
126
142
|
const url = decodeURIComponent(
|
|
127
|
-
`https://wflow.
|
|
143
|
+
`https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${name}_${user.userId}&pageNo=1&pageSize=20`
|
|
128
144
|
);
|
|
129
145
|
const res = yield fetchData(url);
|
|
130
146
|
let recentList = [];
|
|
@@ -161,10 +177,10 @@ const useApi = () => {
|
|
|
161
177
|
data.field5375578403639 = JSON.stringify(list);
|
|
162
178
|
}
|
|
163
179
|
if (dataId.value) {
|
|
164
|
-
url = `https://wflow.
|
|
180
|
+
url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
|
|
165
181
|
method = "PUT";
|
|
166
182
|
} else {
|
|
167
|
-
url = "https://wflow.
|
|
183
|
+
url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
|
|
168
184
|
method = "POST";
|
|
169
185
|
}
|
|
170
186
|
const token = user.token;
|
|
@@ -265,6 +281,22 @@ const useApi = () => {
|
|
|
265
281
|
const getUserInfoById = (id) => {
|
|
266
282
|
return userList.value.find((item) => item.id === id);
|
|
267
283
|
};
|
|
284
|
+
const getUsersByDeptId = (deptId) => {
|
|
285
|
+
const users = [];
|
|
286
|
+
const directUsers = userList.value.filter(
|
|
287
|
+
(user) => user.deptId === deptId && user.status !== 5
|
|
288
|
+
);
|
|
289
|
+
users.push(...directUsers);
|
|
290
|
+
const childDepts = deptList.value.filter((dept) => dept.parentId === deptId);
|
|
291
|
+
childDepts.forEach((childDept) => {
|
|
292
|
+
const childUsers = getUsersByDeptId(childDept.id);
|
|
293
|
+
users.push(...childUsers);
|
|
294
|
+
});
|
|
295
|
+
return users;
|
|
296
|
+
};
|
|
297
|
+
const getDeptById = (deptId) => {
|
|
298
|
+
return deptMap.value.get(deptId);
|
|
299
|
+
};
|
|
268
300
|
return {
|
|
269
301
|
userList,
|
|
270
302
|
orgList,
|
|
@@ -276,6 +308,9 @@ const useApi = () => {
|
|
|
276
308
|
searchOrgList,
|
|
277
309
|
getRecentSelectedUsers,
|
|
278
310
|
setRecentSelectedUsers,
|
|
279
|
-
getUserInfoById
|
|
311
|
+
getUserInfoById,
|
|
312
|
+
deptList,
|
|
313
|
+
getUsersByDeptId,
|
|
314
|
+
getDeptById
|
|
280
315
|
};
|
|
281
316
|
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
:root:root {
|
|
2
|
-
--van-action-sheet-max-height: 100%;
|
|
3
|
-
}
|
|
4
|
-
.project-list {
|
|
5
|
-
height: 85vh;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
|
|
9
|
-
.search-bar {
|
|
10
|
-
position: sticky;
|
|
11
|
-
top: 0;
|
|
12
|
-
z-index: 1;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.van-list {
|
|
16
|
-
flex: 1;
|
|
17
|
-
overflow-y: auto;
|
|
18
|
-
padding: 0 16px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.project-item {
|
|
22
|
-
padding: 12px 0;
|
|
23
|
-
border-bottom: 1px solid #eee;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
|
|
26
|
-
&.selected {
|
|
27
|
-
color: var(--van-primary-color);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.project-name {
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
|
|
33
|
-
.highlight {
|
|
34
|
-
color: var(--van-primary-color);
|
|
35
|
-
font-weight: bold;
|
|
36
|
-
padding: 0 2px;
|
|
37
|
-
border-radius: 2px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&:last-child {
|
|
42
|
-
border-bottom: none;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
:root:root {
|
|
2
|
+
--van-action-sheet-max-height: 100%;
|
|
3
|
+
}
|
|
4
|
+
.project-list {
|
|
5
|
+
height: 85vh;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
.search-bar {
|
|
10
|
+
position: sticky;
|
|
11
|
+
top: 0;
|
|
12
|
+
z-index: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.van-list {
|
|
16
|
+
flex: 1;
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
padding: 0 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.project-item {
|
|
22
|
+
padding: 12px 0;
|
|
23
|
+
border-bottom: 1px solid #eee;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
|
|
26
|
+
&.selected {
|
|
27
|
+
color: var(--van-primary-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.project-name {
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
|
|
33
|
+
.highlight {
|
|
34
|
+
color: var(--van-primary-color);
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
padding: 0 2px;
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:last-child {
|
|
42
|
+
border-bottom: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -45,9 +45,12 @@ var import_core = require("@cgboiler/core");
|
|
|
45
45
|
const useApi = () => {
|
|
46
46
|
const projectList = (0, import_vue.ref)([]);
|
|
47
47
|
const getProjectList = () => __async(void 0, null, function* () {
|
|
48
|
-
const res = yield (0, import_core.useFetch)(
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const res = yield (0, import_core.useFetch)(
|
|
49
|
+
"https://vx.cgboiler.com/v1/note/projects",
|
|
50
|
+
{
|
|
51
|
+
method: "GET"
|
|
52
|
+
}
|
|
53
|
+
);
|
|
51
54
|
if (res == null ? void 0 : res.d) {
|
|
52
55
|
projectList.value = res.d.filter((item) => item.projectName).map((item) => {
|
|
53
56
|
return {
|
package/lib/vue-sfc-shim.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line
|
|
3
|
-
import { DefineComponent } from 'vue'
|
|
4
|
-
const Component: DefineComponent
|
|
5
|
-
export default Component
|
|
6
|
-
}
|
|
7
|
-
declare module "marked";
|
|
8
|
-
declare module "katex";
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
import { DefineComponent } from 'vue'
|
|
4
|
+
const Component: DefineComponent
|
|
5
|
+
export default Component
|
|
6
|
+
}
|
|
7
|
+
declare module "marked";
|
|
8
|
+
declare module "katex";
|
|
9
9
|
declare module "diff-match-patch";
|