@cgboiler/biz-mobile 1.18.7 → 1.18.9

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.
@@ -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
- .org-avatar {
143
- flex-shrink: 0;
144
- width: 40px;
145
- height: 40px;
146
- display: flex;
147
- align-items: center;
148
- justify-content: center;
149
- img {
150
- border-radius: 4px;
151
- border: 1px solid #eee;
152
- object-fit: contain;
153
- }
154
- }
155
-
156
- .org-name {
157
- font-size: 14px;
158
- flex: 1;
159
- }
160
-
161
- &:last-child {
162
- border-bottom: none;
163
- }
164
- }
165
-
166
- .action-buttons {
167
- padding: 16px;
168
- display: flex;
169
- justify-content: center;
170
-
171
- .confirm-button {
172
- background-color: var(--van-primary-color);
173
- color: white;
174
- padding: 10px 0;
175
- border-radius: 4px;
176
- text-align: center;
177
- width: 100%;
178
- font-size: 14px;
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
  };
@@ -20,6 +20,7 @@ var __async = (__this, __arguments, generator) => {
20
20
  };
21
21
  import { computed, ref } from "vue";
22
22
  import { useFetch, getUserList, getStorage, getUserInfo, removeStorage } from "@cgboiler/core";
23
+ import { getDeptList } from "@cgboiler/core/src/utils/deptList";
23
24
  import { debounce } from "lodash-es";
24
25
  const orgListCache = /* @__PURE__ */ new Map();
25
26
  const fetchData = (url, cacheKey) => __async(void 0, null, function* () {
@@ -33,7 +34,7 @@ const fetchData = (url, cacheKey) => __async(void 0, null, function* () {
33
34
  return res;
34
35
  });
35
36
  const fetchOrgList = (deptId) => __async(void 0, null, function* () {
36
- const url = `https://wflow.hrbbrg.cn/v1/oa/org/tree/cloud?deptId=${deptId}&type=user`;
37
+ const url = `https://wflow.cgboiler.com/v1/oa/org/tree/cloud?deptId=${deptId}&type=user`;
37
38
  return fetchData(url, deptId || "");
38
39
  });
39
40
  const userList = ref([]);
@@ -44,12 +45,26 @@ const userMap = computed(() => {
44
45
  });
45
46
  return map;
46
47
  });
48
+ const deptList = ref([]);
49
+ const deptMap = computed(() => {
50
+ const map = /* @__PURE__ */ new Map();
51
+ deptList.value.forEach((item) => {
52
+ map.set(item.id, item);
53
+ });
54
+ return map;
55
+ });
47
56
  function initUserList() {
48
57
  return __async(this, null, function* () {
49
58
  userList.value = yield getUserList();
50
59
  });
51
60
  }
61
+ function initDeptList() {
62
+ return __async(this, null, function* () {
63
+ deptList.value = yield getDeptList();
64
+ });
65
+ }
52
66
  initUserList();
67
+ initDeptList();
53
68
  const useApi = () => {
54
69
  const orgList = ref([]);
55
70
  const orgSearchList = ref([]);
@@ -84,8 +99,11 @@ const useApi = () => {
84
99
  orgSearchList.value = [];
85
100
  return;
86
101
  }
87
- const url = `https://wflow.hrbbrg.cn/v1/oa/org/tree/user/search/cloud?userName=${userName}`;
88
- orgSearchList.value = yield fetchData(url);
102
+ const url = `https://wflow.cgboiler.com/v1/oa/org/tree/user/search/cloud?userName=${userName}`;
103
+ const searchResults = yield fetchData(url);
104
+ orgSearchList.value = searchResults.filter(
105
+ (item) => item.type !== "user" || item.status !== 5
106
+ );
89
107
  }), 300);
90
108
  const RECENT_SELECTED_USERS_KEY = "recent_selected_users_history";
91
109
  const MAX_RECENT_SELECTIONS = 15;
@@ -100,7 +118,7 @@ const useApi = () => {
100
118
  }
101
119
  });
102
120
  const url = decodeURIComponent(
103
- `https://wflow.hrbbrg.cn/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${name}_${user.userId}&pageNo=1&pageSize=20`
121
+ `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${name}_${user.userId}&pageNo=1&pageSize=20`
104
122
  );
105
123
  const res = yield fetchData(url);
106
124
  let recentList = [];
@@ -137,10 +155,10 @@ const useApi = () => {
137
155
  data.field5375578403639 = JSON.stringify(list);
138
156
  }
139
157
  if (dataId.value) {
140
- url = `https://wflow.hrbbrg.cn/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
158
+ url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
141
159
  method = "PUT";
142
160
  } else {
143
- url = "https://wflow.hrbbrg.cn/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
161
+ url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
144
162
  method = "POST";
145
163
  }
146
164
  const token = user.token;
@@ -241,6 +259,22 @@ const useApi = () => {
241
259
  const getUserInfoById = (id) => {
242
260
  return userList.value.find((item) => item.id === id);
243
261
  };
262
+ const getUsersByDeptId = (deptId) => {
263
+ const users = [];
264
+ const directUsers = userList.value.filter(
265
+ (user) => user.deptId === deptId && user.status !== 5
266
+ );
267
+ users.push(...directUsers);
268
+ const childDepts = deptList.value.filter((dept) => dept.parentId === deptId);
269
+ childDepts.forEach((childDept) => {
270
+ const childUsers = getUsersByDeptId(childDept.id);
271
+ users.push(...childUsers);
272
+ });
273
+ return users;
274
+ };
275
+ const getDeptById = (deptId) => {
276
+ return deptMap.value.get(deptId);
277
+ };
244
278
  return {
245
279
  userList,
246
280
  orgList,
@@ -252,7 +286,10 @@ const useApi = () => {
252
286
  searchOrgList,
253
287
  getRecentSelectedUsers,
254
288
  setRecentSelectedUsers,
255
- getUserInfoById
289
+ getUserInfoById,
290
+ deptList,
291
+ getUsersByDeptId,
292
+ getDeptById
256
293
  };
257
294
  };
258
295
  export {
@@ -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
+ }
@@ -23,9 +23,12 @@ import { useFetch } from "@cgboiler/core";
23
23
  const useApi = () => {
24
24
  const projectList = ref([]);
25
25
  const getProjectList = () => __async(void 0, null, function* () {
26
- const res = yield useFetch("https://wx.hrbbrg.cn/v1/note/projects", {
27
- method: "GET"
28
- });
26
+ const res = yield useFetch(
27
+ "https://vx.cgboiler.com/v1/note/projects",
28
+ {
29
+ method: "GET"
30
+ }
31
+ );
29
32
  if (res == null ? void 0 : res.d) {
30
33
  projectList.value = res.d.filter((item) => item.projectName).map((item) => {
31
34
  return {
@@ -3,7 +3,7 @@ import "./_atomic.css";
3
3
  import { defineComponent } from "vue";
4
4
  import { richTextEditorProps } from "./types";
5
5
  import "./index.css";
6
- import { RichTextEditor as BasicRichTextEditor } from "@cgboiler/biz-basic";
6
+ import { RichTextEditor } from "@cgboiler/biz-basic";
7
7
  var stdin_default = defineComponent({
8
8
  name: "RichTextEditor",
9
9
  props: richTextEditorProps,
@@ -11,7 +11,7 @@ var stdin_default = defineComponent({
11
11
  setup(props, {
12
12
  emit
13
13
  }) {
14
- return () => _createVNode(BasicRichTextEditor, {
14
+ return () => _createVNode(RichTextEditor, {
15
15
  "modelValue": props.modelValue,
16
16
  "onUpdate:modelValue": (val) => emit("update:modelValue", val),
17
17
  "placeholder": props.placeholder
@@ -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";