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
@@ -84029,8 +84029,8 @@ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function re
|
|
84029
84029
|
};
|
84030
84030
|
var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
|
84031
84031
|
|
84032
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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=
|
84033
|
-
var
|
84032
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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&
|
84033
|
+
var scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_render = function render() {
|
84034
84034
|
var _vm = this,
|
84035
84035
|
_c = _vm._self._c;
|
84036
84036
|
return _c('div', {
|
@@ -84094,7 +84094,7 @@ var scanner_camera_componentvue_type_template_id_74130935_scoped_true_render = f
|
|
84094
84094
|
}, [_vm._v(_vm._s(item.label))]), _vm._t("action")];
|
84095
84095
|
})], 2)])]);
|
84096
84096
|
};
|
84097
|
-
var
|
84097
|
+
var scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_staticRenderFns = [];
|
84098
84098
|
|
84099
84099
|
;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
|
84100
84100
|
/**
|
@@ -84867,12 +84867,18 @@ _defineProperty(FounderPluginSocketService, "scannerCameraUrl", 'ws://127.0.0.1:
|
|
84867
84867
|
_defineProperty(FounderPluginSocketService, "ws", void 0);
|
84868
84868
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/uds-plugin-socket.service.ts
|
84869
84869
|
|
84870
|
+
|
84870
84871
|
/**
|
84871
84872
|
* @author: lvcy
|
84872
84873
|
* @date: 2023-07-26
|
84873
84874
|
* @description:紫图速拍仪
|
84874
84875
|
*/
|
84875
84876
|
|
84877
|
+
var UdsPluginMethodCode;
|
84878
|
+
(function (UdsPluginMethodCode) {
|
84879
|
+
UdsPluginMethodCode["TurnOnCamera"] = "turnOnCamera";
|
84880
|
+
UdsPluginMethodCode["TakePhoto_Base64"] = "TakePhoto_Base64";
|
84881
|
+
})(UdsPluginMethodCode || (UdsPluginMethodCode = {}));
|
84876
84882
|
class UdsPluginSocketService {
|
84877
84883
|
static startConnect() {
|
84878
84884
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
@@ -84895,9 +84901,23 @@ class UdsPluginSocketService {
|
|
84895
84901
|
return onConnect;
|
84896
84902
|
}
|
84897
84903
|
static handleError() {
|
84904
|
+
for (const type in this.requestStore) {
|
84905
|
+
this.requestStore.forEach(({
|
84906
|
+
reject
|
84907
|
+
}) => {
|
84908
|
+
reject('handleError');
|
84909
|
+
});
|
84910
|
+
}
|
84898
84911
|
throw Error('紫图速拍仪设备功能加载失败');
|
84899
84912
|
}
|
84900
84913
|
static handleClose() {
|
84914
|
+
for (const type in this.requestStore) {
|
84915
|
+
this.requestStore.forEach(({
|
84916
|
+
reject
|
84917
|
+
}) => {
|
84918
|
+
reject('close');
|
84919
|
+
});
|
84920
|
+
}
|
84901
84921
|
if (this.ws) this.ws.close();
|
84902
84922
|
}
|
84903
84923
|
static handleMessage(msg) {
|
@@ -84905,33 +84925,82 @@ class UdsPluginSocketService {
|
|
84905
84925
|
if (data.FuncName === 'ShowVideo') {
|
84906
84926
|
const event = new ScannerCameraRefreshPhotoEvent(data.result);
|
84907
84927
|
return window.dispatchEvent(event);
|
84928
|
+
} else if (data.FuncName === "CaptureBase64" || data.FuncName === "CaptureDualBase64") {
|
84929
|
+
this.requestStore.forEach(({
|
84930
|
+
resolve
|
84931
|
+
}) => {
|
84932
|
+
resolve(data.result);
|
84933
|
+
});
|
84934
|
+
this.requestStore = [];
|
84908
84935
|
}
|
84909
84936
|
}
|
84910
84937
|
/**
|
84911
84938
|
* 发送请求
|
84912
84939
|
*/
|
84913
|
-
static async read(
|
84940
|
+
static async read(methodCode, data) {
|
84914
84941
|
await this.startConnect();
|
84915
84942
|
if (this.ws.readyState === 1) {
|
84916
|
-
|
84917
|
-
|
84918
|
-
|
84919
|
-
|
84920
|
-
|
84943
|
+
let method = '';
|
84944
|
+
switch (methodCode) {
|
84945
|
+
case UdsPluginMethodCode.TurnOnCamera:
|
84946
|
+
this.ws.send(JSON.stringify({
|
84947
|
+
Func: "StartRunMain",
|
84948
|
+
arg: 0
|
84949
|
+
}));
|
84950
|
+
method = JSON.stringify({
|
84951
|
+
Func: "ChangeCutType",
|
84952
|
+
arg: 0
|
84953
|
+
});
|
84954
|
+
break;
|
84955
|
+
case UdsPluginMethodCode.TakePhoto_Base64:
|
84956
|
+
this.ws.send(JSON.stringify({
|
84957
|
+
Func: "SetJPGQuality",
|
84958
|
+
arg: 70
|
84959
|
+
})); // jpg格式时有效
|
84960
|
+
this.ws.send(JSON.stringify({
|
84961
|
+
Func: "SetColorType",
|
84962
|
+
arg: "彩色"
|
84963
|
+
})); // 指定图像色彩模式,“彩色”、“灰度”、“黑白”三个选项
|
84964
|
+
this.ws.send(JSON.stringify({
|
84965
|
+
Func: "SetBoardColor",
|
84966
|
+
arg: 0
|
84967
|
+
})); // 1灰色底板机型,0或其他值为黑色底板机型
|
84968
|
+
this.ws.send(JSON.stringify({
|
84969
|
+
Func: "SetCamDPI",
|
84970
|
+
arg: 720
|
84971
|
+
})); // 设置高拍仪DPI,不设置则默认96DPI
|
84972
|
+
method = JSON.stringify({
|
84973
|
+
Func: "CaptureBase64",
|
84974
|
+
arg: 0
|
84975
|
+
});
|
84976
|
+
// 0-jpg,1-bmp,2-png,3-tif格式
|
84977
|
+
}
|
84978
|
+
|
84979
|
+
this.ws.send(method);
|
84980
|
+
return new Promise((resolve, reject) => {
|
84981
|
+
if (!this.requestStore) {
|
84982
|
+
this.requestStore = [];
|
84983
|
+
}
|
84984
|
+
this.requestStore.push({
|
84985
|
+
resolve,
|
84986
|
+
reject
|
84987
|
+
});
|
84988
|
+
});
|
84921
84989
|
} else {
|
84922
84990
|
throw Error('设备未准备完成');
|
84923
84991
|
}
|
84924
84992
|
}
|
84925
84993
|
static async turnOnTheCamera() {
|
84926
|
-
|
84927
|
-
|
84928
|
-
|
84929
|
-
|
84930
|
-
|
84994
|
+
await UdsPluginSocketService.read(UdsPluginMethodCode.TurnOnCamera);
|
84995
|
+
}
|
84996
|
+
static async scanByCamera() {
|
84997
|
+
const res = await UdsPluginSocketService.read(UdsPluginMethodCode.TakePhoto_Base64);
|
84998
|
+
return res;
|
84931
84999
|
}
|
84932
85000
|
}
|
84933
85001
|
_defineProperty(UdsPluginSocketService, "scannerCameraUrl", 'ws://127.0.0.1:8341');
|
84934
85002
|
_defineProperty(UdsPluginSocketService, "ws", void 0);
|
85003
|
+
_defineProperty(UdsPluginSocketService, "requestStore", []);
|
84935
85004
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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&
|
84936
85005
|
|
84937
85006
|
|
@@ -85003,19 +85072,25 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85003
85072
|
let res = await JieYueService.scanByCamera();
|
85004
85073
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85005
85074
|
break;
|
85006
|
-
case 3:
|
85007
|
-
case 4:
|
85075
|
+
case 3:
|
85008
85076
|
{
|
85009
|
-
//
|
85077
|
+
// 方正
|
85010
85078
|
this.$emit('send-scanner-result', this.scannerVideoSrc);
|
85079
|
+
break;
|
85080
|
+
}
|
85081
|
+
case 4:
|
85082
|
+
{
|
85083
|
+
let res = await UdsPluginSocketService.scanByCamera();
|
85084
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85085
|
+
break;
|
85011
85086
|
}
|
85012
|
-
break;
|
85013
85087
|
case 5:
|
85014
85088
|
{
|
85015
85089
|
// 良田
|
85016
85090
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85017
85091
|
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
|
85018
85092
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85093
|
+
break;
|
85019
85094
|
}
|
85020
85095
|
}
|
85021
85096
|
},
|
@@ -85085,10 +85160,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85085
85160
|
});
|
85086
85161
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85087
85162
|
/* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
|
85088
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.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-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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=
|
85163
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.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-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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&
|
85089
85164
|
// extracted by mini-css-extract-plugin
|
85090
85165
|
|
85091
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
85166
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=65e6d7b8&prod&scoped=true&lang=scss&
|
85092
85167
|
|
85093
85168
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85094
85169
|
|
@@ -85101,11 +85176,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85101
85176
|
|
85102
85177
|
var scanner_camera_component_component = normalizeComponent(
|
85103
85178
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85104
|
-
|
85105
|
-
|
85179
|
+
scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_render,
|
85180
|
+
scanner_camera_componentvue_type_template_id_65e6d7b8_scoped_true_staticRenderFns,
|
85106
85181
|
false,
|
85107
85182
|
null,
|
85108
|
-
"
|
85183
|
+
"65e6d7b8",
|
85109
85184
|
null
|
85110
85185
|
|
85111
85186
|
)
|