mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 13:34:13 +08:00
fixed
This commit is contained in:
parent
0bd2b66a09
commit
ef1a0c8121
1
detect.gui/Embedded/dist/assets/drawer-1e066757.css
vendored
Normal file
1
detect.gui/Embedded/dist/assets/drawer-1e066757.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
detect.gui/Embedded/dist/assets/drawer-20246748.js
vendored
Normal file
1
detect.gui/Embedded/dist/assets/drawer-20246748.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
detect.gui/Embedded/dist/assets/index-dc7c3222.css
vendored
Normal file
1
detect.gui/Embedded/dist/assets/index-dc7c3222.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6
detect.gui/Embedded/dist/assets/index.js
vendored
6
detect.gui/Embedded/dist/assets/index.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
var q=Object.defineProperty;var p=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=(o,s,e)=>s in o?q(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e,i=(o,s)=>{for(var e in s||(s={}))h.call(s,e)&&g(o,e,s[e]);if(p)for(var e of p(s))v.call(s,e)&&g(o,e,s[e]);return o};var w=(o,s)=>{var e={};for(var l in o)h.call(o,l)&&s.indexOf(l)<0&&(e[l]=o[l]);if(o!=null&&p)for(var l of p(o))s.indexOf(l)<0&&v.call(o,l)&&(e[l]=o[l]);return e};var f=(o,s,e)=>new Promise((l,c)=>{var u=r=>{try{n(e.next(r))}catch(m){c(m)}},d=r=>{try{n(e.throw(r))}catch(m){c(m)}},n=r=>r.done?l(r.value):Promise.resolve(r.value).then(u,d);n((e=e.apply(o,s)).next())});import{a as x,B as F}from"./index-8a6826ba.js";import{u as M,B as k}from"./useForm-baba730a.js";import{d as R,f as P,c as W,u as t,Z as H,a4 as L,a5 as X,k as Y,a9 as O}from"./vue-72a104e4.js";import{_ as S}from"./index.js";import"./antd-0679333d.js";import"./useWindowSizeFn-1db11f4f.js";import"./copyTextToClipboard-3ca69a78.js";const U=R({__name:"modal",emits:["success","register"],setup(o,{emit:s}){const e=P(),l=P(!0),c=s,u=W(()=>t(l)?"编辑":"新增"),[d,{closeModal:n,setModalProps:r}]=x(a=>f(this,null,function*(){yield y(),r({confirmLoading:!1}),l.value=!!(a!=null&&a.isUpdate),e.value=a==null?void 0:a.record,yield C(i({},a.record))})),m=[{colProps:{span:24},field:"code",label:"预埋件编号",componentProps:{allowClear:!1,placeholder:"预埋件编号"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入预埋件编号!"}]},{colProps:{span:24},field:"type",label:"类型",componentProps:{allowClear:!1,placeholder:"类型"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入类型!"}]},{colProps:{span:24},field:"x",label:"X(mm)",componentProps:{allowClear:!1,placeholder:"X(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入X(mm)!"}]},{colProps:{span:24},field:"y",label:"Y(mm)",componentProps:{allowClear:!1,placeholder:"Y(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入Y(mm)!"}]},{colProps:{span:24},field:"w",label:"W(mm)",componentProps:{allowClear:!1,placeholder:"W(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入W(mm)!"}]},{colProps:{span:24},field:"h",label:"H(mm)",componentProps:{allowClear:!1,placeholder:"H(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入H(mm)!"}]}],[b,{resetFields:y,setFieldsValue:C,validate:I}]=M({labelWidth:90,schemas:m,showActionButtonGroup:!1});function V(){return f(this,null,function*(){try{const a=yield I();r({confirmLoading:!0});const _=w(a,[]);n();const B=Object.assign({},i(i({},t(e)),_));c("success",B)}catch(a){}finally{r({confirmLoading:!1})}})}return(a,_)=>(H(),L(t(F),O(a.$attrs,{onRegister:t(d),closable:!1,showFooter:"",title:u.value,width:"400px",onOk:V}),{default:X(()=>[Y(t(k),{onRegister:t(b)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const D=S(U,[["__scopeId","data-v-df60aa36"]]);export{D as default};
|
1
detect.gui/Embedded/dist/assets/modal-62c07bbb.js
vendored
Normal file
1
detect.gui/Embedded/dist/assets/modal-62c07bbb.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
var B=Object.defineProperty;var p=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var g=(o,l,e)=>l in o?B(o,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[l]=e,i=(o,l)=>{for(var e in l||(l={}))h.call(l,e)&&g(o,e,l[e]);if(p)for(var e of p(l))P.call(l,e)&&g(o,e,l[e]);return o};var v=(o,l)=>{var e={};for(var s in o)h.call(o,s)&&l.indexOf(s)<0&&(e[s]=o[s]);if(o!=null&&p)for(var s of p(o))l.indexOf(s)<0&&P.call(o,s)&&(e[s]=o[s]);return e};var f=(o,l,e)=>new Promise((s,m)=>{var u=r=>{try{n(e.next(r))}catch(c){m(c)}},d=r=>{try{n(e.throw(r))}catch(c){m(c)}},n=r=>r.done?s(r.value):Promise.resolve(r.value).then(u,d);n((e=e.apply(o,l)).next())});import{a as x,B as F}from"./index-8a6826ba.js";import{u as M,B as k}from"./useForm-baba730a.js";import{d as R,f as w,c as W,u as t,Z as H,a4 as L,a5 as X,k as Y,a9 as O}from"./vue-72a104e4.js";import{_ as S}from"./index.js";import"./antd-0679333d.js";import"./useWindowSizeFn-1db11f4f.js";import"./copyTextToClipboard-3ca69a78.js";const U=R({__name:"modal",emits:["success","register"],setup(o,{emit:l}){const e=w(),s=w(!0),m=l,u=W(()=>t(s)?"编辑":"新增"),[d,{closeModal:n,setModalProps:r}]=x(a=>f(this,null,function*(){yield b(),r({confirmLoading:!1}),s.value=!!(a!=null&&a.isUpdate),e.value=a==null?void 0:a.record,yield y(i({},a.record))})),c=[{colProps:{span:24},field:"code",label:"预埋件编号",componentProps:{allowClear:!1,placeholder:"预埋件编号"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入预埋件编号!"}]},{colProps:{span:24},field:"type",label:"类型",componentProps:{allowClear:!1,placeholder:"类型"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入类型!"}]},{colProps:{span:24},field:"x",label:"X(mm)",componentProps:{allowClear:!1,placeholder:"X(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入X(mm)!"}]},{colProps:{span:24},field:"y",label:"Y(mm)",componentProps:{allowClear:!1,placeholder:"Y(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入Y(mm)!"}]},{colProps:{span:24},field:"w",label:"W(mm)",componentProps:{allowClear:!1,placeholder:"W(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入W(mm)!"}]},{colProps:{span:24},field:"h",label:"H(mm)",componentProps:{allowClear:!1,placeholder:"H(mm)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入H(mm)!"}]},{colProps:{span:24},field:"center",label:"Center(m)",componentProps:{allowClear:!1,placeholder:"Center(m)"},component:"Input",defaultValue:void 0,rules:[{required:!0,message:"请输入Center(m)!"}]}],[C,{resetFields:b,setFieldsValue:y,validate:I}]=M({labelWidth:90,schemas:c,showActionButtonGroup:!1});function V(){return f(this,null,function*(){try{const a=yield I();r({confirmLoading:!0});const _=v(a,[]);n();const q=Object.assign({},i(i({},t(e)),_));m("success",q)}catch(a){}finally{r({confirmLoading:!1})}})}return(a,_)=>(H(),L(t(F),O(a.$attrs,{onRegister:t(d),closable:!1,showFooter:"",title:u.value,width:"400px",onOk:V}),{default:X(()=>[Y(t(k),{onRegister:t(C)},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}});const D=S(U,[["__scopeId","data-v-c3887645"]]);export{D as default};
|
1
detect.gui/Embedded/dist/assets/modal-9fe2831b.css
vendored
Normal file
1
detect.gui/Embedded/dist/assets/modal-9fe2831b.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Unicode;
|
||||
using System.Threading.Tasks;
|
||||
using detect.gui.Models;
|
||||
@ -99,7 +100,10 @@ public class OCRService
|
||||
d.Index = index;
|
||||
return d;
|
||||
}).ToList();
|
||||
var tempList = resultList.Where(d => !string.IsNullOrEmpty(d.Text) && d.Text.ToUpper().Contains("PT"))
|
||||
var tempList = resultList.Where(d => !string.IsNullOrEmpty(d.Text) &&
|
||||
(d.Text.ToUpper().Contains("PT") ||
|
||||
d.Text.ToUpper().Contains("VBP") ||
|
||||
d.Text.ToUpper().Contains("BSC")))
|
||||
.ToList();
|
||||
var data = new List<dynamic>();
|
||||
foreach (var item in tempList)
|
||||
@ -110,32 +114,32 @@ public class OCRService
|
||||
var h = "0";
|
||||
var type = ReplaceChars(resultList[item.Index + 1].Text);
|
||||
if (string.IsNullOrWhiteSpace(type)) continue;
|
||||
if (type.Contains('P', StringComparison.CurrentCultureIgnoreCase) && type.Contains('L', StringComparison.CurrentCultureIgnoreCase))
|
||||
// if (type.Contains('P', StringComparison.CurrentCultureIgnoreCase) && type.Contains('L', StringComparison.CurrentCultureIgnoreCase))
|
||||
// {
|
||||
type = Regex.Replace(type, "[A-Z]", string.Empty);
|
||||
if (type.Contains('-', StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
type = type.Replace("P", string.Empty);
|
||||
type = type.Replace("L", string.Empty);
|
||||
if (type.Contains('-', StringComparison.CurrentCultureIgnoreCase))
|
||||
type = type.Split("-")[0];
|
||||
if (type.Contains('x', StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
type = type.Split("-")[0];
|
||||
if (type.Contains('x', StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
w = type.Split("x")[1];
|
||||
h = type.Split("x")[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
w = type;
|
||||
h = type;
|
||||
}
|
||||
w = type.Split("x")[1];
|
||||
h = type.Split("x")[0];
|
||||
}
|
||||
else
|
||||
continue;
|
||||
{
|
||||
w = type;
|
||||
h = type;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
w = type.Split("x")[1];
|
||||
h = type.Split("x")[0];
|
||||
}
|
||||
continue;
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// w = type.Split("x")[1];
|
||||
// h = type.Split("x")[0];
|
||||
// }
|
||||
data.Add(new
|
||||
{
|
||||
code = ReplaceChars(resultList[item.Index].Text),
|
||||
|
Loading…
Reference in New Issue
Block a user