ocr-detail-4302e651.js 12 KB

1
  1. import{b as P,R as J,x as Q,j as M,_ as V,s as U,E as W,w as X,p as Y,al as Z,O as ee,ai as te}from"./zh-cn-49aa125c.js";import{O as se,j as le,k as oe,v as ae}from"./Header-84dbe716.js";import{d as F,r as O,N as ne,o as q,x as p,l as u,L as K,J as S,q as h,G as re,p as t,A as T,s as B,Q as ie,t as w,h as de,_ as pe,k as ue,u as fe,c as j,w as be,a3 as me,g as D,B as v,y as L,F as $,z as x,i as ce}from"./app-4609564c.js";import{R as H}from"./request-415f0ddb.js";const z=Symbol("breadcrumbKey"),ge=P({separator:{type:String,default:"/"},separatorIcon:{type:J}}),ve=F({name:"ElBreadcrumb"}),xe=F({...ve,props:ge,setup(a){const e=a,{t:A}=Q(),E=M("breadcrumb"),g=O();return ne(z,e),q(()=>{const b=g.value.querySelectorAll(".".concat(E.e("item")));b.length&&b[b.length-1].setAttribute("aria-current","page")}),(b,k)=>(p(),u("div",{ref_key:"breadcrumb",ref:g,class:S(h(E).b()),"aria-label":h(A)("el.breadcrumb.label"),role:"navigation"},[K(b.$slots,"default")],10,["aria-label"]))}});var we=V(xe,[["__file","breadcrumb.vue"]]);const he=P({to:{type:U([String,Object]),default:""},replace:Boolean}),_e=F({name:"ElBreadcrumbItem"}),Ae=F({..._e,props:he,setup(a){const e=a,A=de(),E=re(z,void 0),g=M("breadcrumb"),b=A.appContext.config.globalProperties.$router,k=O(),I=()=>{!e.to||!b||(e.replace?b.replace(e.to):b.push(e.to))};return(R,C)=>{var N,l;return p(),u("span",{class:S(h(g).e("item"))},[t("span",{ref_key:"link",ref:k,class:S([h(g).e("inner"),h(g).is("link",!!R.to)]),role:"link",onClick:I},[K(R.$slots,"default")],2),(N=h(E))!=null&&N.separatorIcon?(p(),T(h(W),{key:0,class:S(h(g).e("separator"))},{default:B(()=>[(p(),T(ie(h(E).separatorIcon)))]),_:1},8,["class"])):(p(),u("span",{key:1,class:S(h(g).e("separator")),role:"presentation"},w((l=h(E))==null?void 0:l.separator),3))],2)}}});var G=V(Ae,[["__file","breadcrumb-item.vue"]]);const Ee=X(we,{BreadcrumbItem:G}),ye=Y(G);const De=F({name:"OCRDetail",components:{OCRHeader:se},setup(){const a=ue(),e=fe(),A=j(()=>a.query.id),E=a.fullPath;function g(l,n){const y=l.length,_=n.length,f=Array(y+1).fill(null).map(()=>Array(_+1).fill(0));for(let m=0;m<=y;m++)for(let c=0;c<=_;c++)m===0?f[m][c]=c:c===0?f[m][c]=m:l[m-1]===n[c-1]?f[m][c]=f[m-1][c-1]:f[m][c]=1+Math.min(f[m-1][c],f[m][c-1],f[m-1][c-1]);const i='<svg class="diff-str" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6a1 1 0 0 0-1 1v4a1 1 0 0 1-1 1H7.41l1.3-1.29a1 1 0 0 0-1.42-1.42l-3 3a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l3 3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L7.41 14H17a3 3 0 0 0 3-3V7a1 1 0 0 0-1-1"/></svg><br/>';let r="",d="",o=y,s=_;for(;o>0||s>0;)o>1&&s>1&&l[o-2]==="\r"&&l[o-1]==="\n"&&n[s-2]==="\r"&&n[s-1]==="\n"?(r=i+r,d=i+d,o-=2,s-=2):o>0&&s>0&&l[o-1]===n[s-1]?(r=l[o-1]==="\r"||l[o-1]==="\n"?i:l[o-1]+r,d=n[s-1]==="\r"||n[s-1]==="\n"?i:n[s-1]+d,o--,s--):o>0&&(s===0||f[o][s]===f[o-1][s]+1)?(l[o-1]===" "?r='<span class="diff-str diff-empty">'.concat(l[o-1],"</span>")+r:o>1&&l[o-2]==="\r"&&l[o-1]==="\n"?(r=i+r,o-=1):l[o-1]==="\n"||l[o-1]==="\r"?r=i+r:r='<span class="diff-str">'.concat(l[o-1],"</span>")+r,o--):s>0&&(o===0||f[o][s]===f[o][s-1]+1)?(n[s-1]===" "?d='<span class="diff-str diff-empty">'.concat(n[s-1],"</span>")+d:s>1&&n[s-2]==="\r"&&n[s-1]==="\n"?(d=i+d,s-=1):n[s-1]==="\n"||n[s-1]==="\r"?d=i+d:d='<span class="diff-str">'.concat(n[s-1],"</span>")+d,s--):o>0&&s>0&&f[o][s]===f[o-1][s-1]+1&&(r=l[o-1]==="\r"||l[o-1]==="\n"?i:l[o-1]+r,n[s-1]===" "?d='<span class="diff-str diff-empty">'.concat(n[s-1],"</span>")+d:s>1&&n[s-2]==="\r"&&n[s-1]==="\n"?(d=i+d,s-=1):n[s-1]==="\n"||n[s-1]==="\r"?d=i+d:d='<span class="diff-str">'.concat(n[s-1],"</span>")+d,o--,s--);return{highlightedStr1:r,highlightedStr2:d}}const b=O({}),k=O([]),I=l=>{H.post("/show",{id:l}).then(n=>{b.value=n.data.records}),H.post("/history",{id:l},{notLoading:!0}).then(n=>{k.value=n.data.records})},R=j(()=>{const l=b.value.data_set||{},n=["纤维成分","保养说明","温馨提示"],y={};return Object.keys(l).forEach(_=>{n.includes(_)||(y[_]=l[_])}),y});return q(()=>{I(A.value)}),be(()=>a.query.id,l=>{I(l)}),{locale:Z,redirect:E,ArrowRight:ee,highlightDifferences:g,detailInfo:b,listData:k,id:A,rowClassName:({row:l})=>l.id===+A.value?"row-current":"",rowClick:l=>{l.id!==+A.value&&e.replace("/ocr-detail?id=".concat(l.id))},dataSet:R}}}),ke={class:"py-8 px-[90px]"},Ie={class:"flex items-stretch mt-8"},Ce={class:"bg-[#F8F6F6] relative flex-1 mr-[56px] pt-9 px-12 pb-12 flex"},$e={class:"flex-1 mr-14"},Be=["src"],Re={class:"flex-1"},Se=["src"],Ne={class:"bg-[#F8F6F6] relative w-[520px] max-w-[40%] flex-shrink-0 pt-8"},Fe={class:"mt-[30px] text-sm/[24px] text-center"},Le={class:"w-[105px] font-semibold text-[#1A1A1A] border-r-[1px] border-[#D8D8D8] p-[9px]"},Oe=["innerHTML"],Te=["innerHTML"],je={class:"pt-6 px-10 pb-[30px] bg-[#F8F6F6]"},He={class:"grid grid-cols-4 2xl:grid-cols-5 gap-1.5 text-[#3D3D3D] text-base/[30px]"},Pe={class:"font-semibold"},Me={key:0,class:"col-span-4 2xl:col-span-5"},Ve={key:1,class:"col-span-4 2xl:col-span-5"},qe={key:2,class:"col-span-4 2xl:col-span-5"},Ke={class:"font-medium text-[#3D3D3D] text-base/[30px]"},ze={class:"font-semibold"},Ge={class:"font-medium text-[#3D3D3D] text-base/[30px]"},Je={class:"font-semibold"},Qe={key:0},Ue={key:1,class:"text-[#EA0000]"};function We(a,e,A,E,g,b){const k=me("OCRHeader"),I=ye,R=Ee,C=le,N=oe,l=te,n=ae;return p(),T(l,{locale:a.locale},{default:B(()=>{var y,_,f;return[D(k,{redirect:a.redirect},null,8,["redirect"]),t("div",ke,[D(R,{"separator-icon":a.ArrowRight},{default:B(()=>[D(I,{to:{path:"/ocr-home"}},{default:B(()=>e[0]||(e[0]=[v("列表页")])),_:1}),D(I,null,{default:B(()=>e[1]||(e[1]=[v("识别信息页")])),_:1})]),_:1},8,["separator-icon"]),e[30]||(e[30]=t("div",{class:"flex items-center mt-7"},[t("div",{class:"bg-[#AE8877] w-1.5 h-5 mr-3"}),t("div",{class:"font-semibold text-lg/[22px]"},"识别情况")],-1)),t("div",Ie,[t("div",Ce,[e[4]||(e[4]=t("div",{class:"absolute w-[30px] h-1 -top-0.5 -left-0.5 bg-[#AE8877] rounded-r-full"},null,-1)),e[5]||(e[5]=t("div",{class:"absolute w-1 h-[30px] -top-0.5 -left-0.5 bg-[#AE8877] rounded-b-full"},null,-1)),e[6]||(e[6]=t("div",{class:"absolute w-[30px] h-1 -top-0.5 -right-0.5 bg-[#AE8877] rounded-l-full"},null,-1)),e[7]||(e[7]=t("div",{class:"absolute w-1 h-[30px] -top-0.5 -right-0.5 bg-[#AE8877] rounded-b-full"},null,-1)),e[8]||(e[8]=t("div",{class:"absolute w-[30px] h-1 -bottom-0.5 -left-0.5 bg-[#AE8877] rounded-r-full"},null,-1)),e[9]||(e[9]=t("div",{class:"absolute w-1 h-[30px] -bottom-0.5 -left-0.5 bg-[#AE8877] rounded-t-full"},null,-1)),e[10]||(e[10]=t("div",{class:"absolute w-[30px] h-1 -bottom-0.5 -right-0.5 bg-[#AE8877] rounded-l-full"},null,-1)),e[11]||(e[11]=t("div",{class:"absolute w-1 h-[30px] -bottom-0.5 -right-0.5 bg-[#AE8877] rounded-t-full"},null,-1)),t("div",$e,[e[2]||(e[2]=t("div",{class:"text-2xl/[24px] font-semibold text-center mb-[26px]"},"原图",-1)),t("img",{class:"w-full",src:a.detailInfo.regular_image,alt:""},null,8,Be)]),t("div",Re,[e[3]||(e[3]=t("div",{class:"text-2xl/[24px] font-semibold text-center mb-[26px]"},"对比图",-1)),t("img",{class:"w-full",src:a.detailInfo.ocr_image,alt:""},null,8,Se)])]),t("div",Ne,[e[13]||(e[13]=t("div",{class:"absolute w-[30px] h-1 -top-0.5 -left-0.5 bg-[#AE8877] rounded-r-full"},null,-1)),e[14]||(e[14]=t("div",{class:"absolute w-1 h-[30px] -top-0.5 -left-0.5 bg-[#AE8877] rounded-b-full"},null,-1)),e[15]||(e[15]=t("div",{class:"absolute w-[30px] h-1 -top-0.5 -right-0.5 bg-[#AE8877] rounded-l-full"},null,-1)),e[16]||(e[16]=t("div",{class:"absolute w-1 h-[30px] -top-0.5 -right-0.5 bg-[#AE8877] rounded-b-full"},null,-1)),e[17]||(e[17]=t("div",{class:"absolute w-[30px] h-1 -bottom-0.5 -left-0.5 bg-[#AE8877] rounded-r-full"},null,-1)),e[18]||(e[18]=t("div",{class:"absolute w-1 h-[30px] -bottom-0.5 -left-0.5 bg-[#AE8877] rounded-t-full"},null,-1)),e[19]||(e[19]=t("div",{class:"absolute w-[30px] h-1 -bottom-0.5 -right-0.5 bg-[#AE8877] rounded-l-full"},null,-1)),e[20]||(e[20]=t("div",{class:"absolute w-1 h-[30px] -bottom-0.5 -right-0.5 bg-[#AE8877] rounded-t-full"},null,-1)),e[21]||(e[21]=t("div",{class:"text-lg/[24px] px-9 font-semibold"},"不匹配的内容点",-1)),t("div",Fe,[e[12]||(e[12]=t("div",{class:"flex font-semibold text-white bg-[#AE8877]"},[t("div",{class:"w-[105px] border-r-[1px] border-[#D8D8D8] p-[9px]"},"对照物"),t("div",{class:"flex-1 w-[209px] text-center border-r-[1px] border-[#D8D8D8] p-[9px]"}," 原图 "),t("div",{class:"flex-1 w-[206px] text-center p-[9px]"},"对比图")],-1)),(p(!0),u($,null,L(a.detailInfo.logs,(i,r)=>(p(),u("div",{class:S(["flex",{"bg-[#F0EBE8]":r%2===1}]),key:r},[t("div",Le,w(i.name),1),t("div",{class:"flex-1 w-[209px] text-center diff-original text-[#1A1A1A] border-r-[1px] border-[#D8D8D8] p-[9px]",innerHTML:a.highlightDifferences(i.value[1],i.value[0]).highlightedStr1},null,8,Oe),t("div",{class:"flex-1 text-center text-[#1A1A1A] p-[9px]",innerHTML:a.highlightDifferences(i.value[1],i.value[0]).highlightedStr2},null,8,Te)],2))),128))])])]),e[31]||(e[31]=t("div",{class:"flex items-center mt-14 mb-8"},[t("div",{class:"bg-[#AE8877] w-1.5 h-5 mr-3"}),t("div",{class:"font-semibold text-lg/[22px]"},"资料存储")],-1)),t("div",je,[e[27]||(e[27]=t("p",{class:"mb-1.5 text-[#AE8877] font-semibold text-base/[20px]"},"吊洗资料",-1)),t("div",He,[(p(!0),u($,null,L(a.dataSet,(i,r)=>(p(),u("div",{class:"col-span-1",key:r},[t("span",Pe,w(r)+":",1),v(w(i),1)]))),128)),(y=a.detailInfo.data_set)!=null&&y.纤维成分?(p(),u("div",Me,[e[22]||(e[22]=t("span",{class:"font-semibold"},"纤维成分:",-1)),v(w(a.detailInfo.data_set.纤维成分),1)])):x("v-if",!0),(_=a.detailInfo.data_set)!=null&&_.保养说明?(p(),u("div",Ve,[e[23]||(e[23]=t("span",{class:"font-semibold"},"保养说明:",-1)),v(w(a.detailInfo.data_set.保养说明),1)])):x("v-if",!0),(f=a.detailInfo.data_set)!=null&&f.温馨提示?(p(),u("div",qe,[e[24]||(e[24]=t("span",{class:"font-semibold"},"温馨提示:",-1)),v(w(a.detailInfo.data_set.温馨提示),1)])):x("v-if",!0),x(" 根据需要添加更多行 ")]),e[28]||(e[28]=t("p",{class:"mt-6 mb-1.5 text-[#AE8877] font-semibold text-base/[20px]"},"吊洗号型",-1)),t("p",Ke,[e[26]||(e[26]=t("span",{class:"font-semibold"},"号型:",-1)),a.detailInfo.name_set?(p(!0),u($,{key:0},L(a.detailInfo.name_set,(i,r,d)=>(p(),u("span",{key:r},[r!=="号型"?(p(),u($,{key:0},[t("span",ze,w(r),1),e[25]||(e[25]=v(": "))],64)):x("v-if",!0),v(w(i)+" ",1),d!==Object.keys(a.detailInfo.name_set).length-1?(p(),u($,{key:1},[v(", ")],64)):x("v-if",!0)]))),128)):x("v-if",!0)]),e[29]||(e[29]=t("p",{class:"mt-6 mb-1.5 text-[#AE8877] font-semibold text-base/[20px]"},"R7颜色档案",-1)),t("p",Ge,[a.detailInfo.color_set?(p(!0),u($,{key:0},L(a.detailInfo.color_set,(i,r,d)=>(p(),u("span",{key:r},[t("span",Je,w(r),1),v(": "+w(i)+" ",1),d!==Object.keys(a.detailInfo.color_set).length-1?(p(),u($,{key:0},[v(", ")],64)):x("v-if",!0)]))),128)):x("v-if",!0)])]),e[32]||(e[32]=t("div",{class:"flex items-center mt-[33px] mb-9"},[t("div",{class:"bg-[#AE8877] w-1.5 h-5 mr-3"}),t("div",{class:"font-semibold text-lg/[22px]"},"历史记录")],-1)),ce((p(),T(N,{data:a.listData,"row-class-name":a.rowClassName,onRowClick:a.rowClick},{default:B(()=>[D(C,{type:"index",label:"序号",width:"64",align:"center"}),D(C,{prop:"matio_id",label:"制单号","min-width":"88",align:"center"}),D(C,{label:"差异情况","min-width":"88",align:"center"},{default:B(i=>[i.row.difference==0?(p(),u("span",Qe,"匹配")):x("v-if",!0),i.row.difference==1?(p(),u("span",Ue,"不匹配")):x("v-if",!0)]),_:1}),D(C,{prop:"upload_time",label:"原图上传时间","min-width":"88",align:"center"}),D(C,{prop:"ocr_time",label:"比对上传时间","min-width":"103",align:"center"})]),_:1},8,["data","row-class-name","onRowClick"])),[[n,a.loading]])])]}),_:1},8,["locale"])}const tt=pe(De,[["render",We],["__scopeId","data-v-67a290bc"],["__file","D:/Alushixing/2023/goelia-ocr/src/pages/ocr-detail.vue"]]);export{tt as default};