/
home
/
maktab
/
pwa
/
assets
/
File Upload :
llllll
Current File: /home/maktab/pwa/assets/PersonDetails-XQOSXvHV.js
import{_ as B}from"./default_image-CeKJn11X.js";import{_ as oe}from"./NavBar.vue_vue_type_script_setup_true_lang-BAUF_Ch3.js";import{d as ae,r as i,a as le,g as y,C as ne,m as ie,c as _,b as e,e as s,w as r,y as c,f,_ as k,h as R,F as ce,t as re,I as u,q as de,x as v,u as ue,o}from"./index-CGBJY8Ax.js";import{i as _e,j as ve}from"./service-DdjIqCDx.js";import{u as fe}from"./date-pzdMIOn9.js";import"./index-CSvkn5yh.js";const me={class:"bg-header"},pe=e("div",{class:"bg-header-src h-32 w-full absolute"},null,-1),he={class:"z-50 relative"},ge={class:"flex justify-center pt-3"},xe=["src"],ye={key:1,class:"rounded-full w-16 h-16",src:B,alt:""},be={class:"text-center mt-2 text-lg font-medium text-primary pb-5"},we={dir:"ltr",class:"mt-2 w-full bg-white max-w-3xl rounded-t-2xl overflow-y-auto max-h-[35rem]"},Ce={dir:"ltr",class:"bg-gray-200 rounded-2xl mx-auto w-11/12 h-36"},ke={class:"grid grid-cols-2 gap-2 p-4"},je={class:"my-auto"},Se={class:"flex"},Fe=e("span",{class:"pr-2"},"5",-1),Oe={class:"flex"},Pe=e("span",{class:"pr-2"},"4",-1),Ie={class:"flex"},De=e("span",{class:"pr-2"},"3",-1),$e={class:"flex"},Re=e("span",{class:"pr-2"},"2",-1),Be={class:"flex"},Le=e("span",{class:"pr-2"},"1",-1),We={class:"my-auto"},qe={class:"text-right text-3xl text-[#fa8530]"},Ae={class:"flex justify-end"},Ke={class:"flex justify-end pt-2 gap-1"},Me=e("div",{class:"text-right text-xs font-thin"}," امتیاز ",-1),Ne={class:"text-right text-xs font-thin"},Te={dir:"rtl",class:"p-4 divide-dashed divide-y divide-gray-200 mb-16"},Ve={class:"flex gap-2 py-2"},Ue={class:""},ze=["src"],Ee={key:1,class:"rounded-full w-11 h-11",src:B,alt:""},Ge={class:"flex-1"},He={class:"grid grid-flow-row gap-2"},Je={class:"flex justify-between"},Qe={class:""},Xe={class:"flex"},Ye={class:"text-gray-800"},Ze={class:"fixed bottom-20 pl-6"},et={dir:"rtl"},tt=e("p",{class:"font-bold pb-4"},"ثبت نظر جدید",-1),st={key:0,class:"flex justify-between py-4 px-2"},ot=e("span",{class:"text-center"},"5",-1),at=e("span",{class:"text-center"},"4",-1),lt=e("span",{class:"text-center"},"3",-1),nt=e("span",{class:"text-center"},"2",-1),it=e("span",{class:"text-center"},"1",-1),ct=["src"],rt={key:1,class:"rounded-xl mx-auto w-11/12 h-52",src:B,alt:""},dt={dir:"rtl",class:"mx-4 pb-10"},ut={class:"flex justify-between mt-4 p-1"},_t=e("div",null,"شغل:",-1),vt={class:"font-semibold text-gray-900"},ft={class:"flex justify-between mt-4 p-1 bg-gray-200 rounded-md"},mt=e("div",null,"عنوان محل کار:",-1),pt={class:"font-semibold text-gray-900"},ht={class:"flex justify-between mt-4 p-1"},gt=e("div",null,"تلفن محل کار:",-1),xt={class:"font-semibold text-gray-900"},yt={class:"grid grid-cols-3 justify-between mt-4 p-1 bg-gray-200 rounded-md"},bt=e("div",{class:"col-span-1"},"آدرس محل کار:",-1),wt={class:"col-span-2 font-semibold text-gray-900 text-left"},Ct={dir:"rtl",class:"px-4 pb-10"},kt={class:"flex justify-between mt-4 p-1"},jt=e("div",null,"نام و نام خانوادگی:",-1),St={class:"font-semibold text-gray-900"},Ft={class:"flex justify-between mt-4 p-1 bg-gray-200 rounded-md"},Ot=e("div",null,"شماره موبایل",-1),Pt={class:"font-semibold text-gray-900"},It={class:"flex justify-between mt-4 p-1"},Dt=e("div",null,"تاریخ تولد:",-1),$t={class:"font-semibold text-gray-900"},Rt={class:"flex justify-between mt-4 p-1 bg-gray-200 rounded-md"},Bt=e("div",null,"تحصیلات:",-1),Lt={class:"font-semibold text-gray-900"},Wt={class:"flex justify-between mt-4 p-1"},qt=e("div",null,"توضیحات:",-1),At={class:"font-semibold text-gray-900"},Et=ae({__name:"PersonDetails",setup(Kt){const L=i("1"),h=i(!1),d=i(0),n=i([]),q=le({filters:[],limit:60,page:0}),b=i([]),j=i(!1),g=i(0),S=i(0),p=i(0),w=i(0),F=i([]),O=i();i([]);const P=i([]),C=i({subject:"",body:"",pol_user_id:y.currentRoute.value.params.id});function A(){h.value=!0}function K(){h.value=!1}function M(){d.value=1}function N(){d.value=2}function T(){d.value=3}function V(){d.value=4}function U(){d.value=5}async function z(){const{data:a}=await k.get("api/score/set");O.value=a[0],console.log(O.value,"scoreID")}async function E(){const{data:a}=await _e(y.currentRoute.value.params.id);g.value=a.score/a.count_score,S.value=g.value-Math.floor(g.value),n.value=a,w.value=a.count_score,console.log(w.value,"countScore"),S.value<.5?p.value=Math.floor(g.value):S.value>=.5?p.value=Math.floor(g.value)+.5:p.value=0,console.log(n.value,"popopo"),console.log(p.value,"averageRound")}async function G(){const{data:a}=await ve(Object.assign(q,{pol_user_id:y.currentRoute.value.params.id}));b.value.push(...a.rows),a.query.total,console.log(b.value,"listComment"),b.value.forEach(t=>P.value.push(t.user_id)),console.log(P.value,"commentId")}function I(){return P.value.includes(O.value)}async function H(){const{data:a}=await k.get(`api/score/query/${y.currentRoute.value.params.id}`);F.value=a,console.log(F.value,"scoreList")}function x(a){const t=F.value.find(m=>m.score===a);return t?t.count*100/w.value:0}const J=ne(()=>y.currentRoute.value.params.id);async function Q(){const a={pol_user_id:J.value,score:d.value},{data:t}=await k.post("api/score",a)}async function X(){try{j.value=!0;const{data:a}=await k.post("api/comment",C.value);I()===!1&&await Q(),h.value=!1}catch{}finally{j.value=!1}}return ie(async()=>{await E(),await G(),await H(),await z(),I()}),(a,t)=>{const m=f("a-progress"),Y=f("a-rate"),Z=f("a-textarea"),D=f("a-form-item"),W=f("a-button"),ee=f("a-form"),te=f("a-drawer"),$=f("a-tab-pane"),se=f("a-tabs");return o(),_("div",me,[pe,e("div",he,[s(oe,{dir:"rtl"},{Title:r(()=>[R(" جزییات شخص ")]),_:1})]),e("div",ge,[e("div",null,[n.value.file?(o(),_("img",{key:0,class:"rounded-full w-16 h-16 object-cover border-white border-solid border-2",src:n.value.file.full_src,alt:""},null,8,xe)):(o(),_("img",ye))])]),e("div",be,c(n.value.name),1),e("div",we,[s(se,{activeKey:L.value,"onUpdate:activeKey":t[8]||(t[8]=l=>L.value=l),centered:"",tabBarGutter:"70px"},{default:r(()=>[s($,{tab:"نظرات",key:"3"},{default:r(()=>[e("div",Ce,[e("div",ke,[e("div",je,[e("div",Se,[Fe,s(m,{strokeWidth:"2",strokeColor:"#fa8530",trailColor:"#C1C3C1",percent:x(5),"show-info":!1},null,8,["percent"])]),e("div",Oe,[Pe,s(m,{strokeWidth:"2",strokeColor:"#fa8530",trailColor:"#C1C3C1",percent:x(4),"show-info":!1},null,8,["percent"])]),e("div",Ie,[De,s(m,{strokeWidth:"2",strokeColor:"#fa8530",trailColor:"#C1C3C1",percent:x(3),"show-info":!1},null,8,["percent"])]),e("div",$e,[Re,s(m,{strokeWidth:"2",strokeColor:"#fa8530",trailColor:"#C1C3C1",percent:x(2),"show-info":!1},null,8,["percent"])]),e("div",Be,[Le,s(m,{strokeWidth:"2",strokeColor:"#fa8530",trailColor:"#C1C3C1",percent:x(1),"show-info":!1},null,8,["percent"])])]),e("div",We,[e("div",qe,c(p.value),1),e("div",Ae,[s(Y,{value:p.value,"allow-half":"",disabled:"",style:{color:"#fa8530"}},null,8,["value"])]),e("div",Ke,[Me,e("div",Ne,c(w.value),1)])])])]),e("div",Te,[(o(!0),_(ce,null,re(b.value,l=>(o(),_("div",Ve,[e("div",Ue,[l.owner.file?(o(),_("img",{key:0,class:"rounded-full w-11 h-11 object-cover",src:l.owner.file.full_src,alt:""},null,8,ze)):(o(),_("img",Ee))]),e("div",Ge,[e("div",He,[e("div",Je,[e("div",null,c(l.owner.name),1),e("div",Qe,c(l.caj),1)]),e("div",Xe,[e("div",Ye,c(l.body),1)])])])]))),256))]),e("div",Ze,[s(u,{onClick:t[0]||(t[0]=l=>A()),class:"text-white shadow shadow-primary rounded-xl",icon:"vuesax-linear:addFrame"})]),s(te,{visible:h.value,"onUpdate:visible":t[7]||(t[7]=l=>h.value=l),placement:"bottom",closable:!1,height:"460"},{default:r(()=>[e("div",et,[tt,I()===!1?(o(),_("div",st,[e("div",{onClick:t[1]||(t[1]=l=>U()),class:"flex flex-col gap-2 listPols-center"},[d.value===5?(o(),v(u,{key:0,class:"text-orange",icon:"vuesax-linear:starOrangeFill"})):(o(),v(u,{key:1,class:"text-orange",icon:"vuesax-linear:starOrange"})),ot]),e("div",{onClick:t[2]||(t[2]=l=>V()),class:"flex flex-col gap-2 listPols-center"},[d.value>=4?(o(),v(u,{key:0,class:"text-orange",icon:"vuesax-linear:starOrangeFill"})):(o(),v(u,{key:1,class:"text-orange",icon:"vuesax-linear:starOrange"})),at]),e("div",{onClick:t[3]||(t[3]=l=>T()),class:"flex flex-col gap-2 listPols-center"},[d.value>=3?(o(),v(u,{key:0,class:"text-orange",icon:"vuesax-linear:starOrangeFill"})):(o(),v(u,{key:1,class:"text-orange",icon:"vuesax-linear:starOrange"})),lt]),e("div",{onClick:t[4]||(t[4]=l=>N()),class:"flex flex-col gap-2 listPols-center"},[d.value>=2?(o(),v(u,{key:0,class:"text-orange",icon:"vuesax-linear:starOrangeFill"})):(o(),v(u,{key:1,class:"text-orange",icon:"vuesax-linear:starOrange"})),nt]),e("div",{onClick:t[5]||(t[5]=l=>M()),class:"flex flex-col gap-2 listPols-center"},[d.value>=1?(o(),v(u,{key:0,class:"text-orange",icon:"vuesax-linear:starOrangeFill"})):(o(),v(u,{key:1,class:"text-orange",icon:"vuesax-linear:starOrange"})),it])])):de("",!0),s(ee,{model:C.value,name:"basic",autocomplete:"off",onFinish:X,layout:"vertical"},{default:r(()=>[s(D,{label:"نظر",name:"body",rules:[{required:!1,message:"Please input your username!"}]},{default:r(()=>[s(Z,{value:C.value.body,"onUpdate:value":t[6]||(t[6]=l=>C.value.body=l),placeholder:"نظر خود را وارد کنید",size:"large"},null,8,["value"])]),_:1}),s(D,null,{default:r(()=>[s(W,{class:"w-full bg-primary",type:"primary","html-type":"submit",loading:j.value},{default:r(()=>[R("ثبت لیست")]),_:1},8,["loading"])]),_:1}),s(D,null,{default:r(()=>[s(W,{onClick:K,class:"w-full"},{default:r(()=>[R("انصراف")]),_:1})]),_:1})]),_:1},8,["model"])])]),_:1},8,["visible"])]),_:1}),s($,{tab:"محل کار",key:"2"},{default:r(()=>[e("div",null,[n.value.file_work?(o(),_("img",{key:0,class:"rounded-xl mx-auto w-11/12 h-52 object-cover",src:n.value.file_work.full_src,alt:""},null,8,ct)):(o(),_("img",rt))]),e("div",dt,[e("div",ut,[_t,e("div",vt,c(n.value.job),1)]),e("div",ft,[mt,e("div",pt,c(n.value.specialty),1)]),e("div",ht,[gt,e("div",xt,c(n.value.job_phone),1)]),e("div",yt,[bt,e("div",wt,c(n.value.job_address),1)])])]),_:1}),s($,{tab:"اطلاعات",key:"1"},{default:r(()=>[e("div",Ct,[e("div",kt,[jt,e("div",St,c(n.value.name),1)]),e("div",Ft,[Ot,e("div",Pt,c(n.value.mobile),1)]),e("div",It,[Dt,e("div",$t,c(ue(fe)(n.value.birthday)),1)]),e("div",Rt,[Bt,e("div",Lt,c(n.value.education),1)]),e("div",Wt,[qt,e("div",At,c(n.value.score),1)])])]),_:1})]),_:1},8,["activeKey"])])])}}});export{Et as default};
Copyright ©2k19 -
Hexid
|
Tex7ure