2 lines
6.7 KiB
JavaScript
2 lines
6.7 KiB
JavaScript
import{_ as e,F as t}from"./Footer.f740febe.js";import{i as a,w as l,x as o}from"./index.e55b68a5.js";import{d as i,q as n,l as s,m as r,s as p,r as d,o as u,t as c,b as v,g,w as m,A as x,C as y,F as h,x as f,y as w}from"./vendor.cf21d8e3.js";/* empty css */const b={style:{width:"80%",margin:"0 auto","padding-top":"5px"}},_=g("div",{style:{"font-size":"20px","font-weight":"bold"}},"当前部门",-1),k={key:0},E=w("退出登录"),z=g("div",{style:{width:"100%","background-color":"#E7E7E7",height:"1px",margin:"10px 0px"}},null,-1),F={style:{width:"60%",margin:"0 auto"}},j={key:0,style:{color:"#818181"}},C=g("span",{style:{color:"#000000","font-size":"18px","font-weight":"600"}},"详情",-1),R={style:{"margin-left":"10px"}},B=g("span",{style:{"margin-left":"10px"}},"丨",-1),T={style:{"margin-left":"10px"}},S=g("span",{style:{"margin-left":"10px"}},"丨",-1),U={style:{"margin-left":"10px"}},q=g("div",{style:{width:"100%","background-color":"#E7E7E7",height:"1px",margin:"10px 0px"}},null,-1),H={style:{color:"#818181"}},I={style:{color:"#818181"}},L={style:{"text-align":"center","font-size":"2em"}},M={style:{"text-align":"center",color:"#818181"}},O={style:{"text-align":"left","font-size":"1.2em"}},A={key:1,style:{margin:"0 auto",color:"#818181","padding-top":"50px"}},J={style:{"margin-top":"20px"}},N={style:{"text-align":"right","margin-top":"20px"}},P=w("提 交"),D={key:2},G={key:0},K={key:0,style:{"text-align":"left","background-color":"#F2F2F2",margin:"0 auto",padding:"20px","border-radius":"10px","margin-top":"40px","margin-bottom":"40px"}},Q={style:{"font-size":"20px",color:"#818181","font-weight":"600"}},V=g("div",{style:{width:"100%","background-color":"#E7E7E7",height:"2px",margin:"15px 0px"}},null,-1),W={style:{"font-size":"16px","margin-top":"10px"}},X=["innerHTML"],Y={style:{"text-align":"right","margin-top":"20px"}},Z=g("span",{style:{"margin-right":"20px",color:"#999999"}},"发布后一小时内可更改回答",-1),$=w("编 辑"),ee={key:1,style:{margin:"0 auto",color:"#818181","padding-top":"50px"}},te={style:{"margin-top":"20px"}},ae={style:{"text-align":"right","margin-top":"20px"}},le=g("span",{style:{"margin-right":"20px",color:"#999999"}},"发布后一小时内可更改回答",-1),oe=w("取 消"),ie=w("提 交"),ne={style:{"padding-bottom":"100px","padding-top":"40px"}},se={style:{"font-size":"22px"}},re=g("div",{style:{width:"100%","background-color":"#E7E7E7",height:"2px",opacity:"0.35",margin:"15px 0px"}},null,-1),pe={style:{color:"#818181"}},de={style:{color:"#000000","font-size":"16px"}},ue={style:{margin:"5px 0px"}},ce=g("div",{style:{width:"100%",height:"2px",margin:"15px 0px","border-bottom":"1px dashed #E7E7E7"}},null,-1),ve={class:"register-form ",style:{"text-align":"center","margin-top":"50px"}},ge={style:{color:"#666666"}};var me=i({setup(i){const w=n(),me=s(),xe=r(),ye=r({}),he=r(null),fe=r(""),we=r(!0);p((()=>{xe.value=w.currentRoute.value.query.id;var e=sessionStorage.getItem("admin");""==Be(e)&&w.push("/admin"),he.value=Be(e),Ce(),Fe()}));const be=()=>{o({id:xe.value,respond:fe.value}).then((e=>{200==e.code?(console.log(e),me.success("回复成功!"),setTimeout((()=>{window.location.reload()}),1500)):me.error(e.msg)}))},_e=r(1),ke=r(1),Ee=r(0),ze=r([]),Fe=()=>{a({id:xe.value,page:_e.value,size:5}).then((e=>{200==e.code?(console.log(e),ze.value=e.data.data,ke.value=e.data.last_page,Ee.value=e.data.total):me.error(e.msg)}))},je=e=>{console.log(e),_e.value=e,Fe()},Ce=()=>{l({id:xe.value}).then((e=>{200==e.code?(console.log(e),ye.value=e.data):me.error(e.msg)}))},Re=()=>{sessionStorage.removeItem("admin"),w.push("/")},Be=e=>{const t=e.split(".");if(3!==t.length)return"";const a=t[1],l=(a+"=".repeat((4-a.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/");try{const e=atob(l);return JSON.parse(e)}catch(o){return""}};return(a,l)=>{const o=d("n-button"),i=d("n-flex"),n=d("n-input"),s=d("n-pagination");return u(),c(h,null,[v(e),g("div",b,[v(i,{align:"center",justify:"space-between"},{default:m((()=>[g("div",null,[_,he.value&&he.value.data?(u(),c("div",k,x(he.value.data.department.department_name),1)):y("",!0)]),g("div",null,[v(o,{onClick:Re,type:"info",ghost:"",color:"#0051B1"},{default:m((()=>[E])),_:1})])])),_:1})]),z,g("div",F,[ye.value&&ye.value.user?(u(),c("div",j,[C,g("span",R,"编号:"+x(ye.value.id),1),B,g("span",T,x(ye.value.politics_type),1),S,g("span",U,x(ye.value.user.nickname),1)])):y("",!0),q,v(i,{justify:"space-between",size:[0,0]},{default:m((()=>[g("div",H,"阅读:"+x(ye.value.gives),1),g("div",I,x(ye.value.createtime),1)])),_:1}),g("div",L,x(ye.value.politics_title),1),g("div",M," 地点:"+x(ye.value.politics_address),1),g("div",O,x(ye.value.politics_content),1),0==ye.value.acceptance_status?(u(),c("div",A,[g("div",J,[v(n,{type:"textarea",value:fe.value,"onUpdate:value":l[0]||(l[0]=e=>fe.value=e),placeholder:"请输入回复内容……",maxlength:"1000","show-count":"",autosize:{minRows:5,maxRows:5},style:{border:"1px solid #818181","border-radius":"10px","background-color":"#F2F2F2"}},null,8,["value"])]),g("div",N,[v(o,{onClick:be,type:"info",color:"#0051B1",style:{width:"100px"}},{default:m((()=>[P])),_:1})])])):y("",!0),1==ye.value.acceptance_status?(u(),c("div",D,[we.value?(u(),c("div",G,[1==ye.value.acceptance_status?(u(),c("div",K,[g("div",Q,"回复部门:"+x(ye.value.department.department_name),1),V,g("div",W,[g("div",{innerHTML:ye.value.acceptance_content},null,8,X)])])):y("",!0),g("div",Y,[Z,v(o,{onClick:l[1]||(l[1]=e=>{fe.value=ye.value.acceptance_content,we.value=!1}),type:"info",color:"#0051B1",style:{width:"100px"}},{default:m((()=>[$])),_:1})])])):y("",!0),we.value?y("",!0):(u(),c("div",ee,[g("div",te,[v(n,{type:"textarea",value:fe.value,"onUpdate:value":l[2]||(l[2]=e=>fe.value=e),placeholder:"请输入回复内容……",maxlength:"1000","show-count":"",autosize:{minRows:5,maxRows:5},style:{border:"1px solid #818181","border-radius":"10px","background-color":"#F2F2F2"}},null,8,["value"])]),g("div",ae,[le,v(o,{onClick:l[3]||(l[3]=e=>we.value=!0),type:"info",color:"#999999",style:{width:"100px","margin-right":"20px"}},{default:m((()=>[oe])),_:1}),v(o,{onClick:be,type:"info",color:"#0051B1",style:{width:"100px"}},{default:m((()=>[ie])),_:1})])]))])):y("",!0),g("div",ne,[g("div",se,"评论("+x(Ee.value)+")",1),re,(u(!0),c(h,null,f(ze.value,((e,t)=>(u(),c("div",pe,[g("div",de,"用户:"+x(e.user.nickname),1),g("div",ue,x(e.createtime),1),g("div",null,x(e.content),1),ce])))),256)),g("div",ve,[v(i,{justify:"center",align:"center",size:[20,0]},{default:m((()=>[g("div",ge,"共"+x(Ee.value)+"条数据",1),g("div",null,[v(s,{"onUpdate:page":[je,l[4]||(l[4]=e=>_e.value=e)],"theme-overrides":a.PaginationThemeOverrides,page:_e.value,"page-count":ke.value,size:"medium"},null,8,["theme-overrides","page","page-count"])])])),_:1})])])]),v(t)],64)}}});export{me as default};
|