@cgboiler/biz-mobile 1.17.14 → 1.17.16

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.
@@ -19,13 +19,7 @@ var __async = (__this, __arguments, generator) => {
19
19
  });
20
20
  };
21
21
  import { ref } from "vue";
22
- import {
23
- useFetch,
24
- getUserList,
25
- getStorage,
26
- getUserInfo,
27
- removeStorage
28
- } from "@cgboiler/core";
22
+ import { useFetch, getUserList, getStorage, getUserInfo, removeStorage } from "@cgboiler/core";
29
23
  import { debounce } from "lodash-es";
30
24
  const orgListCache = /* @__PURE__ */ new Map();
31
25
  const fetchData = (url, cacheKey) => __async(void 0, null, function* () {
@@ -100,20 +94,9 @@ const useApi = () => {
100
94
  if (res.records && res.records.length) {
101
95
  res.records.forEach((item) => {
102
96
  const data = JSON.parse(item.data);
103
- console.log(data.field6713678545899);
104
97
  if (data.field6713678545899 === userInfo.value.name + "_" + user.userId) {
105
98
  dataId.value = item.id;
106
99
  const list = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
107
- if (Array.isArray(list)) {
108
- list.forEach((item2) => {
109
- if (item2.selectedUsers && Array.isArray(item2.selectedUsers)) {
110
- item2.selectedUsers = item2.selectedUsers.map((user2) => {
111
- const fullUser = userList.value.find((u) => u.id === user2.id);
112
- return fullUser || { id: user2.id };
113
- });
114
- }
115
- });
116
- }
117
100
  recentList = list;
118
101
  }
119
102
  });
@@ -126,26 +109,20 @@ const useApi = () => {
126
109
  let url = "";
127
110
  let method = "";
128
111
  data.field6713678545899 = userInfo.value.name + "_" + user.userId;
129
- if (data.field5375578403639) {
130
- const list = JSON.parse(data.field5375578403639);
131
- if (data.field5375578403639) {
132
- if (Array.isArray(list)) {
133
- list.forEach((item) => {
134
- if (item.selectedUsers && Array.isArray(item.selectedUsers)) {
135
- item.selectedUsers = item.selectedUsers.map((user2) => ({
136
- id: user2.id
137
- }));
138
- }
139
- });
140
- data.field5375578403639 = JSON.stringify(list);
141
- }
142
- }
143
- }
144
112
  let requestData = {
145
113
  deptId: userInfo.value.deptId,
146
114
  formData: data,
147
115
  processUsers: {}
148
116
  };
117
+ if (data.field5375578403639) {
118
+ const list = JSON.parse(data.field5375578403639);
119
+ list.forEach((item) => {
120
+ if (item.selectedUsers) {
121
+ item.selectedUsers = item.selectedUsers.map((user2) => ({ id: user2.id }));
122
+ }
123
+ });
124
+ data.field5375578403639 = JSON.stringify(list);
125
+ }
149
126
  if (dataId.value) {
150
127
  url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
151
128
  method = "PUT";
@@ -248,6 +225,15 @@ const useApi = () => {
248
225
  console.error("Failed to delete recent selected users history to localStorage", error);
249
226
  }
250
227
  });
228
+ const getUserInfoById = (id) => {
229
+ let name = "";
230
+ userList.value.forEach((item) => {
231
+ if (item.id === id) {
232
+ name = item.name;
233
+ }
234
+ });
235
+ return name;
236
+ };
251
237
  return {
252
238
  userList,
253
239
  orgList,
@@ -258,7 +244,8 @@ const useApi = () => {
258
244
  deleteRecentSelectedUsers,
259
245
  searchOrgList,
260
246
  getRecentSelectedUsers,
261
- setRecentSelectedUsers
247
+ setRecentSelectedUsers,
248
+ getUserInfoById
262
249
  };
263
250
  };
264
251
  export {
@@ -7,5 +7,5 @@ export declare function useSearch(props: any, api: any): {
7
7
  filteredOrgList: import("vue").ComputedRef<any>;
8
8
  recentSelectedHistory: import("vue").Ref<any[], any[]>;
9
9
  filterRecentSelectedHistory: import("vue").Ref<any[], any[]>;
10
- highlightText: (text: string, keyword: string) => string | (string | import("vue/jsx-runtime").JSX.Element)[];
10
+ highlightText: (text: string | number, keyword: string) => string | number | (string | import("vue/jsx-runtime").JSX.Element)[];
11
11
  };
@@ -30,7 +30,8 @@ function useSearch(props, api) {
30
30
  searchOrgList,
31
31
  setRecentSelectedUsers,
32
32
  deleteRecentSelectedUsers,
33
- getRecentSelectedUsers
33
+ getRecentSelectedUsers,
34
+ getUserInfoById
34
35
  } = api;
35
36
  const keyword = ref("");
36
37
  const searchRef = ref();
@@ -49,7 +50,7 @@ function useSearch(props, api) {
49
50
  });
50
51
  watchEffect(() => {
51
52
  if (keyword.value) {
52
- filterRecentSelectedHistory.value = recentSelectedHistory.value.filter((item) => item.selectedUsers.some((user) => keyword.value.split("").some((char) => user.name.includes(char))));
53
+ filterRecentSelectedHistory.value = recentSelectedHistory.value.filter((item) => item.selectedUsers.some((user) => keyword.value.split("").some((char) => getUserInfoById(user.id).includes(char))));
53
54
  } else {
54
55
  filterRecentSelectedHistory.value = recentSelectedHistory.value;
55
56
  }
@@ -81,7 +82,7 @@ function useSearch(props, api) {
81
82
  return text;
82
83
  }
83
84
  const keywordChars = keyword2.split("");
84
- return Array.from(text).map((char, index) => keywordChars.some((kChar) => char.toLowerCase() === kChar.toLowerCase()) ? _createVNode("span", {
85
+ return Array.from(String(text)).map((char, index) => keywordChars.some((kChar) => char.toLowerCase() === kChar.toLowerCase()) ? _createVNode("span", {
85
86
  "class": "highlight"
86
87
  }, [char]) : char);
87
88
  };
@@ -100,7 +101,7 @@ function useSearch(props, api) {
100
101
  "key": historyItem.id,
101
102
  "onClick": () => handleHistorySelect(historyItem),
102
103
  "class": "px-16px py-8px border-b border-[#eee]"
103
- }, [_createVNode("span", null, [historyItem.selectedUsers.map((user) => highlightText(user.name, keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])])]))])]) : "", filteredOrgList.value.length ? _createVNode(_Fragment, null, [" ", _createVNode("p", {
104
+ }, [_createVNode("span", null, [historyItem.selectedUsers.map((user) => highlightText(getUserInfoById(user.id), keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])])]))])]) : "", filteredOrgList.value.length ? _createVNode(_Fragment, null, [" ", _createVNode("p", {
104
105
  "class": "text-[14px] text-[#333] font-bold px-[16px] py-[12px] border-b border-[#eee]"
105
106
  }, [_createTextVNode("\u901A\u8BAF\u5F55")]), _createVNode("div", {
106
107
  "class": "feed-list-wrap"
@@ -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
+ }
@@ -1,191 +1,191 @@
1
- .ProseMirror {
2
- flex: 1;
3
- overflow: auto;
4
- outline: none;
5
-
6
- line-height: 1.6;
7
- font-size: var(--font-base);
8
- --white: #fff;
9
- --black: #2e2b29;
10
- --black-contrast: #110f0e;
11
- --gray-1: rgba(61, 37, 20, 0.05);
12
- --gray-2: rgba(61, 37, 20, 0.08);
13
- --gray-3: rgba(61, 37, 20, 0.12);
14
- --gray-4: rgba(53, 38, 28, 0.3);
15
- --gray-5: rgba(28, 25, 23, 0.6);
16
- --green: #22c55e;
17
- --purple: #6a00f5;
18
- --purple-contrast: #5800cc;
19
- --purple-light: rgba(88, 5, 255, 0.05);
20
- --yellow-contrast: #facc15;
21
- --yellow: rgba(250, 204, 21, 0.4);
22
- --yellow-light: #fffae5;
23
- --red: #ff5c33;
24
- --red-light: #ffebe5;
25
- --shadow: 0px 12px 33px 0px rgba(0, 0, 0, 0.06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, 0.04);
26
- :first-child {
27
- margin-top: 0;
28
- }
29
-
30
- /* List styles */
31
- ul,
32
- ol {
33
- padding: 0 1rem;
34
- margin: 1.25rem 1rem 1.25rem 0.4rem;
35
-
36
- li p {
37
- margin-top: 0.25em;
38
- margin-bottom: 0.25em;
39
- }
40
- }
41
-
42
- /* Heading styles */
43
- h1,
44
- h2,
45
- h3,
46
- h4,
47
- h5,
48
- h6 {
49
- line-height: 1.1;
50
- margin-top: 2.5rem;
51
- text-wrap: pretty;
52
- }
53
-
54
- h1,
55
- h2 {
56
- margin-top: 3.5rem;
57
- margin-bottom: 1.5rem;
58
- }
59
-
60
- h1 {
61
- font-size: 1.4rem;
62
- }
63
-
64
- h2 {
65
- font-size: 1.2rem;
66
- }
67
-
68
- h3 {
69
- font-size: 1.1rem;
70
- }
71
-
72
- h4,
73
- h5,
74
- h6 {
75
- font-size: 1rem;
76
- }
77
-
78
- /* Code and preformatted text styles */
79
- code {
80
- background-color: var(--purple-light);
81
- border-radius: 0.4rem;
82
- color: var(--black);
83
- font-size: 0.85rem;
84
- padding: 0.25em 0.3em;
85
- }
86
-
87
- pre {
88
- background: var(--black);
89
- border-radius: 0.5rem;
90
- color: var(--white);
91
- font-family: 'JetBrainsMono', monospace;
92
- margin: 1.5rem 0;
93
- padding: 0.75rem 1rem;
94
-
95
- code {
96
- background: none;
97
- color: inherit;
98
- font-size: 0.8rem;
99
- padding: 0;
100
- }
101
- }
102
-
103
- blockquote {
104
- border-left: 3px solid var(--gray-3);
105
- margin: 1.5rem 0;
106
- padding-left: 1rem;
107
- }
108
-
109
- hr {
110
- border: none;
111
- border-top: 1px solid var(--gray-2);
112
- margin: 2rem 0;
113
- }
114
-
115
- /* Placeholder (at the top) */
116
- p.is-editor-empty:first-child::before {
117
- color: var(--gray-4);
118
- content: attr(data-placeholder);
119
- float: left;
120
- height: 0;
121
- pointer-events: none;
122
- }
123
-
124
- .is-empty::before {
125
- color: var(--gray-4);
126
- content: attr(data-placeholder);
127
- float: left;
128
- height: 0;
129
- pointer-events: none;
130
- }
131
- /* Table-specific styling */
132
- table {
133
- border-collapse: collapse;
134
- margin: 0;
135
- overflow: hidden;
136
- table-layout: fixed;
137
- width: 100%;
138
-
139
- td,
140
- th {
141
- border: 1px solid var(--gray-3);
142
- box-sizing: border-box;
143
- min-width: 1em;
144
- padding: 6px 8px;
145
- position: relative;
146
- vertical-align: top;
147
-
148
- > * {
149
- margin-bottom: 0;
150
- }
151
- }
152
-
153
- th {
154
- background-color: var(--gray-1);
155
- font-weight: bold;
156
- text-align: left;
157
- }
158
-
159
- .selectedCell:after {
160
- background: var(--gray-2);
161
- content: '';
162
- left: 0;
163
- right: 0;
164
- top: 0;
165
- bottom: 0;
166
- pointer-events: none;
167
- position: absolute;
168
- z-index: 2;
169
- }
170
-
171
- .column-resize-handle {
172
- background-color: var(--purple);
173
- bottom: -2px;
174
- pointer-events: none;
175
- position: absolute;
176
- right: -2px;
177
- top: 0;
178
- width: 4px;
179
- }
180
- }
181
-
182
- .tableWrapper {
183
- margin: 1.5rem 0;
184
- overflow-x: auto;
185
- }
186
-
187
- &.resize-cursor {
188
- cursor: ew-resize;
189
- cursor: col-resize;
190
- }
191
- }
1
+ .ProseMirror {
2
+ flex: 1;
3
+ overflow: auto;
4
+ outline: none;
5
+
6
+ line-height: 1.6;
7
+ font-size: var(--font-base);
8
+ --white: #fff;
9
+ --black: #2e2b29;
10
+ --black-contrast: #110f0e;
11
+ --gray-1: rgba(61, 37, 20, 0.05);
12
+ --gray-2: rgba(61, 37, 20, 0.08);
13
+ --gray-3: rgba(61, 37, 20, 0.12);
14
+ --gray-4: rgba(53, 38, 28, 0.3);
15
+ --gray-5: rgba(28, 25, 23, 0.6);
16
+ --green: #22c55e;
17
+ --purple: #6a00f5;
18
+ --purple-contrast: #5800cc;
19
+ --purple-light: rgba(88, 5, 255, 0.05);
20
+ --yellow-contrast: #facc15;
21
+ --yellow: rgba(250, 204, 21, 0.4);
22
+ --yellow-light: #fffae5;
23
+ --red: #ff5c33;
24
+ --red-light: #ffebe5;
25
+ --shadow: 0px 12px 33px 0px rgba(0, 0, 0, 0.06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, 0.04);
26
+ :first-child {
27
+ margin-top: 0;
28
+ }
29
+
30
+ /* List styles */
31
+ ul,
32
+ ol {
33
+ padding: 0 1rem;
34
+ margin: 1.25rem 1rem 1.25rem 0.4rem;
35
+
36
+ li p {
37
+ margin-top: 0.25em;
38
+ margin-bottom: 0.25em;
39
+ }
40
+ }
41
+
42
+ /* Heading styles */
43
+ h1,
44
+ h2,
45
+ h3,
46
+ h4,
47
+ h5,
48
+ h6 {
49
+ line-height: 1.1;
50
+ margin-top: 2.5rem;
51
+ text-wrap: pretty;
52
+ }
53
+
54
+ h1,
55
+ h2 {
56
+ margin-top: 3.5rem;
57
+ margin-bottom: 1.5rem;
58
+ }
59
+
60
+ h1 {
61
+ font-size: 1.4rem;
62
+ }
63
+
64
+ h2 {
65
+ font-size: 1.2rem;
66
+ }
67
+
68
+ h3 {
69
+ font-size: 1.1rem;
70
+ }
71
+
72
+ h4,
73
+ h5,
74
+ h6 {
75
+ font-size: 1rem;
76
+ }
77
+
78
+ /* Code and preformatted text styles */
79
+ code {
80
+ background-color: var(--purple-light);
81
+ border-radius: 0.4rem;
82
+ color: var(--black);
83
+ font-size: 0.85rem;
84
+ padding: 0.25em 0.3em;
85
+ }
86
+
87
+ pre {
88
+ background: var(--black);
89
+ border-radius: 0.5rem;
90
+ color: var(--white);
91
+ font-family: 'JetBrainsMono', monospace;
92
+ margin: 1.5rem 0;
93
+ padding: 0.75rem 1rem;
94
+
95
+ code {
96
+ background: none;
97
+ color: inherit;
98
+ font-size: 0.8rem;
99
+ padding: 0;
100
+ }
101
+ }
102
+
103
+ blockquote {
104
+ border-left: 3px solid var(--gray-3);
105
+ margin: 1.5rem 0;
106
+ padding-left: 1rem;
107
+ }
108
+
109
+ hr {
110
+ border: none;
111
+ border-top: 1px solid var(--gray-2);
112
+ margin: 2rem 0;
113
+ }
114
+
115
+ /* Placeholder (at the top) */
116
+ p.is-editor-empty:first-child::before {
117
+ color: var(--gray-4);
118
+ content: attr(data-placeholder);
119
+ float: left;
120
+ height: 0;
121
+ pointer-events: none;
122
+ }
123
+
124
+ .is-empty::before {
125
+ color: var(--gray-4);
126
+ content: attr(data-placeholder);
127
+ float: left;
128
+ height: 0;
129
+ pointer-events: none;
130
+ }
131
+ /* Table-specific styling */
132
+ table {
133
+ border-collapse: collapse;
134
+ margin: 0;
135
+ overflow: hidden;
136
+ table-layout: fixed;
137
+ width: 100%;
138
+
139
+ td,
140
+ th {
141
+ border: 1px solid var(--gray-3);
142
+ box-sizing: border-box;
143
+ min-width: 1em;
144
+ padding: 6px 8px;
145
+ position: relative;
146
+ vertical-align: top;
147
+
148
+ > * {
149
+ margin-bottom: 0;
150
+ }
151
+ }
152
+
153
+ th {
154
+ background-color: var(--gray-1);
155
+ font-weight: bold;
156
+ text-align: left;
157
+ }
158
+
159
+ .selectedCell:after {
160
+ background: var(--gray-2);
161
+ content: '';
162
+ left: 0;
163
+ right: 0;
164
+ top: 0;
165
+ bottom: 0;
166
+ pointer-events: none;
167
+ position: absolute;
168
+ z-index: 2;
169
+ }
170
+
171
+ .column-resize-handle {
172
+ background-color: var(--purple);
173
+ bottom: -2px;
174
+ pointer-events: none;
175
+ position: absolute;
176
+ right: -2px;
177
+ top: 0;
178
+ width: 4px;
179
+ }
180
+ }
181
+
182
+ .tableWrapper {
183
+ margin: 1.5rem 0;
184
+ overflow-x: auto;
185
+ }
186
+
187
+ &.resize-cursor {
188
+ cursor: ew-resize;
189
+ cursor: col-resize;
190
+ }
191
+ }
@@ -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";
@@ -1,24 +1,24 @@
1
- import 'vue';
2
-
3
- type EventHandler = (...args: any[]) => void;
4
-
5
- declare module 'vue' {
6
- interface ComponentCustomProps {
7
- id?: string;
8
- role?: string;
9
- tabindex?: number;
10
- onClick?: EventHandler;
11
- onTouchend?: EventHandler;
12
- onTouchmove?: EventHandler;
13
- onTouchstart?: EventHandler;
14
- onTouchcancel?: EventHandler;
15
- onTouchmovePassive?: EventHandler;
16
- onTouchstartPassive?: EventHandler;
17
- }
18
-
19
- interface HTMLAttributes {
20
- onTouchmovePassive?: EventHandler;
21
- onTouchstartPassive?: EventHandler;
22
- onClickCapture?: EventHandler;
23
- }
24
- }
1
+ import 'vue';
2
+
3
+ type EventHandler = (...args: any[]) => void;
4
+
5
+ declare module 'vue' {
6
+ interface ComponentCustomProps {
7
+ id?: string;
8
+ role?: string;
9
+ tabindex?: number;
10
+ onClick?: EventHandler;
11
+ onTouchend?: EventHandler;
12
+ onTouchmove?: EventHandler;
13
+ onTouchstart?: EventHandler;
14
+ onTouchcancel?: EventHandler;
15
+ onTouchmovePassive?: EventHandler;
16
+ onTouchstartPassive?: EventHandler;
17
+ }
18
+
19
+ interface HTMLAttributes {
20
+ onTouchmovePassive?: EventHandler;
21
+ onTouchstartPassive?: EventHandler;
22
+ onClickCapture?: EventHandler;
23
+ }
24
+ }
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ declare namespace _default {
8
8
  }
9
9
  export default _default;
10
10
  export function install(app: any): void;
11
- export const version: "1.17.13";
11
+ export const version: "1.17.15";
12
12
  import MdPreview from './md-preview';
13
13
  import OrgPicker from './org-picker';
14
14
  import ProjectSelect from './project-select';