← Back
Editing: form-legacy.js
System.register(["./index-legacy100.js?v=1753755607904","./page_layout-legacy.js?v=1753755607904","./public-legacy.js?v=1753755607904","./like-legacy.js?v=1753755607904","./vue-legacy.js?v=1753755607904","./naive-legacy.js?v=1753755607904","./common-legacy.js?v=1753755607904","./__commonjsHelpers__-legacy.js?v=1753755607904"],(function(e,t){"use strict";var a,n,r,i,o,c,l,s,d,u,p,g,v,b,x,f,y,m,h,k,_,w,C,j,F,q,z,$,U,Y;return{setters:[e=>{a=e._},e=>{n=e.e,r=e.dF,i=e.d,o=e.dG},e=>{c=e.u},e=>{l=e.L},e=>{s=e.k,d=e.ac,u=e.a1,p=e.X,g=e.a2,v=e.V,b=e.U,x=e.F,f=e.O,y=e.H,m=e.a3,h=e.P,k=e.r,_=e.e,w=e.Q,C=e.al,j=e.ah,F=e.W,q=e.j},e=>{z=e.bZ,$=e.cC,U=e.cH,Y=e.ay},null,null],execute:function(){var t=document.createElement("style");t.textContent=".rating-item[data-v-c528e412]{width:40px;height:40px;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:2px;font-size:1.25rem;line-height:1.75rem;font-weight:700}.danger-item[data-v-c528e412]{--un-bg-opacity:1;background-color:rgb(247 207 206 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(239 133 129 / var(--un-text-opacity))}.danger-item[data-v-c528e412]:not(:last-child){border-right:1px solid #f8d7d6}.danger-item.active[data-v-c528e412],.danger-item[data-v-c528e412]:hover{border-style:none;--un-bg-opacity:1;background-color:rgb(255 0 0 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity));transform:scaleY(1.2)}.warning-item[data-v-c528e412]{--un-bg-opacity:1;background-color:rgb(247 230 206 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(247 190 86 / var(--un-text-opacity))}.warning-item[data-v-c528e412]:not(:last-child){border-right:1px solid #fceed3}.warning-item.active[data-v-c528e412],.warning-item[data-v-c528e412]:hover{border-style:none;--un-bg-opacity:1;background-color:rgb(255 170 44 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity));transform:scaleY(1.2)}.success-item[data-v-c528e412]{--un-bg-opacity:1;background-color:rgb(199 247 206 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(105 190 61 / var(--un-text-opacity))}.success-item[data-v-c528e412]:not(:last-child){border-right:1px solid #e4f5da}.success-item.active[data-v-c528e412],.success-item[data-v-c528e412]:hover{border-style:none;--un-bg-opacity:1;background-color:rgb(32 165 58 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity));transform:scaleY(1.2)}.rating-label[data-v-c528e412]{padding-top:10px;padding-bottom:10px;text-align:center;font-size:14px}.danger-text[data-v-c528e412]{--un-text-opacity:1;color:rgb(239 133 129 / var(--un-text-opacity));background:linear-gradient(to bottom,#ffdfdd,#fff)}.warning-text[data-v-c528e412]{--un-text-opacity:1;color:rgb(247 190 86 / var(--un-text-opacity));background:linear-gradient(to bottom,#fff7e6,#fff)}.success-text[data-v-c528e412]{--un-text-opacity:1;color:rgb(105 190 61 / var(--un-text-opacity));background:linear-gradient(to bottom,#d9f7d0,#fff)}.banner[data-v-cfb29806]{position:relative;background:url(/static/vite/images/banner.png) no-repeat top center;width:100%;height:92px;background-size:100%}.banner .banner-title[data-v-cfb29806]{position:absolute;left:32px;top:16px;font-size:17px;color:#fff}\n/*$vite$:1*/",document.head.appendChild(t);const E={class:"flex border-1px border-solid border-#f3adaa"},H=["onClick"],P={class:"flex border-1px border-solid border-#f4cf8f"},S=["onClick"],I={class:"flex border-1px border-solid border-#b8e29f"},M=["onClick"],N=n(s({__name:"rating",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(e){const t=d(e,"value"),a=e=>{t.value=e};return(e,n)=>{const r=z;return p(),u(r,{class:"justify-center! mb-16px",size:20},{default:g((()=>[v("div",null,[v("div",E,[(p(),b(x,null,f(6,(e=>v("div",{key:e,class:y(["rating-item","danger-item",{active:t.value===e}]),onClick:t=>a(e)},[v("span",null,m(e),1)],10,H))),64))]),n[0]||(n[0]=v("div",{class:"rating-label danger-text"},"No",-1))]),v("div",null,[v("div",P,[(p(),b(x,null,f(2,(e=>v("div",{key:e+6,class:y(["rating-item","warning-item",{active:t.value===e+6}]),onClick:t=>a(e+6)},[v("span",null,m(e+6),1)],10,S))),64))]),n[1]||(n[1]=v("div",{class:"rating-label warning-text"},"Yes",-1))]),v("div",null,[v("div",I,[(p(),b(x,null,f(2,(e=>v("div",{key:e+8,class:y(["rating-item","success-item",{active:t.value===e+8}]),onClick:t=>a(e+8)},[v("span",null,m(e+8),1)],10,M))),64))]),n[2]||(n[2]=v("div",{class:"rating-label success-text"},"Must",-1))])])),_:1})}}}),[["__scopeId","data-v-c528e412"]]),O={class:"banner"},W={class:"banner-title"},B={class:"ml-8px"},G={key:0,class:"px-24px"},J={class:"text-primary"},L={class:"flex justify-center my-20px"},Q=s({__name:"form",emits:["close"],setup(e,{emit:t}){const{t:n}=h(),s=k(0),d=t,y=_({}),z=_({}),E=k(null),H=k([]),P=async()=>{await(E.value?.validate());const e={questions:JSON.stringify(H.value.reduce(((e,t)=>(e[t.id]=y[t.id],e)),{})),rate:s.value,product_type:1};await o(e),d("close"),S()},S=()=>{const e=c({hideClose:!0,content:()=>w("div",{class:"flex-center flex-col w-230px h-124px bg-#F1F9F3"},[w("img",{class:"w-56px",src:l},null),w("div",{class:"mt-16px"},[n("Component.Feedback.index_6")])])});setTimeout((()=>{e.hide()}),3e3)};return(async()=>{const{message:e}=await r();i(e)&&(H.value=e.res,e.res.forEach((e=>{y[e.id]=""})),e.res.forEach((e=>{1===e.required&&(z[e.id]={required:!0,message:e.question,trigger:["blur","change"]})})))})(),(e,t)=>{const n=a,r=$,i=U,o=Y;return p(),b("div",null,[v("div",O,[v("div",W,[v("span",B,m(e.$t("Component.Feedback.index_1")),1)])]),t[1]||(t[1]=v("div",{class:"text-center text-20px font-bold my-20px"},"Would you recommend aaPanel?",-1)),w(N,{value:F(s),"onUpdate:value":t[0]||(t[0]=e=>j(s)?s.value=e:null)},null,8,["value"]),F(s)?(p(),b("div",G,[w(i,{model:F(y),rules:F(z),ref_key:"formRef",ref:E},{default:g((()=>[(p(!0),b(x,null,f(F(H),(e=>(p(),u(r,{label:e.question,path:e.id,key:e.id},{default:g((()=>[w(n,{value:F(y)[e.id],"onUpdate:value":t=>F(y)[e.id]=t,placeholder:e.hint},null,8,["value","onUpdate:value","placeholder"])])),_:2},1032,["label","path"])))),128))])),_:1},8,["model","rules"]),v("div",J,m(e.$t("Component.Feedback.index_4")),1),v("div",L,[w(o,{type:"primary",class:"w-120px",onClick:P},{default:g((()=>[q(m(e.$t("Public.Btn.Submit")),1)])),_:1})])])):C("",!0)])}}});e("default",n(Q,[["__scopeId","data-v-cfb29806"]]))}}}));
Save File
Cancel