unify-external-plugin-platform 0.0.2-62 → 0.0.2-63
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/dist/external-plugin.common.js +98 -23
- package/dist/external-plugin.common.js.map +1 -1
- package/dist/external-plugin.css +1 -1
- package/dist/external-plugin.umd.js +98 -23
- package/dist/external-plugin.umd.js.map +1 -1
- package/dist/external-plugin.umd.min.js +3 -3
- package/dist/external-plugin.umd.min.js.map +1 -1
- package/package.json +1 -1
@@ -84019,8 +84019,8 @@ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function re
|
|
84019
84019
|
};
|
84020
84020
|
var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
|
84021
84021
|
|
84022
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=template&id=
|
84023
|
-
var
|
84022
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=template&id=65e6d7b8&scoped=true&
|
84023
|
+
var scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_render = function render() {
|
84024
84024
|
var _vm = this,
|
84025
84025
|
_c = _vm._self._c;
|
84026
84026
|
return _c('div', {
|
@@ -84084,7 +84084,7 @@ var scanner_camera_componentvue_type_template_id_74130935_scoped_true_render = f
|
|
84084
84084
|
}, [_vm._v(_vm._s(item.label))]), _vm._t("action")];
|
84085
84085
|
})], 2)])]);
|
84086
84086
|
};
|
84087
|
-
var
|
84087
|
+
var scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_staticRenderFns = [];
|
84088
84088
|
|
84089
84089
|
;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
|
84090
84090
|
/**
|
@@ -84857,12 +84857,18 @@ _defineProperty(FounderPluginSocketService, "scannerCameraUrl", 'ws://127.0.0.1:
|
|
84857
84857
|
_defineProperty(FounderPluginSocketService, "ws", void 0);
|
84858
84858
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/uds-plugin-socket.service.ts
|
84859
84859
|
|
84860
|
+
|
84860
84861
|
/**
|
84861
84862
|
* @author: lvcy
|
84862
84863
|
* @date: 2023-07-26
|
84863
84864
|
* @description:紫图速拍仪
|
84864
84865
|
*/
|
84865
84866
|
|
84867
|
+
var UdsPluginMethodCode;
|
84868
|
+
(function (UdsPluginMethodCode) {
|
84869
|
+
UdsPluginMethodCode["TurnOnCamera"] = "turnOnCamera";
|
84870
|
+
UdsPluginMethodCode["TakePhoto_Base64"] = "TakePhoto_Base64";
|
84871
|
+
})(UdsPluginMethodCode || (UdsPluginMethodCode = {}));
|
84866
84872
|
class UdsPluginSocketService {
|
84867
84873
|
static startConnect() {
|
84868
84874
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
@@ -84885,9 +84891,23 @@ class UdsPluginSocketService {
|
|
84885
84891
|
return onConnect;
|
84886
84892
|
}
|
84887
84893
|
static handleError() {
|
84894
|
+
for (const type in this.requestStore) {
|
84895
|
+
this.requestStore.forEach(({
|
84896
|
+
reject
|
84897
|
+
}) => {
|
84898
|
+
reject('handleError');
|
84899
|
+
});
|
84900
|
+
}
|
84888
84901
|
throw Error('紫图速拍仪设备功能加载失败');
|
84889
84902
|
}
|
84890
84903
|
static handleClose() {
|
84904
|
+
for (const type in this.requestStore) {
|
84905
|
+
this.requestStore.forEach(({
|
84906
|
+
reject
|
84907
|
+
}) => {
|
84908
|
+
reject('close');
|
84909
|
+
});
|
84910
|
+
}
|
84891
84911
|
if (this.ws) this.ws.close();
|
84892
84912
|
}
|
84893
84913
|
static handleMessage(msg) {
|
@@ -84895,33 +84915,82 @@ class UdsPluginSocketService {
|
|
84895
84915
|
if (data.FuncName === 'ShowVideo') {
|
84896
84916
|
const event = new ScannerCameraRefreshPhotoEvent(data.result);
|
84897
84917
|
return window.dispatchEvent(event);
|
84918
|
+
} else if (data.FuncName === "CaptureBase64" || data.FuncName === "CaptureDualBase64") {
|
84919
|
+
this.requestStore.forEach(({
|
84920
|
+
resolve
|
84921
|
+
}) => {
|
84922
|
+
resolve(data.result);
|
84923
|
+
});
|
84924
|
+
this.requestStore = [];
|
84898
84925
|
}
|
84899
84926
|
}
|
84900
84927
|
/**
|
84901
84928
|
* 发送请求
|
84902
84929
|
*/
|
84903
|
-
static async read(
|
84930
|
+
static async read(methodCode, data) {
|
84904
84931
|
await this.startConnect();
|
84905
84932
|
if (this.ws.readyState === 1) {
|
84906
|
-
|
84907
|
-
|
84908
|
-
|
84909
|
-
|
84910
|
-
|
84933
|
+
let method = '';
|
84934
|
+
switch (methodCode) {
|
84935
|
+
case UdsPluginMethodCode.TurnOnCamera:
|
84936
|
+
this.ws.send(JSON.stringify({
|
84937
|
+
Func: "StartRunMain",
|
84938
|
+
arg: 0
|
84939
|
+
}));
|
84940
|
+
method = JSON.stringify({
|
84941
|
+
Func: "ChangeCutType",
|
84942
|
+
arg: 0
|
84943
|
+
});
|
84944
|
+
break;
|
84945
|
+
case UdsPluginMethodCode.TakePhoto_Base64:
|
84946
|
+
this.ws.send(JSON.stringify({
|
84947
|
+
Func: "SetJPGQuality",
|
84948
|
+
arg: 70
|
84949
|
+
})); // jpg格式时有效
|
84950
|
+
this.ws.send(JSON.stringify({
|
84951
|
+
Func: "SetColorType",
|
84952
|
+
arg: "彩色"
|
84953
|
+
})); // 指定图像色彩模式,“彩色”、“灰度”、“黑白”三个选项
|
84954
|
+
this.ws.send(JSON.stringify({
|
84955
|
+
Func: "SetBoardColor",
|
84956
|
+
arg: 0
|
84957
|
+
})); // 1灰色底板机型,0或其他值为黑色底板机型
|
84958
|
+
this.ws.send(JSON.stringify({
|
84959
|
+
Func: "SetCamDPI",
|
84960
|
+
arg: 720
|
84961
|
+
})); // 设置高拍仪DPI,不设置则默认96DPI
|
84962
|
+
method = JSON.stringify({
|
84963
|
+
Func: "CaptureBase64",
|
84964
|
+
arg: 0
|
84965
|
+
});
|
84966
|
+
// 0-jpg,1-bmp,2-png,3-tif格式
|
84967
|
+
}
|
84968
|
+
|
84969
|
+
this.ws.send(method);
|
84970
|
+
return new Promise((resolve, reject) => {
|
84971
|
+
if (!this.requestStore) {
|
84972
|
+
this.requestStore = [];
|
84973
|
+
}
|
84974
|
+
this.requestStore.push({
|
84975
|
+
resolve,
|
84976
|
+
reject
|
84977
|
+
});
|
84978
|
+
});
|
84911
84979
|
} else {
|
84912
84980
|
throw Error('设备未准备完成');
|
84913
84981
|
}
|
84914
84982
|
}
|
84915
84983
|
static async turnOnTheCamera() {
|
84916
|
-
|
84917
|
-
|
84918
|
-
|
84919
|
-
|
84920
|
-
|
84984
|
+
await UdsPluginSocketService.read(UdsPluginMethodCode.TurnOnCamera);
|
84985
|
+
}
|
84986
|
+
static async scanByCamera() {
|
84987
|
+
const res = await UdsPluginSocketService.read(UdsPluginMethodCode.TakePhoto_Base64);
|
84988
|
+
return res;
|
84921
84989
|
}
|
84922
84990
|
}
|
84923
84991
|
_defineProperty(UdsPluginSocketService, "scannerCameraUrl", 'ws://127.0.0.1:8341');
|
84924
84992
|
_defineProperty(UdsPluginSocketService, "ws", void 0);
|
84993
|
+
_defineProperty(UdsPluginSocketService, "requestStore", []);
|
84925
84994
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
84926
84995
|
|
84927
84996
|
|
@@ -84993,19 +85062,25 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
84993
85062
|
let res = await JieYueService.scanByCamera();
|
84994
85063
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
84995
85064
|
break;
|
84996
|
-
case 3:
|
84997
|
-
case 4:
|
85065
|
+
case 3:
|
84998
85066
|
{
|
84999
|
-
//
|
85067
|
+
// 方正
|
85000
85068
|
this.$emit('send-scanner-result', this.scannerVideoSrc);
|
85069
|
+
break;
|
85070
|
+
}
|
85071
|
+
case 4:
|
85072
|
+
{
|
85073
|
+
let res = await UdsPluginSocketService.scanByCamera();
|
85074
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85075
|
+
break;
|
85001
85076
|
}
|
85002
|
-
break;
|
85003
85077
|
case 5:
|
85004
85078
|
{
|
85005
85079
|
// 良田
|
85006
85080
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85007
85081
|
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
|
85008
85082
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85083
|
+
break;
|
85009
85084
|
}
|
85010
85085
|
}
|
85011
85086
|
},
|
@@ -85075,10 +85150,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85075
85150
|
});
|
85076
85151
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85077
85152
|
/* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
|
85078
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
85153
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=65e6d7b8&prod&scoped=true&lang=scss&
|
85079
85154
|
// extracted by mini-css-extract-plugin
|
85080
85155
|
|
85081
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
85156
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=65e6d7b8&prod&scoped=true&lang=scss&
|
85082
85157
|
|
85083
85158
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85084
85159
|
|
@@ -85091,11 +85166,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85091
85166
|
|
85092
85167
|
var scanner_camera_component_component = normalizeComponent(
|
85093
85168
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85094
|
-
|
85095
|
-
|
85169
|
+
scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_render,
|
85170
|
+
scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_staticRenderFns,
|
85096
85171
|
false,
|
85097
85172
|
null,
|
85098
|
-
"
|
85173
|
+
"65e6d7b8",
|
85099
85174
|
null
|
85100
85175
|
|
85101
85176
|
)
|