cloud-web-corejs 1.0.157 → 1.0.159

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.
@@ -329,17 +329,36 @@ export default {
329
329
  backendwriteback: "10",
330
330
  };
331
331
 
332
+ let param = {
333
+ row: attachment,
334
+ rowIndex: index,
335
+ };
332
336
  let deleteParam =
333
- this.handleCustomEvent(this.field.options.vabupload2_deleteParam) || {};
337
+ this.handleCustomEvent(
338
+ this.field.options.vabupload2_deleteParam,
339
+ ["param"],
340
+ [param]
341
+ ) || {};
334
342
  Object.assign(reqData, deleteParam);
335
343
 
344
+ // let url = this.deleteUrl + "?fileName=" + filename;
345
+
346
+ var form = new FormData();
347
+ form.append("fileName", filename);
348
+ Object.keys(reqData).forEach((key) => {
349
+ let value = reqData[key];
350
+ form.append(key, value);
351
+ });
352
+
336
353
  this.getFormRef().$http({
337
- url: this.deleteUrl + "?fileName=" + filename,
354
+ url: this.deleteUrl,
338
355
  method: "post",
339
- data: reqData,
356
+ // data: reqData,
357
+ data: form,
340
358
  // responseType: "RAW",
341
359
  headers: {
342
- "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
360
+ // "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
361
+ "Content-Type": "multipart/form-data",
343
362
  Authorization: `Bearer ${this.token}`,
344
363
  },
345
364
  useToken: false,
@@ -373,6 +392,7 @@ export default {
373
392
  // this.$commonFileUtil.downloadFile(attachment.showUrl);
374
393
  },
375
394
  initUploadInfo() {
395
+ if(this.designState)return
376
396
  this.getHxFileUploadConfig({
377
397
  success: (res) => {
378
398
  // {"apiToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI5YzcyNTE5OS00NDdlLTQ5OTMtOGRjYy1iMWM2NjY0YmJhNDAiLCJuYW1lIjoiOWM3MjUxOTktNDQ3ZS00OTkzLThkY2MtYjFjNjY2NGJiYTQwIiwibmJmIjoxNzU0NjE1ODE1LCJleHAiOjE3NTQ3MDIyMTUsImlzcyI6IlB3YyIsImF1ZCI6IkFTLkNSTS5TZXJ2aWNlLkFwaSJ9.CX2oy7P2PPwCPy-UdhNGaTiSfBHUiVgeK13N91NRcMc","domain":"https://crm-dev.hisense.com","uploadApi":"/api/v1.0/fileoperation/UploadFilesFromPortal","deleteApi":"/api/v1.0/fileoperation/delfile"}
@@ -21,7 +21,7 @@
21
21
  <a
22
22
  href="javascript:void(0);"
23
23
  class="a-link link-oneLind"
24
- @click="editEventHandler('vabupload2_deleteParam', params)"
24
+ @click="editEventHandler('vabupload2_deleteParam', deleteParam)"
25
25
  >
26
26
  <span>{{ optionModel.vabupload2_deleteParam }}</span>
27
27
  <i class="el-icon-edit"></i>
@@ -54,6 +54,7 @@ export default {
54
54
  data() {
55
55
  return {
56
56
  params: ["dataId", "formCode"],
57
+ deleteParam: ["dataId", "formCode", "param"],
57
58
  };
58
59
  },
59
60
  };