@cgboiler/biz-mobile 1.17.13 → 1.17.15

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 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.12";
11
+ export const version: "1.17.14";
12
12
  import MdPreview from './md-preview';
13
13
  import OrgPicker from './org-picker';
14
14
  import ProjectSelect from './project-select';
package/es/index.js CHANGED
@@ -2,7 +2,7 @@ import MdPreview from "./md-preview";
2
2
  import OrgPicker from "./org-picker";
3
3
  import ProjectSelect from "./project-select";
4
4
  import RichTextEditor from "./rich-text-editor";
5
- const version = "1.17.12";
5
+ const version = "1.17.14";
6
6
  function install(app) {
7
7
  const components = [
8
8
  MdPreview,
@@ -19,7 +19,8 @@ var stdin_default = defineComponent({
19
19
  getOrgList,
20
20
  orgList,
21
21
  deptPath,
22
- userList
22
+ userList,
23
+ getUserInfoById
23
24
  } = api;
24
25
  getOrgList();
25
26
  const activeTab = ref("txl");
@@ -139,7 +140,7 @@ var stdin_default = defineComponent({
139
140
  "class": "py-8px border-b border-[#eee] flex items-center"
140
141
  }, [_createVNode("span", {
141
142
  "class": "flex-1"
142
- }, [historyItem.selectedUsers.map((user) => highlightText(user.name, keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])]), _createVNode("span", {
143
+ }, [historyItem.selectedUsers.map((user) => highlightText(getUserInfoById(user.id), keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])]), _createVNode("span", {
143
144
  "class": "p-4px pl-2",
144
145
  "onClick": (e) => {
145
146
  e.stopPropagation();
@@ -55,4 +55,5 @@ export declare const useApi: () => {
55
55
  searchOrgList: import("lodash-es").DebouncedFunc<(userName: string) => Promise<void>>;
56
56
  getRecentSelectedUsers: () => Promise<RecentSelection[]>;
57
57
  setRecentSelectedUsers: (users: OrgItem[]) => Promise<void>;
58
+ getUserInfoById: (id: string | number) => string;
58
59
  };
@@ -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* () {
@@ -55,6 +49,7 @@ const useApi = () => {
55
49
  const currentDeptId = ref("1");
56
50
  const deptPath = ref([{ id: "1", name: "\u5DDD\u9505\u516C\u53F8" }]);
57
51
  const dataId = ref("");
52
+ const userInfo = ref({});
58
53
  const getOrgList = (deptId) => __async(void 0, null, function* () {
59
54
  if (deptId) {
60
55
  currentDeptId.value = deptId;
@@ -83,15 +78,26 @@ const useApi = () => {
83
78
  const MAX_RECENT_SELECTIONS = 15;
84
79
  const getRecentUsers = () => __async(void 0, null, function* () {
85
80
  const user = yield getUserInfo();
86
- const url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${user.userId}&pageNo=1&pageSize=20`;
81
+ let name = "";
82
+ userList.value = yield getUserList();
83
+ userList.value.forEach((item) => {
84
+ if (item.id === user.userId) {
85
+ name = item.name;
86
+ userInfo.value = item;
87
+ }
88
+ });
89
+ const url = decodeURIComponent(
90
+ `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${name}_${user.userId}&pageNo=1&pageSize=20`
91
+ );
87
92
  const res = yield fetchData(url);
88
93
  let recentList = [];
89
94
  if (res.records && res.records.length) {
90
95
  res.records.forEach((item) => {
91
96
  const data = JSON.parse(item.data);
92
- if (data.field6713678545899 === user.userId) {
97
+ if (data.field6713678545899 === userInfo.value.name + "_" + user.userId) {
93
98
  dataId.value = item.id;
94
- recentList = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
99
+ const list = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
100
+ recentList = list;
95
101
  }
96
102
  });
97
103
  }
@@ -100,32 +106,29 @@ const useApi = () => {
100
106
  const addOrUpdateRecentUsers = (data) => __async(void 0, null, function* () {
101
107
  try {
102
108
  const user = yield getUserInfo();
103
- let deptId = "";
104
- userList.value.forEach((item) => {
105
- if (item.id === user.userId) {
106
- console.log(item);
107
- deptId = item.deptId;
108
- }
109
- });
110
109
  let url = "";
111
110
  let method = "";
112
- let requestData = {};
111
+ data.field6713678545899 = userInfo.value.name + "_" + user.userId;
112
+ let requestData = {
113
+ deptId: userInfo.value.deptId,
114
+ formData: data,
115
+ processUsers: {}
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
+ }
113
126
  if (dataId.value) {
114
127
  url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
115
- requestData = {
116
- deptId,
117
- formData: data,
118
- processUsers: {}
119
- };
120
128
  method = "PUT";
121
129
  } else {
122
130
  url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
123
131
  method = "POST";
124
- requestData = {
125
- deptId,
126
- formData: data,
127
- processUsers: {}
128
- };
129
132
  }
130
133
  const token = user.token;
131
134
  const response = yield fetch(url, {
@@ -222,6 +225,15 @@ const useApi = () => {
222
225
  console.error("Failed to delete recent selected users history to localStorage", error);
223
226
  }
224
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
+ };
225
237
  return {
226
238
  userList,
227
239
  orgList,
@@ -232,7 +244,8 @@ const useApi = () => {
232
244
  deleteRecentSelectedUsers,
233
245
  searchOrgList,
234
246
  getRecentSelectedUsers,
235
- setRecentSelectedUsers
247
+ setRecentSelectedUsers,
248
+ getUserInfoById
236
249
  };
237
250
  };
238
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 +1 @@
1
- .ProseMirror{flex:1;overflow:auto;padding:16px;min-height:200px;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--black-contrast: #110f0e;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)}.ProseMirror :first-child{margin-top:0}.ProseMirror ul,.ProseMirror ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem}.ProseMirror ul li p,.ProseMirror ol li p{margin-top:.25em;margin-bottom:.25em}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}.ProseMirror h1,.ProseMirror h2{margin-top:3.5rem;margin-bottom:1.5rem}.ProseMirror h1{font-size:1.4rem}.ProseMirror h2{font-size:1.2rem}.ProseMirror h3{font-size:1.1rem}.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-size:1rem}.ProseMirror code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}.ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}.ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}.ProseMirror table td,.ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.ProseMirror table td>*,.ProseMirror table th>*{margin-bottom:0}.ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}.ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}.ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}
1
+ .ProseMirror{flex:1;overflow:auto;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--black-contrast: #110f0e;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)}.ProseMirror :first-child{margin-top:0}.ProseMirror ul,.ProseMirror ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem}.ProseMirror ul li p,.ProseMirror ol li p{margin-top:.25em;margin-bottom:.25em}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}.ProseMirror h1,.ProseMirror h2{margin-top:3.5rem;margin-bottom:1.5rem}.ProseMirror h1{font-size:1.4rem}.ProseMirror h2{font-size:1.2rem}.ProseMirror h3{font-size:1.1rem}.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-size:1rem}.ProseMirror code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}.ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}.ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}.ProseMirror table td,.ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.ProseMirror table td>*,.ProseMirror table th>*{margin-bottom:0}.ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}.ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}.ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}
@@ -1,8 +1,6 @@
1
1
  .ProseMirror {
2
2
  flex: 1;
3
3
  overflow: auto;
4
- padding: 16px;
5
- min-height: 200px;
6
4
  outline: none;
7
5
 
8
6
  line-height: 1.6;
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.12";
11
+ export const version: "1.17.14";
12
12
  import MdPreview from './md-preview';
13
13
  import OrgPicker from './org-picker';
14
14
  import ProjectSelect from './project-select';
package/lib/index.js CHANGED
@@ -45,7 +45,7 @@ __reExport(stdin_exports, require("./md-preview"), module.exports);
45
45
  __reExport(stdin_exports, require("./org-picker"), module.exports);
46
46
  __reExport(stdin_exports, require("./project-select"), module.exports);
47
47
  __reExport(stdin_exports, require("./rich-text-editor"), module.exports);
48
- const version = "1.17.12";
48
+ const version = "1.17.14";
49
49
  function install(app) {
50
50
  const components = [
51
51
  import_md_preview.default,
@@ -51,7 +51,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
51
51
  getOrgList,
52
52
  orgList,
53
53
  deptPath,
54
- userList
54
+ userList,
55
+ getUserInfoById
55
56
  } = api;
56
57
  getOrgList();
57
58
  const activeTab = (0, import_vue2.ref)("txl");
@@ -171,7 +172,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
171
172
  "class": "py-8px border-b border-[#eee] flex items-center"
172
173
  }, [(0, import_vue.createVNode)("span", {
173
174
  "class": "flex-1"
174
- }, [historyItem.selectedUsers.map((user) => highlightText(user.name, keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])]), (0, import_vue.createVNode)("span", {
175
+ }, [historyItem.selectedUsers.map((user) => highlightText(getUserInfoById(user.id), keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])]), (0, import_vue.createVNode)("span", {
175
176
  "class": "p-4px pl-2",
176
177
  "onClick": (e) => {
177
178
  e.stopPropagation();
@@ -55,4 +55,5 @@ export declare const useApi: () => {
55
55
  searchOrgList: import("lodash-es").DebouncedFunc<(userName: string) => Promise<void>>;
56
56
  getRecentSelectedUsers: () => Promise<RecentSelection[]>;
57
57
  setRecentSelectedUsers: (users: OrgItem[]) => Promise<void>;
58
+ getUserInfoById: (id: string | number) => string;
58
59
  };
@@ -71,6 +71,7 @@ const useApi = () => {
71
71
  const currentDeptId = (0, import_vue.ref)("1");
72
72
  const deptPath = (0, import_vue.ref)([{ id: "1", name: "\u5DDD\u9505\u516C\u53F8" }]);
73
73
  const dataId = (0, import_vue.ref)("");
74
+ const userInfo = (0, import_vue.ref)({});
74
75
  const getOrgList = (deptId) => __async(void 0, null, function* () {
75
76
  if (deptId) {
76
77
  currentDeptId.value = deptId;
@@ -99,15 +100,26 @@ const useApi = () => {
99
100
  const MAX_RECENT_SELECTIONS = 15;
100
101
  const getRecentUsers = () => __async(void 0, null, function* () {
101
102
  const user = yield (0, import_core.getUserInfo)();
102
- const url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${user.userId}&pageNo=1&pageSize=20`;
103
+ let name = "";
104
+ userList.value = yield (0, import_core.getUserList)();
105
+ userList.value.forEach((item) => {
106
+ if (item.id === user.userId) {
107
+ name = item.name;
108
+ userInfo.value = item;
109
+ }
110
+ });
111
+ const url = decodeURIComponent(
112
+ `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${name}_${user.userId}&pageNo=1&pageSize=20`
113
+ );
103
114
  const res = yield fetchData(url);
104
115
  let recentList = [];
105
116
  if (res.records && res.records.length) {
106
117
  res.records.forEach((item) => {
107
118
  const data = JSON.parse(item.data);
108
- if (data.field6713678545899 === user.userId) {
119
+ if (data.field6713678545899 === userInfo.value.name + "_" + user.userId) {
109
120
  dataId.value = item.id;
110
- recentList = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
121
+ const list = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
122
+ recentList = list;
111
123
  }
112
124
  });
113
125
  }
@@ -116,32 +128,29 @@ const useApi = () => {
116
128
  const addOrUpdateRecentUsers = (data) => __async(void 0, null, function* () {
117
129
  try {
118
130
  const user = yield (0, import_core.getUserInfo)();
119
- let deptId = "";
120
- userList.value.forEach((item) => {
121
- if (item.id === user.userId) {
122
- console.log(item);
123
- deptId = item.deptId;
124
- }
125
- });
126
131
  let url = "";
127
132
  let method = "";
128
- let requestData = {};
133
+ data.field6713678545899 = userInfo.value.name + "_" + user.userId;
134
+ let requestData = {
135
+ deptId: userInfo.value.deptId,
136
+ formData: data,
137
+ processUsers: {}
138
+ };
139
+ if (data.field5375578403639) {
140
+ const list = JSON.parse(data.field5375578403639);
141
+ list.forEach((item) => {
142
+ if (item.selectedUsers) {
143
+ item.selectedUsers = item.selectedUsers.map((user2) => ({ id: user2.id }));
144
+ }
145
+ });
146
+ data.field5375578403639 = JSON.stringify(list);
147
+ }
129
148
  if (dataId.value) {
130
149
  url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
131
- requestData = {
132
- deptId,
133
- formData: data,
134
- processUsers: {}
135
- };
136
150
  method = "PUT";
137
151
  } else {
138
152
  url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
139
153
  method = "POST";
140
- requestData = {
141
- deptId,
142
- formData: data,
143
- processUsers: {}
144
- };
145
154
  }
146
155
  const token = user.token;
147
156
  const response = yield fetch(url, {
@@ -238,6 +247,15 @@ const useApi = () => {
238
247
  console.error("Failed to delete recent selected users history to localStorage", error);
239
248
  }
240
249
  });
250
+ const getUserInfoById = (id) => {
251
+ let name = "";
252
+ userList.value.forEach((item) => {
253
+ if (item.id === id) {
254
+ name = item.name;
255
+ }
256
+ });
257
+ return name;
258
+ };
241
259
  return {
242
260
  userList,
243
261
  orgList,
@@ -248,6 +266,7 @@ const useApi = () => {
248
266
  deleteRecentSelectedUsers,
249
267
  searchOrgList,
250
268
  getRecentSelectedUsers,
251
- setRecentSelectedUsers
269
+ setRecentSelectedUsers,
270
+ getUserInfoById
252
271
  };
253
272
  };
@@ -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
  };
@@ -52,7 +52,8 @@ function useSearch(props, api) {
52
52
  searchOrgList,
53
53
  setRecentSelectedUsers,
54
54
  deleteRecentSelectedUsers,
55
- getRecentSelectedUsers
55
+ getRecentSelectedUsers,
56
+ getUserInfoById
56
57
  } = api;
57
58
  const keyword = (0, import_vue2.ref)("");
58
59
  const searchRef = (0, import_vue2.ref)();
@@ -71,7 +72,7 @@ function useSearch(props, api) {
71
72
  });
72
73
  (0, import_vue2.watchEffect)(() => {
73
74
  if (keyword.value) {
74
- filterRecentSelectedHistory.value = recentSelectedHistory.value.filter((item) => item.selectedUsers.some((user) => keyword.value.split("").some((char) => user.name.includes(char))));
75
+ filterRecentSelectedHistory.value = recentSelectedHistory.value.filter((item) => item.selectedUsers.some((user) => keyword.value.split("").some((char) => getUserInfoById(user.id).includes(char))));
75
76
  } else {
76
77
  filterRecentSelectedHistory.value = recentSelectedHistory.value;
77
78
  }
@@ -103,7 +104,7 @@ function useSearch(props, api) {
103
104
  return text;
104
105
  }
105
106
  const keywordChars = keyword2.split("");
106
- return Array.from(text).map((char, index) => keywordChars.some((kChar) => char.toLowerCase() === kChar.toLowerCase()) ? (0, import_vue.createVNode)("span", {
107
+ return Array.from(String(text)).map((char, index) => keywordChars.some((kChar) => char.toLowerCase() === kChar.toLowerCase()) ? (0, import_vue.createVNode)("span", {
107
108
  "class": "highlight"
108
109
  }, [char]) : char);
109
110
  };
@@ -122,7 +123,7 @@ function useSearch(props, api) {
122
123
  "key": historyItem.id,
123
124
  "onClick": () => handleHistorySelect(historyItem),
124
125
  "class": "px-16px py-8px border-b border-[#eee]"
125
- }, [(0, import_vue.createVNode)("span", null, [historyItem.selectedUsers.map((user) => highlightText(user.name, keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])])]))])]) : "", filteredOrgList.value.length ? (0, import_vue.createVNode)(import_vue.Fragment, null, [" ", (0, import_vue.createVNode)("p", {
126
+ }, [(0, import_vue.createVNode)("span", null, [historyItem.selectedUsers.map((user) => highlightText(getUserInfoById(user.id), keyword.value)).reduce((prev, curr) => [prev, "\uFF0C", curr])])]))])]) : "", filteredOrgList.value.length ? (0, import_vue.createVNode)(import_vue.Fragment, null, [" ", (0, import_vue.createVNode)("p", {
126
127
  "class": "text-[14px] text-[#333] font-bold px-[16px] py-[12px] border-b border-[#eee]"
127
128
  }, [(0, import_vue.createTextVNode)("\u901A\u8BAF\u5F55")]), (0, import_vue.createVNode)("div", {
128
129
  "class": "feed-list-wrap"
@@ -1 +1 @@
1
- .ProseMirror{flex:1;overflow:auto;padding:16px;min-height:200px;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--black-contrast: #110f0e;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)}.ProseMirror :first-child{margin-top:0}.ProseMirror ul,.ProseMirror ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem}.ProseMirror ul li p,.ProseMirror ol li p{margin-top:.25em;margin-bottom:.25em}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}.ProseMirror h1,.ProseMirror h2{margin-top:3.5rem;margin-bottom:1.5rem}.ProseMirror h1{font-size:1.4rem}.ProseMirror h2{font-size:1.2rem}.ProseMirror h3{font-size:1.1rem}.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-size:1rem}.ProseMirror code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}.ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}.ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}.ProseMirror table td,.ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.ProseMirror table td>*,.ProseMirror table th>*{margin-bottom:0}.ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}.ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}.ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}
1
+ .ProseMirror{flex:1;overflow:auto;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--black-contrast: #110f0e;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)}.ProseMirror :first-child{margin-top:0}.ProseMirror ul,.ProseMirror ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem}.ProseMirror ul li p,.ProseMirror ol li p{margin-top:.25em;margin-bottom:.25em}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}.ProseMirror h1,.ProseMirror h2{margin-top:3.5rem;margin-bottom:1.5rem}.ProseMirror h1{font-size:1.4rem}.ProseMirror h2{font-size:1.2rem}.ProseMirror h3{font-size:1.1rem}.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-size:1rem}.ProseMirror code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}.ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}.ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}.ProseMirror table td,.ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.ProseMirror table td>*,.ProseMirror table th>*{margin-bottom:0}.ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}.ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}.ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}
@@ -1,8 +1,6 @@
1
1
  .ProseMirror {
2
2
  flex: 1;
3
3
  overflow: auto;
4
- padding: 16px;
5
- min-height: 200px;
6
4
  outline: none;
7
5
 
8
6
  line-height: 1.6;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgboiler/biz-mobile",
3
- "version": "1.17.13",
3
+ "version": "1.17.15",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",