@cgboiler/biz-mobile 1.17.12 → 1.17.14
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/org-picker/useApi.js +47 -21
- package/es/rich-text-editor/index.css +1 -1
- package/es/rich-text-editor/index.less +0 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/org-picker/useApi.js +47 -21
- package/lib/rich-text-editor/index.css +1 -1
- package/lib/rich-text-editor/index.less +0 -2
- package/package.json +1 -1
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.
|
|
11
|
+
export const version: "1.17.13";
|
|
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.
|
|
5
|
+
const version = "1.17.13";
|
|
6
6
|
function install(app) {
|
|
7
7
|
const components = [
|
|
8
8
|
MdPreview,
|
package/es/org-picker/useApi.js
CHANGED
|
@@ -55,6 +55,7 @@ const useApi = () => {
|
|
|
55
55
|
const currentDeptId = ref("1");
|
|
56
56
|
const deptPath = ref([{ id: "1", name: "\u5DDD\u9505\u516C\u53F8" }]);
|
|
57
57
|
const dataId = ref("");
|
|
58
|
+
const userInfo = ref({});
|
|
58
59
|
const getOrgList = (deptId) => __async(void 0, null, function* () {
|
|
59
60
|
if (deptId) {
|
|
60
61
|
currentDeptId.value = deptId;
|
|
@@ -83,15 +84,37 @@ const useApi = () => {
|
|
|
83
84
|
const MAX_RECENT_SELECTIONS = 15;
|
|
84
85
|
const getRecentUsers = () => __async(void 0, null, function* () {
|
|
85
86
|
const user = yield getUserInfo();
|
|
86
|
-
|
|
87
|
+
let name = "";
|
|
88
|
+
userList.value = yield getUserList();
|
|
89
|
+
userList.value.forEach((item) => {
|
|
90
|
+
if (item.id === user.userId) {
|
|
91
|
+
name = item.name;
|
|
92
|
+
userInfo.value = item;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const url = decodeURIComponent(
|
|
96
|
+
`https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${name}_${user.userId}&pageNo=1&pageSize=20`
|
|
97
|
+
);
|
|
87
98
|
const res = yield fetchData(url);
|
|
88
99
|
let recentList = [];
|
|
89
100
|
if (res.records && res.records.length) {
|
|
90
101
|
res.records.forEach((item) => {
|
|
91
102
|
const data = JSON.parse(item.data);
|
|
92
|
-
|
|
103
|
+
console.log(data.field6713678545899);
|
|
104
|
+
if (data.field6713678545899 === userInfo.value.name + "_" + user.userId) {
|
|
93
105
|
dataId.value = item.id;
|
|
94
|
-
|
|
106
|
+
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
|
+
recentList = list;
|
|
95
118
|
}
|
|
96
119
|
});
|
|
97
120
|
}
|
|
@@ -100,32 +123,35 @@ const useApi = () => {
|
|
|
100
123
|
const addOrUpdateRecentUsers = (data) => __async(void 0, null, function* () {
|
|
101
124
|
try {
|
|
102
125
|
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
126
|
let url = "";
|
|
111
127
|
let method = "";
|
|
112
|
-
|
|
128
|
+
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
|
+
let requestData = {
|
|
145
|
+
deptId: userInfo.value.deptId,
|
|
146
|
+
formData: data,
|
|
147
|
+
processUsers: {}
|
|
148
|
+
};
|
|
113
149
|
if (dataId.value) {
|
|
114
150
|
url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
|
|
115
|
-
requestData = {
|
|
116
|
-
deptId,
|
|
117
|
-
formData: data,
|
|
118
|
-
processUsers: {}
|
|
119
|
-
};
|
|
120
151
|
method = "PUT";
|
|
121
152
|
} else {
|
|
122
153
|
url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
|
|
123
154
|
method = "POST";
|
|
124
|
-
requestData = {
|
|
125
|
-
deptId,
|
|
126
|
-
formData: data,
|
|
127
|
-
processUsers: {}
|
|
128
|
-
};
|
|
129
155
|
}
|
|
130
156
|
const token = user.token;
|
|
131
157
|
const response = yield fetch(url, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ProseMirror{flex:1;overflow:auto;
|
|
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}
|
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.
|
|
11
|
+
export const version: "1.17.13";
|
|
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.
|
|
48
|
+
const version = "1.17.13";
|
|
49
49
|
function install(app) {
|
|
50
50
|
const components = [
|
|
51
51
|
import_md_preview.default,
|
package/lib/org-picker/useApi.js
CHANGED
|
@@ -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,37 @@ 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
|
-
|
|
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
|
-
|
|
119
|
+
console.log(data.field6713678545899);
|
|
120
|
+
if (data.field6713678545899 === userInfo.value.name + "_" + user.userId) {
|
|
109
121
|
dataId.value = item.id;
|
|
110
|
-
|
|
122
|
+
const list = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
|
|
123
|
+
if (Array.isArray(list)) {
|
|
124
|
+
list.forEach((item2) => {
|
|
125
|
+
if (item2.selectedUsers && Array.isArray(item2.selectedUsers)) {
|
|
126
|
+
item2.selectedUsers = item2.selectedUsers.map((user2) => {
|
|
127
|
+
const fullUser = userList.value.find((u) => u.id === user2.id);
|
|
128
|
+
return fullUser || { id: user2.id };
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
recentList = list;
|
|
111
134
|
}
|
|
112
135
|
});
|
|
113
136
|
}
|
|
@@ -116,32 +139,35 @@ const useApi = () => {
|
|
|
116
139
|
const addOrUpdateRecentUsers = (data) => __async(void 0, null, function* () {
|
|
117
140
|
try {
|
|
118
141
|
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
142
|
let url = "";
|
|
127
143
|
let method = "";
|
|
128
|
-
|
|
144
|
+
data.field6713678545899 = userInfo.value.name + "_" + user.userId;
|
|
145
|
+
if (data.field5375578403639) {
|
|
146
|
+
const list = JSON.parse(data.field5375578403639);
|
|
147
|
+
if (data.field5375578403639) {
|
|
148
|
+
if (Array.isArray(list)) {
|
|
149
|
+
list.forEach((item) => {
|
|
150
|
+
if (item.selectedUsers && Array.isArray(item.selectedUsers)) {
|
|
151
|
+
item.selectedUsers = item.selectedUsers.map((user2) => ({
|
|
152
|
+
id: user2.id
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
data.field5375578403639 = JSON.stringify(list);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
let requestData = {
|
|
161
|
+
deptId: userInfo.value.deptId,
|
|
162
|
+
formData: data,
|
|
163
|
+
processUsers: {}
|
|
164
|
+
};
|
|
129
165
|
if (dataId.value) {
|
|
130
166
|
url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
|
|
131
|
-
requestData = {
|
|
132
|
-
deptId,
|
|
133
|
-
formData: data,
|
|
134
|
-
processUsers: {}
|
|
135
|
-
};
|
|
136
167
|
method = "PUT";
|
|
137
168
|
} else {
|
|
138
169
|
url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
|
|
139
170
|
method = "POST";
|
|
140
|
-
requestData = {
|
|
141
|
-
deptId,
|
|
142
|
-
formData: data,
|
|
143
|
-
processUsers: {}
|
|
144
|
-
};
|
|
145
171
|
}
|
|
146
172
|
const token = user.token;
|
|
147
173
|
const response = yield fetch(url, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ProseMirror{flex:1;overflow:auto;
|
|
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}
|