Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1d5d91d5c | |||
| 86203f9b4f | |||
| 8950b56476 | |||
| 7e1fc83891 | |||
| 01e79bcf93 | |||
| b0f13bc3f1 |
@@ -17,4 +17,5 @@
|
||||
/package-lock.json
|
||||
/package.json
|
||||
/tsconfig.json
|
||||
/backend/
|
||||
debug.log
|
||||
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
||||
# 1.0.11
|
||||
|
||||
1. 修复网页端无法自动拉起服务端的问题
|
||||
2. 修复批量出库页面 server-host 默认值错误的问题
|
||||
|
||||
# 1.0.10
|
||||
|
||||
1. 查看库存界面新增右键菜单,支持快速跳转到立创商城、查看数据手册等功能
|
||||
2. 在不支持放置器件的页面放置器件新增提示信息
|
||||
3. 修改 README 文档
|
||||
|
||||
# 1.0.9
|
||||
|
||||
1. 修复全在线客户端无法获取器件数据的问题
|
||||
2. 扩展包不再打包服务端源码
|
||||
3. 更新 README 文档
|
||||
|
||||
# 1.0.8
|
||||
|
||||
1. 修复“允许拉起服务端”配置项无效的问题
|
||||
2. 修复网页端无法获取器件数据的问题
|
||||
|
||||
# 1.0.7
|
||||
|
||||
1. 新增“出库自动填充 BOM”选项:开启后,打开出库界面将自动填充 BOM
|
||||
|
||||
24
README.md
24
README.md
@@ -10,14 +10,16 @@ LEYE 电子元器件库存管理系统 EDA 联动扩展
|
||||
|
||||
本扩展允许用户通过立创商城 C 编号、立创商城订单导入元器件,支持从库存内查询、放置器件,支持通过 BOM 批量出库。
|
||||
|
||||
使用本扩展需要在本地安装 [LEYE Service 服务端](https://lrurl.top/LeyeService)(目前仅提供 Windows 版),数据均储存在本地,不会上传。
|
||||
使用本扩展需要在本地安装 [LEYE Service 服务端](https://lrurl.top/LeyeService)(目前仅提供 Windows 版,[服务端开源](https://gitea.miri.site/Mr_Fang/eext-leye/src/branch/master/backend/server.js)),数据均储存在本地,不会上传。
|
||||
|
||||
## [介绍视频](https://www.bilibili.com/video/BV1nvcFzpEuP/)
|
||||
|
||||
https://www.bilibili.com/video/BV1nvcFzpEuP/
|
||||
|
||||
## 如何使用
|
||||
|
||||
安装本扩展后**需要给予扩展外部交互**权限以与服务端交互:
|
||||
|
||||
- V2.2:设置-扩展-扩展管理器-LEYE-允许外部交互;
|
||||
- V3:高级-扩展管理器-已安装-LEYE-配置-允许外部交互。
|
||||
|
||||
@@ -41,13 +43,13 @@ V2.2 用户菜单栏将直接出现“LEYE”选项;V3 用户若未开启“
|
||||
|
||||

|
||||
|
||||
> **Tip: 扫描立创商城二维码导入器件** *V1.0.5+*
|
||||
>
|
||||
> **Tip: 扫描立创商城二维码导入器件** _V1.0.5+_
|
||||
>
|
||||
> 在 V1.0.5 版本以上,可以通过扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。
|
||||
> 
|
||||
|
||||
> **Tip: 使用手机扫码导入器件** *V1.0.6+*
|
||||
>
|
||||
> **Tip: 使用手机扫码导入器件** _V1.0.6+_
|
||||
>
|
||||
> 在 V1.0.6 版本以上,可以在扫码界面选择“WebSocket 远程扫码”,点击“打开摄像头”按钮后用手机扫描二维码即可打开远程端。
|
||||
> 远程端同样支持扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。
|
||||
> 
|
||||
@@ -62,10 +64,13 @@ V2.2 用户菜单栏将直接出现“LEYE”选项;V3 用户若未开启“
|
||||
|
||||
## 配置项说明
|
||||
|
||||
| 配置项 | 说明 | 默认值 |
|
||||
|:-------------|:-----------------------------------------------------------|:-------------------------|
|
||||
| 服务器地址 | LEYE Service 服务器地址 | `http://localhost:21816` |
|
||||
| 允许拉起服务端 | 允许通过 [`leye://open`](leye://open) 拉起本地安装的 LEYE Service 服务端 | `true` |
|
||||
| 配置项 | 说明 | 默认值 |
|
||||
| :--------------- | :----------------------------------------------------------------------- | :----------------------- |
|
||||
| 服务器地址 | LEYE Service 服务器地址 | `http://localhost:21816` |
|
||||
| 允许拉起服务端 | 允许通过 [`leye://open`](leye://open) 拉起本地安装的 LEYE Service 服务端 | `true` |
|
||||
| 出库自动填充 BOM | 打开出库界面自动读取 BOM 并填充 | `false` |
|
||||
| | | |
|
||||
| 自动检查更新 | 允许在启动 EDA 时检查更新 | `true` |
|
||||
|
||||
## 已知问题
|
||||
|
||||
@@ -74,6 +79,7 @@ V2.2 用户菜单栏将直接出现“LEYE”选项;V3 用户若未开启“
|
||||
## 开源许可
|
||||
|
||||
本扩展使用以下开源软件:
|
||||
|
||||
- [SheetJS](https://www.npmjs.com/package/xlsx):Excel 解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权
|
||||
- [jsQR](https://www.npmjs.com/package/jsqr):二维码解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权
|
||||
- [node-qrcode](https://www.npmjs.com/package/qrcode):二维码生成库,使用 [MIT License](https://choosealicense.com/licenses/mit/) 许可协议授权
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"uuid": "944f7c94a8ca485e848f1118effcbb9a",
|
||||
"displayName": "LEYE",
|
||||
"description": "LEYE 电子元器件库存管理系统 EDA 联动扩展",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.11",
|
||||
"publisher": "Mr_Fang",
|
||||
"engines": {
|
||||
"eda": "^3.2.80"
|
||||
|
||||
@@ -651,6 +651,10 @@ video {
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.z-\[100\] {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.order-1 {
|
||||
order: 1;
|
||||
}
|
||||
@@ -688,6 +692,11 @@ video {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.my-1 {
|
||||
margin-top: 0.25rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.mb-1 {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
@@ -983,6 +992,10 @@ video {
|
||||
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.cursor-not-allowed {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1585,6 +1598,11 @@ video {
|
||||
color: rgb(30 64 175 / var(--tw-text-opacity, 1));
|
||||
}
|
||||
|
||||
.text-gray-300 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(209 213 219 / var(--tw-text-opacity, 1));
|
||||
}
|
||||
|
||||
.text-gray-400 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
||||
|
||||
@@ -267,7 +267,9 @@
|
||||
let detail = { name: '-', value: '-', footprint: '-', brand: '-', designatorStr: '手动添加', selected: false };
|
||||
|
||||
if (devs[0]) {
|
||||
const infoRes = await eda.sys_ClientUrl.request('https://client/api/v2/devices/' + devs[0].uuid, 'GET', null, {
|
||||
const EDA_HOST =
|
||||
eda.sys_Environment.isClient() && !eda.sys_Environment.isOnlineMode() ? 'https://client' : 'https://pro.lceda.cn';
|
||||
const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + devs[0].uuid, 'GET', null, {
|
||||
headers: { path: '0819f05c4eef4c71ace90d822a990e87' },
|
||||
});
|
||||
const info = (await infoRes.json()).result;
|
||||
@@ -295,8 +297,8 @@
|
||||
return eda.sys_Message.showToastMessage('请先勾选要出库的器件', ESYS_ToastMessageType.WARNING);
|
||||
}
|
||||
|
||||
const SERVER = (await eda.sys_Storage.getExtensionUserConfig('server-host')) || 'http://localhost:21816';
|
||||
const AUTO_RUN = (await eda.sys_Storage.getExtensionUserConfig('server-auto-run')) || true;
|
||||
const SERVER = (await eda.sys_Storage.getExtensionUserConfig('server-host')) ?? 'http://localhost:21816/api';
|
||||
const AUTO_RUN = (await eda.sys_Storage.getExtensionUserConfig('server-auto-run')) ?? true;
|
||||
let successCount = 0;
|
||||
let failItems = [];
|
||||
|
||||
@@ -304,16 +306,27 @@
|
||||
|
||||
for (const item of selectedItems) {
|
||||
try {
|
||||
let getRes = await eda.sys_ClientUrl.request(`${SERVER}/getLeyeList?lcscId=${item.lcscId}`, 'GET');
|
||||
let getResult = await getRes.json();
|
||||
let getResult;
|
||||
try {
|
||||
const getRes = await eda.sys_ClientUrl.request(`${SERVER}/getLeyeList?lcscId=${item.lcscId}`, 'GET');
|
||||
getResult = await getRes.json();
|
||||
} catch (e) {
|
||||
getResult = { success: false };
|
||||
}
|
||||
|
||||
if (AUTO_RUN && !getResult.success) {
|
||||
window.open('leye://open');
|
||||
for (let i = 0; i < 3 && !getResult.success; i++) {
|
||||
eda.sys_Message.showToastMessage('等待拉起本地服务端...', ESYS_ToastMessageType.INFO);
|
||||
getRes = await eda.sys_ClientUrl.request(`${SERVER}/getLeyeList?lcscId=${item.lcscId}`, 'GET');
|
||||
getResult = await getRes.json();
|
||||
await new Promise((resolve) => setTimeout(resolve, 1500));
|
||||
try {
|
||||
const getRes = await eda.sys_ClientUrl.request(`${SERVER}/getLeyeList?lcscId=${item.lcscId}`, 'GET');
|
||||
getResult = await getRes.json();
|
||||
} catch (e) {
|
||||
getResult = { success: false };
|
||||
}
|
||||
if (!getResult.success) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1500));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1071
iframe/import.html
1071
iframe/import.html
File diff suppressed because it is too large
Load Diff
1175
iframe/newLeye.html
1175
iframe/newLeye.html
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user