cloud-web-corejs 1.0.54-dev.67 → 1.0.54-dev.69

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.67",
4
+ "version": "1.0.54-dev.69",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -81,7 +81,10 @@ export default {
81
81
  },
82
82
  confirm: (rows, fileInfos) => {
83
83
  this.fieldModel = rows;
84
- this.field.options.onAfterConfirmFile && this.field.options.onAfterConfirmFile(rows, fileInfos);
84
+ // this.field.options.onAfterConfirmFile && this.field.options.onAfterConfirmFile(rows, fileInfos);
85
+ let eventParamNames = ['attachments', 'fileInfos'];
86
+ let eventParamValues = [rows, fileInfos];
87
+ this.handleCustomEvent(this.field.options.onAfterConfirmFile, eventParamNames, eventParamValues)
85
88
  }
86
89
  };
87
90
  }
@@ -146,10 +146,12 @@ export default {
146
146
  }
147
147
  },
148
148
  submitFile(rows, fileInfos) {
149
- this.handlLineCode(fileInfos);
150
- this.field.options.onAfterConfirmFile && this.field.options.onAfterConfirmFile(rows, fileInfos);
149
+ // this.handlLineCode(fileInfos);
150
+ let eventParamNames = ['attachments', 'fileInfos'];
151
+ let eventParamValues = [rows, fileInfos];
152
+ this.handleCustomEvent(this.field.options.onAfterConfirmFile, eventParamNames, eventParamValues)
151
153
  },
152
- handlLineCode(fileInfos) {
154
+ /*handlLineCode(fileInfos) {
153
155
  let allPromise = [];
154
156
  fileInfos.forEach(async fileInfo => {
155
157
  await this.processFile(fileInfo.file, (lineCode) => {
@@ -176,7 +178,7 @@ export default {
176
178
  async processImage(base64, callback) {
177
179
  try {
178
180
  // 使用 ZXing 3.x 的 API
179
- const result = await decode(base64,(result, err) => {
181
+ const result = await decode(base64, (result, err) => {
180
182
  if (err) {
181
183
  this.handleError(`条码识别失败: ${err}`);
182
184
  callback && callback(null)
@@ -205,7 +207,7 @@ export default {
205
207
  // const imageData = Uint8Array.from(atob(base64), c => c.charCodeAt(0));
206
208
  // const source = new ZXing.ImageLuminanceSource(imageData, base64.length);
207
209
 
208
- decode(base64, (result, err) => {
210
+ decode(base64, (result, err) => {
209
211
  if (err) {
210
212
  this.handleError(`条码识别失败: ${err}`);
211
213
  callback && callback(null)
@@ -220,7 +222,7 @@ export default {
220
222
  handleError(errorMessage) {
221
223
  this.error = errorMessage;
222
224
  this.loading = false;
223
- },
225
+ },*/
224
226
  }
225
227
  }
226
228
  </script>
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <el-form-item label="onAfterConfirmFile" label-width="150px">
3
- <a href="javascript:void(0);" class="a-link link-oneLind" @click="editEventHandler('onAfterConfirmFile', eventParams)">
3
+ <a href="javascript:void(0);" class="a-link link-oneLind"
4
+ @click="editEventHandler('onAfterConfirmFile', eventParams)">
4
5
  <span>{{ optionModel.onAfterConfirmFile }}</span>
5
6
  <i class="el-icon-edit"></i>
6
7
  </a>
@@ -9,7 +10,8 @@
9
10
 
10
11
  <script>
11
12
  import i18n from "../../../../../../components/xform/utils/i18n";
12
- import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
13
+ import eventMixin
14
+ from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
13
15
 
14
16
  export default {
15
17
  name: "onAfterConfirmFile-editor",
@@ -21,7 +23,7 @@ export default {
21
23
  },
22
24
  data() {
23
25
  return {
24
- eventParams: ["attachments", "fileInfos"],
26
+ eventParams: ["dataId", "formCode", "attachments", "fileInfos"],
25
27
  };
26
28
  },
27
29
  };