cloud-web-corejs 1.0.67 → 1.0.68
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 +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +12 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +5 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +77 -0
- package/src/components/xform/form-designer/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +40 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +30 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +160 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +184 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +223 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +62 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
- package/src/components/xform/form-designer/setting-panel/wfObjConfigDialog.vue +189 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +286 -33
- package/src/store/modules/permission.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +4 -0
- package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -0
- package/src/views/bd/setting/form_template/wf_list.vue +127 -0
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js
CHANGED
@@ -3,7 +3,7 @@ import i18n from '../../../../../../components/xform/utils/i18n';
|
|
3
3
|
import fieldMixin from '../../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin';
|
4
4
|
|
5
5
|
import {deepClone} from '../../../../../../components/xform/utils/util';
|
6
|
-
|
6
|
+
import {extendDeeply} from "@base/utils/index.js";
|
7
7
|
import {use} from 'echarts/core';
|
8
8
|
import {CanvasRenderer} from 'echarts/renderers';
|
9
9
|
import {BarChart} from 'echarts/charts';
|
@@ -206,6 +206,9 @@ modules = {
|
|
206
206
|
delete chartOptions.yAxis.data;
|
207
207
|
}
|
208
208
|
}
|
209
|
+
},
|
210
|
+
chartOption(){
|
211
|
+
return this.field.options.echarBarOption
|
209
212
|
}
|
210
213
|
},
|
211
214
|
beforeCreate() {
|
@@ -220,6 +223,7 @@ modules = {
|
|
220
223
|
this.initEventHandler();
|
221
224
|
|
222
225
|
this.handleOnCreated();
|
226
|
+
this.initOption();
|
223
227
|
this.serieClone = deepClone(this.field.options.echarBarOption.series[0]);
|
224
228
|
},
|
225
229
|
|
@@ -232,6 +236,10 @@ modules = {
|
|
232
236
|
},
|
233
237
|
|
234
238
|
methods: {
|
239
|
+
initOption(){
|
240
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
241
|
+
this.field.options.echarBarOption = extendDeeply(this.field.options.echarBarOption, echartConfig);
|
242
|
+
},
|
235
243
|
/*async loadData() {
|
236
244
|
if (this.designState) {
|
237
245
|
this.showChart = true;
|
@@ -412,6 +420,9 @@ modules = {
|
|
412
420
|
this.$nextTick(()=>{
|
413
421
|
this.showChart = true;
|
414
422
|
})
|
423
|
+
},
|
424
|
+
getChart(){
|
425
|
+
return this.$refs.chart;
|
415
426
|
}
|
416
427
|
}
|
417
428
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js
CHANGED
@@ -157,6 +157,9 @@ modules = {
|
|
157
157
|
return height;
|
158
158
|
}
|
159
159
|
return '';
|
160
|
+
},
|
161
|
+
chartOption(){
|
162
|
+
return this.field.options.echarBarOption
|
160
163
|
}
|
161
164
|
},
|
162
165
|
beforeCreate() {
|
@@ -363,6 +366,9 @@ modules = {
|
|
363
366
|
this.$nextTick(()=>{
|
364
367
|
this.showChart = true;
|
365
368
|
})
|
369
|
+
},
|
370
|
+
getChart(){
|
371
|
+
return this.$refs.chart;
|
366
372
|
}
|
367
373
|
}
|
368
374
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js
CHANGED
@@ -77,6 +77,9 @@ modules = {
|
|
77
77
|
return height;
|
78
78
|
}
|
79
79
|
return '';
|
80
|
+
},
|
81
|
+
chartOption() {
|
82
|
+
return this.field.options.echarBarOption
|
80
83
|
}
|
81
84
|
},
|
82
85
|
beforeCreate() {
|
@@ -188,6 +191,9 @@ modules = {
|
|
188
191
|
this.$nextTick(() => {
|
189
192
|
this.showChart = true;
|
190
193
|
})
|
194
|
+
},
|
195
|
+
getChart() {
|
196
|
+
return this.$refs.chart;
|
191
197
|
}
|
192
198
|
}
|
193
199
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue
CHANGED
@@ -76,7 +76,11 @@ export default {
|
|
76
76
|
if (this.designState) {
|
77
77
|
return
|
78
78
|
}
|
79
|
-
let opt = {
|
79
|
+
let opt = {
|
80
|
+
title: this.field.options.exportFileName || null,
|
81
|
+
targetRef: this.field.options.tableRef || null,
|
82
|
+
pageSize: (this.field.options.exportPageSize || null)
|
83
|
+
};
|
80
84
|
let tableExportParam = this.handleCustomEvent(this.field.options.tableExportParam);
|
81
85
|
let options = {...opt, ...tableExportParam, type: type};
|
82
86
|
let tableRef = options?.targetRef;
|
@@ -16,6 +16,7 @@
|
|
16
16
|
:limit.sync="limit"
|
17
17
|
resultType="Array"
|
18
18
|
:edit="!field.options.disabled"
|
19
|
+
@callback="submitFile"
|
19
20
|
v-else></baseUpload>
|
20
21
|
</form-item-wrapper>
|
21
22
|
</template>
|
@@ -144,6 +145,82 @@ export default {
|
|
144
145
|
});
|
145
146
|
}
|
146
147
|
},
|
148
|
+
submitFile(rows, fileInfos) {
|
149
|
+
this.handlLineCode(fileInfos);
|
150
|
+
this.field.options.onAfterConfirmFile && this.field.options.onAfterConfirmFile(rows, fileInfos);
|
151
|
+
},
|
152
|
+
handlLineCode(fileInfos) {
|
153
|
+
let allPromise = [];
|
154
|
+
fileInfos.forEach(async fileInfo => {
|
155
|
+
await this.processFile(fileInfo.file, (lineCode) => {
|
156
|
+
fileInfo.lineCode = lineCode;
|
157
|
+
})
|
158
|
+
})
|
159
|
+
|
160
|
+
},
|
161
|
+
processFile(file, callback) {
|
162
|
+
return new Promise((resolve, reject) => {
|
163
|
+
const reader = new FileReader();
|
164
|
+
reader.onload = (e) => this.processImage(e.target.result, (lineCode) => {
|
165
|
+
resolve(lineCode)
|
166
|
+
callback(lineCode)
|
167
|
+
});
|
168
|
+
reader.onerror = () => {
|
169
|
+
resolve(null)
|
170
|
+
callback(null)
|
171
|
+
this.setError('文件读取失败')
|
172
|
+
};
|
173
|
+
reader.readAsDataURL(file);
|
174
|
+
})
|
175
|
+
},
|
176
|
+
async processImage(base64, callback) {
|
177
|
+
try {
|
178
|
+
// 使用 ZXing 3.x 的 API
|
179
|
+
const result = await decode(base64,(result, err) => {
|
180
|
+
if (err) {
|
181
|
+
this.handleError(`条码识别失败: ${err}`);
|
182
|
+
callback && callback(null)
|
183
|
+
return;
|
184
|
+
}
|
185
|
+
this.scannedText = result.text;
|
186
|
+
this.loading = false;
|
187
|
+
callback && callback(result.text)
|
188
|
+
});
|
189
|
+
} catch (err) {
|
190
|
+
console.error(err);
|
191
|
+
callback && callback(null)
|
192
|
+
this.handleError(`条码识别失败: ${err.message}`);
|
193
|
+
}
|
194
|
+
},
|
195
|
+
handleLineCode(fileInfos) {
|
196
|
+
fileInfos.forEach(fileInfo => {
|
197
|
+
let file = fileInfo.file;
|
198
|
+
})
|
199
|
+
},
|
200
|
+
handleImage(base64, fileName, callback) {
|
201
|
+
// 创建 ZXing Scanner
|
202
|
+
|
203
|
+
|
204
|
+
// 将 Base64 转换为 ImageLuminanceSource
|
205
|
+
// const imageData = Uint8Array.from(atob(base64), c => c.charCodeAt(0));
|
206
|
+
// const source = new ZXing.ImageLuminanceSource(imageData, base64.length);
|
207
|
+
|
208
|
+
decode(base64, (result, err) => {
|
209
|
+
if (err) {
|
210
|
+
this.handleError(`条码识别失败: ${err}`);
|
211
|
+
callback && callback(null)
|
212
|
+
return;
|
213
|
+
}
|
214
|
+
this.scannedText = result.text;
|
215
|
+
this.loading = false;
|
216
|
+
callback && callback(result.text)
|
217
|
+
});
|
218
|
+
},
|
219
|
+
|
220
|
+
handleError(errorMessage) {
|
221
|
+
this.error = errorMessage;
|
222
|
+
this.loading = false;
|
223
|
+
},
|
147
224
|
}
|
148
225
|
}
|
149
226
|
</script>
|