ydb-components-material 0.1.21 → 0.1.23

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.
Files changed (55) hide show
  1. package/build/docs/404.html +3 -3
  2. package/build/docs/_demos/:uuid +3 -3
  3. package/build/docs/colorful-button.html +3 -3
  4. package/build/docs/colorful-input.html +3 -3
  5. package/build/docs/index.html +3 -3
  6. package/build/docs/static/close.e2e8764a.svg +1 -0
  7. package/build/docs/umi.d170f160.js +1 -0
  8. package/build/docs/{umi.4278bf7b.css → umi.e536bfab.css} +1 -1
  9. package/build/docs/~demos/:uuid.html +3 -3
  10. package/build/docs/~demos/colorful-button-demo.html +3 -3
  11. package/build/docs/~demos/colorful-input-demo.html +3 -3
  12. package/build/lowcode/assets-daily.json +11 -11
  13. package/build/lowcode/assets-dev.json +2 -2
  14. package/build/lowcode/assets-prod.json +11 -11
  15. package/build/lowcode/index.js +1 -1
  16. package/build/lowcode/meta.js +1 -1
  17. package/build/lowcode/preview.js +8 -8
  18. package/build/lowcode/render/default/view.css +1 -1
  19. package/build/lowcode/render/default/view.js +1 -1
  20. package/build/lowcode/view.css +1 -1
  21. package/build/lowcode/view.js +1 -1
  22. package/dist/BizComps.css +1 -1
  23. package/dist/BizComps.js +1 -1
  24. package/dist/BizComps.js.map +1 -1
  25. package/es/api.js +27 -7
  26. package/es/components/file-item/file.js +65 -5
  27. package/es/components/file-item/icon/close.svg +1 -0
  28. package/es/components/file-item/index.d.ts +9 -5
  29. package/es/components/file-item/index.js +320 -63
  30. package/es/components/file-item/index.scss +42 -3
  31. package/es/components/file-item/seal.js +111 -12
  32. package/es/components/file-item/sealUtil.js +129 -32
  33. package/es/components/file-item/sign.js +20 -16
  34. package/es/components/file-item/signUtil.js +3 -3
  35. package/es/components/scene-tree/index.js +1 -0
  36. package/es/utils.js +0 -0
  37. package/lib/api.js +28 -8
  38. package/lib/components/file-item/file.js +66 -5
  39. package/lib/components/file-item/icon/close.svg +1 -0
  40. package/lib/components/file-item/index.d.ts +9 -5
  41. package/lib/components/file-item/index.js +321 -64
  42. package/lib/components/file-item/index.scss +42 -3
  43. package/lib/components/file-item/seal.js +110 -11
  44. package/lib/components/file-item/sealUtil.js +128 -31
  45. package/lib/components/file-item/sign.js +20 -16
  46. package/lib/components/file-item/signUtil.js +3 -3
  47. package/lib/components/scene-tree/index.js +1 -0
  48. package/lib/utils.js +1 -0
  49. package/lowcode/file-item/meta.ts +63 -15
  50. package/lowcode_es/file-item/meta.js +60 -15
  51. package/lowcode_es/meta.js +1 -1
  52. package/lowcode_lib/file-item/meta.js +60 -15
  53. package/lowcode_lib/meta.js +1 -1
  54. package/package.json +3 -3
  55. package/build/docs/umi.b1d4b795.js +0 -1
@@ -4,6 +4,7 @@ exports.__esModule = true;
4
4
  exports.dataURLtoBlob = dataURLtoBlob;
5
5
  exports.getBlob = getBlob;
6
6
  exports.getFileExtension = getFileExtension;
7
+ exports.initFormat = void 0;
7
8
  exports.upload = upload;
8
9
  exports.uploadFilePromise = uploadFilePromise;
9
10
  // import apiConfig from '@/config/api.cofig'
@@ -101,18 +102,17 @@ function dataURLtoBlob(dataUrl) {
101
102
  }
102
103
 
103
104
  // 上传文件至申报端的服务器 [方法]
104
- function uploadFilePromise(url, token) {
105
- // const { baseURL } = apiConfig
105
+ function uploadFilePromise(url, baseUrl, token) {
106
106
  return new Promise(function (resolve, reject) {
107
107
  var formData = new FormData();
108
108
  formData.append('file', url);
109
109
  formData.append('open', true);
110
110
  formData.append('open', 'true');
111
- fetch('http://172.16.132.12:5005/declaration/material/file/files/api', {
111
+ fetch(baseUrl + "/declaration/material/file/files/api", {
112
112
  method: 'POST',
113
113
  body: formData,
114
114
  header: {
115
- // Authorization: 'rjvntrnggysagvpqhi7qfasqpd2hz736qap5vkikjgni3h3g4a5gcsawoooosvb2523mo5ifltk22vdki2u5q6vd2ceefhy5sk6e2kofxadn354ridcbcypgqgcljs27bhdnviiza7hdnbnwlh6e4yxe45kapm7y3wb6qqod5wysmjirbl6iwtaz3tzve7rdxq6blrfdqygjsfi5iosrwmpiumocr52tufnpcan2hdzydamjvbso2hmbrp32aymb2cahlcv2liswbhpwiqvf72anhnyycoyr3lwfp4xufasn7cbb2sxq'
115
+ Authorization: token
116
116
  }
117
117
  }).then(function (response) {
118
118
  return response.json();
@@ -169,4 +169,65 @@ function uploadFilePromise(url, token) {
169
169
  // }
170
170
  // })
171
171
  });
172
- }
172
+ }
173
+
174
+ // 初始化材料格式 [方法]
175
+ var initFormat = exports.initFormat = function initFormat(materialSpec) {
176
+ var materialSpecArr = materialSpec.split(',');
177
+ var arr = [{
178
+ key: '1',
179
+ value: 'doc'
180
+ }, {
181
+ key: '2',
182
+ value: 'docx'
183
+ }, {
184
+ key: '3',
185
+ value: 'pdf'
186
+ }, {
187
+ key: '4',
188
+ value: 'ofd'
189
+ }, {
190
+ key: '5',
191
+ value: 'xlsx'
192
+ }, {
193
+ key: '6',
194
+ value: 'xls'
195
+ }, {
196
+ key: '7',
197
+ value: 'png'
198
+ }, {
199
+ key: '8',
200
+ value: 'jpg'
201
+ }, {
202
+ key: '9',
203
+ value: 'jpeg'
204
+ }, {
205
+ key: '10',
206
+ value: 'gif'
207
+ }, {
208
+ key: '11',
209
+ value: 'bmp'
210
+ }, {
211
+ key: '12',
212
+ value: 'zip'
213
+ }, {
214
+ key: '13',
215
+ value: 'rar'
216
+ }, {
217
+ key: '14',
218
+ value: 'mp3'
219
+ }, {
220
+ key: '15',
221
+ value: 'mp4'
222
+ }, {
223
+ key: '16',
224
+ value: 'xml'
225
+ }];
226
+ var formatArr = [];
227
+ arr.forEach(function (ele) {
228
+ if (materialSpecArr.includes(ele.key)) {
229
+ formatArr.push(ele.value);
230
+ }
231
+ });
232
+ return formatArr;
233
+ };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_106_93607"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_106_93607)"><path d="M10.62774178125,12.00024228125L3.78474200125,5.15724198125C3.40573692325,4.77823618125,3.40573692325,4.16374743125,3.7847423512500002,3.7847423512500002C4.16374779125,3.40573692325,4.77823648125,3.40573692325,5.15724198125,3.78474200125L12.00024228125,10.62774178125L18.843241281250002,3.78474200125C19.222301281249997,3.40605306625,19.83653228125,3.40620327025,20.21540428125,3.78507745125C20.59428028125,4.16395199125,20.59443128125,4.77818178125,20.21574428125,5.15724198125L13.37274168125,12.00024228125L20.21574028125,18.843241281250002C20.59474528125,19.22224728125,20.59474528125,19.83673828125,20.21574028125,20.21574028125C19.83673428125,20.59474528125,19.22224428125,20.59474528125,18.843241281250002,20.21574428125L12.00024228125,13.37274168125L5.15724198125,20.21574428125C4.77818178125,20.59443128125,4.16395163125,20.59428028125,3.78507709125,20.21540428125C3.40620291225,19.83653228125,3.40605306625,19.222301281249997,3.78474200125,18.843241281250002L10.62774178125,12.00024228125Z" fill="#FFFFFF" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>
@@ -4,24 +4,28 @@ export interface FileItemProps {
4
4
  /**
5
5
  * 标题
6
6
  */
7
- file: string;
7
+ fileUrl: string;
8
8
  fileName: string;
9
+ fileId: string;
9
10
  fileType: string;
10
11
  guideImg: string;
11
12
  checkImg: string;
12
- approvalUrl: string;
13
- signatureUrl: string;
13
+ signatureEnable: boolean;
14
+ signEnable: boolean;
14
15
  token: string;
15
16
  accessToken: string;
16
- isApproval: boolean;
17
- isSignature: boolean;
17
+ isSigned: boolean;
18
+ isSealed: boolean;
18
19
  materialList: any[];
19
20
  maxFileSize: number;
21
+ spec: string;
20
22
  isInValid: boolean;
21
23
  isShowLib: boolean;
22
24
  userInfo: any;
25
+ baseUrl: string;
23
26
  del: () => void;
24
27
  valChange: (value: any) => void;
28
+ download: (value: any) => void;
25
29
  }
26
30
  declare const FileItem: React.FC<FileItemProps>;
27
31
  export default FileItem;