2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
import{d as j,r as g,s as R,w as W,a as _,$ as K,b as u,c as q,e as s,N as O,g as r,m as d,n as P,v as $,t as C,F as Y,h as Z,f as l,_ as X,a2 as M,B as J,x as w,H as le,Y as ue,j as ee,V as H}from"./index.1c69c7d7.js";import{a as se,b as ae,c as ie,d as ne}from"./index.0e32169e.js";import{b as oe}from"./userArchiveImages.4465f956.js";import{h as Q}from"./filter.77205adc.js";import{s as re}from"./search.51ef8d94.js";import{r as ce}from"./refresh.c5ac1f7b.js";import"./plugin-vue_export-helper.41ffa612.js";const de={class:"detail-shell"},ve={class:"main-col"},pe={key:0,class:"viewer-card"},_e={class:"viewer-card__inner"},me={class:"triptych"},ge=["src"],be={key:1,class:"panel-empty"},fe=["src"],ye={key:1,class:"panel-empty"},he=["src"],ke={key:1,class:"panel-empty"},De={key:1,class:"viewer-card viewer-card--solo"},Ee={class:"single-image-wrapper"},Fe=["src"],Ce={key:2,class:"main-empty main-empty--solo"},Ae={key:3,class:"thumb-section"},Be={class:"thumb-section-head"},we={key:0,class:"thumb-section-active"},Ue={class:"thumb-strip"},xe=["onClick"],Ie={class:"thumb-btn__frame"},Le=["src"],Ne={key:1,class:"thumb-btn__placeholder"},$e={class:"thumb-btn__label"},Ve={class:"side-panel"},Se={class:"side-panel-head"},qe={key:0,class:"side-sub"},ze={key:1,class:"side-time-inline"},Te={class:"side-panel-body"},Re={class:"metric-head"},Me={class:"metric-name"},Pe={class:"metric-num"},je={key:0,class:"side-empty"},Ke=j({__name:"UserArchiveDetailDialog",props:{visible:{type:Boolean,required:!0},archiveId:{type:Number,required:!0}},emits:["update:visible"],setup(V){const D={health_score:"\u8BC4\u5206",mild_abnormality:"\u8272\u7D20",moderate_abnormality:"\u7EA2\u533A",normal_area:"\u80A4\u8272",severe_abnormality:"\u708E\u654F"},U=V,y=g(!1),E=g(null),f=g([]),v=g(""),h=[{color:"#f56c6c",percentage:40},{color:"#e6a23c",percentage:70},{color:"#67c23a",percentage:100}],k=R(()=>f.value.find(i=>i.key===v.value)),x=R(()=>{var p;const i=(p=k.value)==null?void 0:p.angles;return i!=null?i:{left:"",front:"",right:""}}),e=g(""),a=g(""),c=g(""),F=R(()=>!!(e.value||a.value||c.value)),T=R(()=>a.value||e.value||c.value||""),z=R(()=>{var i,p;return(p=(i=E.value)==null?void 0:i.create_time)!=null?p:""}),n=R(()=>{var p;const i=(p=E.value)==null?void 0:p.contents;return!i||typeof i!="object"?[]:Object.entries(i).map(([N,B])=>{const S=Number(B),b=Number.isFinite(S)?Math.min(100,Math.max(0,S)):0;return{key:N,label:D[N]||N,value:String(B!=null?B:"--"),pct:b}})});function o(){const i=x.value;e.value=i.left,a.value=i.front,c.value=i.right}async function I(){var i,p,N;if(!!U.archiveId){y.value=!0;try{const{data:B}=await se({id:U.archiveId}),S=(i=B==null?void 0:B.data)!=null?i:B;E.value=S;const b=oe(S);f.value=b,v.value=(N=(p=b[0])==null?void 0:p.key)!=null?N:"",o()}catch{E.value=null,f.value=[],v.value="",M.error("\u83B7\u53D6\u6863\u6848\u8BE6\u60C5\u5931\u8D25")}finally{y.value=!1}}}function m(){if(!e.value)return;const i=a.value;a.value=e.value,e.value=i}function L(){if(!c.value)return;const i=a.value;a.value=c.value,c.value=i}function G(i){v.value=i,o()}function A(){E.value=null,f.value=[],v.value="",e.value="",a.value="",c.value=""}return W(()=>[U.visible,U.archiveId],([i,p])=>{i&&p&&I()}),(i,p)=>{const N=_("el-progress"),B=_("el-dialog"),S=K("loading");return u(),q(B,{"model-value":V.visible,title:"\u6863\u6848\u8BE6\u60C5",width:"1200",top:"2vh","append-to-body":"","destroy-on-close":"",class:"archive-detail-dialog","onUpdate:modelValue":p[0]||(p[0]=b=>i.$emit("update:visible",b)),onClosed:A},{default:s(()=>[O((u(),r("div",de,[d("div",ve,[F.value?(u(),r("div",pe,[d("div",_e,[d("div",me,[d("div",{class:P(["triptych-panel triptych-side",{"is-empty":!e.value}]),onClick:m,title:"\u4E0E\u4E2D\u95F4\u56FE\u4E92\u6362"},[e.value?(u(),r("img",{key:0,src:e.value,class:"triptych-img triptych-img--side",alt:""},null,8,ge)):(u(),r("span",be,"\u5DE6"))],2),d("div",{class:P(["triptych-panel triptych-center",{"is-empty":!a.value}])},[a.value?(u(),r("img",{key:0,src:a.value,class:"triptych-img triptych-img--center",alt:""},null,8,fe)):(u(),r("span",ye,"\u4E2D"))],2),d("div",{class:P(["triptych-panel triptych-side",{"is-empty":!c.value}]),onClick:L,title:"\u4E0E\u4E2D\u95F4\u56FE\u4E92\u6362"},[c.value?(u(),r("img",{key:0,src:c.value,class:"triptych-img triptych-img--side",alt:""},null,8,he)):(u(),r("span",ke,"\u53F3"))],2)])])])):!y.value&&T.value?(u(),r("div",De,[d("div",Ee,[d("img",{src:T.value,class:"single-image",alt:""},null,8,Fe)])])):y.value?$("v-if",!0):(u(),r("div",Ce,"\u6682\u65E0\u5206\u6790\u56FE")),f.value.length?(u(),r("div",Ae,[d("div",Be,[p[1]||(p[1]=d("span",{class:"thumb-section-title"},"\u6A21\u5F0F\u56FE",-1)),k.value?(u(),r("span",we,C(k.value.label),1)):$("v-if",!0)]),d("div",Ue,[(u(!0),r(Y,null,Z(f.value,b=>(u(),r("button",{key:b.key,type:"button",class:P(["thumb-btn",{active:b.key===v.value}]),onClick:t=>G(b.key)},[d("span",Ie,[b.thumbUrl?(u(),r("img",{key:0,src:b.thumbUrl,alt:""},null,8,Le)):(u(),r("span",Ne,"\u2014"))]),d("span",$e,C(b.label),1)],10,xe))),128))])])):$("v-if",!0)]),d("aside",Ve,[d("div",Se,[p[2]||(p[2]=d("h3",{class:"side-title"},"\u7EFC\u5408\u8BC4\u4F30",-1)),z.value?(u(),r("p",qe,"\u68C0\u6D4B\u65F6\u95F4")):$("v-if",!0),z.value?(u(),r("p",ze,C(z.value),1)):$("v-if",!0)]),d("div",Te,[(u(!0),r(Y,null,Z(n.value,b=>(u(),r("div",{key:b.key,class:"metric-block"},[d("div",Re,[d("span",Me,C(b.label),1),d("span",Pe,C(b.value),1)]),l(N,{percentage:b.pct,color:h,"stroke-width":8,"show-text":!1},null,8,["percentage"])]))),128)),!n.value.length&&!y.value?(u(),r("div",je,"\u6682\u65E0\u8BC4\u4F30\u6570\u636E")):$("v-if",!0)])])])),[[S,y.value]])]),_:1},8,["model-value"])}}});var Oe=X(Ke,[["__scopeId","data-v-7ae818dc"]]);const Ge={key:1},He=j({__name:"UserArchiveDialog",props:{visible:{type:Boolean,required:!0},userId:{type:Number,required:!0}},emits:["update:visible"],setup(V){const D=V,U=g(!1),y=g([]),E=g(0),f=J({page:1,size:10}),v=g(!1),h=g(0);function k(){!D.userId||(U.value=!0,ae({user_id:D.userId,...f}).then(({data:e})=>{var c,F;const a=Array.isArray(e)?e:(F=(c=e==null?void 0:e.data)!=null?c:e==null?void 0:e.list)!=null?F:[];y.value=a,E.value=typeof(e==null?void 0:e.total)=="number"?e.total:a.length}).catch(e=>M.error(e.message||"\u83B7\u53D6\u7528\u6237\u6863\u6848\u5931\u8D25")).finally(()=>U.value=!1))}function x(e){h.value=e.id,v.value=!0}return W(()=>D.visible,e=>{e&&(f.page=1,k())}),(e,a)=>{const c=_("el-image"),F=_("el-table-column"),T=_("el-button"),z=_("el-table"),n=_("pagination"),o=_("el-dialog"),I=K("loading");return u(),r(Y,null,[l(o,{"model-value":V.visible,title:"\u7528\u6237\u6863\u6848",width:"840px","append-to-body":"","destroy-on-close":"","onUpdate:modelValue":a[2]||(a[2]=m=>e.$emit("update:visible",m))},{default:s(()=>[O((u(),q(z,{data:y.value,border:"",stripe:"",style:{width:"100%"}},{default:s(()=>[l(F,{label:"\u56FE\u7247",align:"center",width:"120"},{default:s(({row:m})=>[m.cover?(u(),q(c,{key:0,src:m.cover,"preview-src-list":[m.cover],fit:"cover",class:"dialog-cover","preview-teleported":"","hide-on-click-modal":""},{error:s(()=>[...a[4]||(a[4]=[d("span",{class:"image-slot"},"--",-1)])]),_:1},8,["src","preview-src-list"])):(u(),r("span",Ge,"--"))]),_:1}),l(F,{prop:"create_time",label:"\u65F6\u95F4",align:"center","min-width":"160"}),l(F,{label:"\u64CD\u4F5C",align:"center",width:"100"},{default:s(({row:m})=>[l(T,{type:"primary",link:"",onClick:L=>x(m)},{default:s(()=>[...a[5]||(a[5]=[w("\u8BE6\u60C5",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[I,U.value]]),l(n,{total:E.value,page:f.page,"onUpdate:page":a[0]||(a[0]=m=>f.page=m),limit:f.size,"onUpdate:limit":a[1]||(a[1]=m=>f.size=m),onPagination:k},null,8,["total","page","limit"])]),_:1},8,["model-value"]),l(Oe,{visible:v.value,"onUpdate:visible":a[3]||(a[3]=m=>v.value=m),"archive-id":h.value},null,8,["visible","archive-id"])],64)}}});var Qe=X(He,[["__scopeId","data-v-0faf89eb"]]);const Ye=j({__name:"UserAuthStoreDialog",props:{visible:{type:Boolean,required:!0},userId:{type:Number,required:!0}},emits:["update:visible"],setup(V){const D=V,U={1:"\u6388\u6743\u4E2D",2:"\u5DF2\u8FC7\u671F"},y=g(!1),E=g([]);W(()=>D.visible,v=>{v&&f()});function f(){!D.userId||(y.value=!0,ie({user_id:D.userId}).then(({data:v})=>{E.value=Array.isArray(v)?v:[]}).catch(v=>M.error(v.message||"\u83B7\u53D6\u7528\u6237\u6388\u6743\u95E8\u5E97\u5217\u8868\u5931\u8D25")).finally(()=>y.value=!1))}return(v,h)=>{const k=_("el-table-column"),x=_("el-tag"),e=_("el-table"),a=_("el-dialog"),c=K("loading");return u(),q(a,{"model-value":V.visible,title:"\u7528\u6237\u6388\u6743\u95E8\u5E97\u5217\u8868",width:"940px","append-to-body":"","destroy-on-close":"","onUpdate:modelValue":h[0]||(h[0]=F=>v.$emit("update:visible",F))},{default:s(()=>[O((u(),q(e,{data:E.value,border:"",stripe:"",style:{width:"100%"}},{default:s(()=>[l(k,{prop:"name",label:"\u95E8\u5E97\u540D\u79F0",align:"center"}),l(k,{prop:"user_name",label:"\u7BA1\u7406\u95E8\u5E97\u7684\u7528\u6237\u540D",align:"center"}),l(k,{prop:"user_mobile",label:"\u7535\u8BDD",align:"center"}),l(k,{prop:"district_text",label:"\u5730\u533A",align:"center"}),l(k,{prop:"validity_time",label:"\u6388\u6743\u5230\u671F\u65F6\u95F4",align:"center"}),l(k,{prop:"status",label:"\u72B6\u6001",align:"center"},{default:s(({row:F})=>[l(x,null,{default:s(()=>[w(C(U[F.status]),1)]),_:2},1024)]),_:1})]),_:1},8,["data"])),[[c,y.value]])]),_:1},8,["model-value"])}}});const Je={class:"app-container"},We={key:1},Xe={class:"op-links"},Ze=j({__name:"index",setup(V){const D=J({roleList:!1,roleArchive:!1,roleAuthStore:!1}),U={1:"\u672A\u6CE8\u518C",2:"\u672A\u8FDB\u884C\u4EBA\u8138\u8BC6\u522B",3:"\u672A\u5B8C\u5584\u4FE1\u606F",4:"\u6B63\u5E38"},y=g(!1),E=g(0),f=g([]),v=g(),h=J({page:1,size:10,keyword:""}),k=g(!1),x=g(0),e=g(!1);function a(n){var m,L;if(Array.isArray(n))return{list:n,total:n.length};const o=(L=(m=n==null?void 0:n.list)!=null?m:n==null?void 0:n.data)!=null?L:[],I=Number(n==null?void 0:n.total);return{list:o,total:Number.isFinite(I)?I:o.length}}const c=()=>{y.value=!0,ne(h).then(({data:n})=>{const{list:o,total:I}=a(n);f.value=o,E.value=I}).catch(n=>M.error(n.message||"\u83B7\u53D6\u7528\u6237\u5217\u8868\u5931\u8D25")).finally(()=>y.value=!1)},F=()=>{var n;(n=v.value)==null||n.resetFields(),h.page=1,c()},T=n=>{x.value=n.id,k.value=!0},z=n=>{x.value=n.id,e.value=!0};return le(()=>{if(D.roleList=Q(H.userListId),D.roleArchive=Q(H.userCustomerId),D.roleAuthStore=Q(H.userAuthListId),!D.roleList){M.error("\u6CA1\u6709\u8BBF\u95EE\u6743\u9650");return}c()}),(n,o)=>{const I=_("el-input"),m=_("el-form-item"),L=_("el-button"),G=_("el-form"),A=_("el-table-column"),i=_("el-image"),p=_("el-tag"),N=_("el-table"),B=_("pagination"),S=_("el-card"),b=K("loading");return u(),r("div",Je,[l(S,{class:"box-card"},{default:s(()=>[l(G,{ref_key:"queryFormRef",ref:v,model:h,inline:!0},{default:s(()=>[l(m,{label:"\u5173\u952E\u8BCD",prop:"keyword"},{default:s(()=>[l(I,{modelValue:h.keyword,"onUpdate:modelValue":o[0]||(o[0]=t=>h.keyword=t),placeholder:"\u7528\u6237\u540D/\u6635\u79F0",clearable:"",style:{width:"200px"},onKeyup:ue(c,["enter"])},null,8,["modelValue"])]),_:1}),l(m,null,{default:s(()=>[l(L,{type:"primary",icon:ee(re),onClick:c},{default:s(()=>[...o[5]||(o[5]=[w("\u641C\u7D22",-1)])]),_:1},8,["icon"]),l(L,{icon:ee(ce),onClick:F},{default:s(()=>[...o[6]||(o[6]=[w("\u91CD\u7F6E",-1)])]),_:1},8,["icon"])]),_:1})]),_:1},8,["model"]),O((u(),q(N,{data:f.value,border:"",stripe:"",style:{width:"100%"}},{default:s(()=>[l(A,{prop:"username",label:"\u7528\u6237\u540D/\u6635\u79F0",align:"center"},{default:s(({row:t})=>[w(C(t.username||t.nickname),1)]),_:1}),l(A,{prop:"avatar",label:"\u5934\u50CF",align:"center",width:"80"},{default:s(({row:t})=>[t.avatar?(u(),q(i,{key:0,src:t.avatar,"preview-src-list":[t.avatar],"preview-teleported":"",fit:"cover",class:"avatar-thumb","hide-on-click-modal":""},null,8,["src","preview-src-list"])):(u(),r("span",We,"--"))]),_:1}),l(A,{prop:"district_text",label:"\u5730\u533A",align:"center"},{default:s(({row:t})=>[w(C(t.district_text?t.district_text:"--"),1)]),_:1}),l(A,{prop:"gender_text",label:"\u6027\u522B",align:"center"},{default:s(({row:t})=>[w(C(t.gender_text||"--"),1)]),_:1}),l(A,{prop:"mobile",label:"\u624B\u673A\u53F7",align:"center"},{default:s(({row:t})=>[w(C(t.mobile||"--"),1)]),_:1}),l(A,{label:"\u6388\u6743\u5217\u8868",align:"center"},{default:s(({row:t})=>[D.roleAuthStore?(u(),q(L,{key:0,type:"primary",link:"",onClick:te=>z(t)},{default:s(()=>[...o[7]||(o[7]=[w("\u67E5\u770B",-1)])]),_:1},8,["onClick"])):$("v-if",!0)]),_:1}),l(A,{label:"\u751F\u65E5/\u5E74\u9F84",align:"center"},{default:s(({row:t})=>[d("span",null,C(t.birthday||t.age||"--"),1)]),_:1}),l(A,{prop:"status",label:"\u72B6\u6001",align:"center"},{default:s(({row:t})=>[l(p,null,{default:s(()=>[w(C(U[t.status]),1)]),_:2},1024)]),_:1}),l(A,{prop:"detection_number",label:"\u603B\u68C0\u6D4B\u6B21\u6570",align:"center"},{default:s(({row:t})=>[w(C(t.detection_number||"--"),1)]),_:1}),l(A,{prop:"created_at",label:"\u521B\u5EFA\u65F6\u95F4",align:"center"},{default:s(({row:t})=>[w(C(t.created_at||"--"),1)]),_:1}),l(A,{label:"\u64CD\u4F5C",align:"center",width:"120"},{default:s(({row:t})=>[d("div",Xe,[D.roleArchive?(u(),q(L,{key:0,type:"primary",link:"",onClick:te=>T(t)},{default:s(()=>[...o[8]||(o[8]=[w("\u6863\u6848",-1)])]),_:1},8,["onClick"])):$("v-if",!0)])]),_:1})]),_:1},8,["data"])),[[b,y.value]]),l(B,{total:E.value,page:h.page,"onUpdate:page":o[1]||(o[1]=t=>h.page=t),limit:h.size,"onUpdate:limit":o[2]||(o[2]=t=>h.size=t),onPagination:c},null,8,["total","page","limit"])]),_:1}),$(" \u7528\u6237\u6863\u6848\u5F39\u7A97 "),l(Qe,{visible:k.value,"onUpdate:visible":o[3]||(o[3]=t=>k.value=t),"user-id":x.value},null,8,["visible","user-id"]),$(" \u7528\u6237\u6388\u6743\u95E8\u5E97\u5217\u8868\u5F39\u7A97 "),l(Ye,{visible:e.value,"onUpdate:visible":o[4]||(o[4]=t=>e.value=t),"user-id":x.value},null,8,["visible","user-id"])])}}});var nt=X(Ze,[["__scopeId","data-v-4498f7b0"]]);export{nt as default};
|