提交 eaa17751 编写于 作者: 刘英杰's avatar 刘英杰

V20240319 保存

上级 723d45c9
import{b as p,c as u,a as l,w as k,u as m,L as _,o as f,d as g,C as w,e as n,G as a,S as y,f as d}from"./index-CRjCC91L.js";const R={style:{display:"flex","justify-content":"center","margin-top":"50%"}},A={__name:"SSO",setup(v){const t=m(),c=async o=>{const e=await y(o);if(e===void 0)console.log("🚀🚀🚀,",e),await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await a();n.set("oneWeekARange-user-info",JSON.stringify(s.response)),await t.replace({name:"welcome"})}},r=async o=>{const e=await d(o);if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await a();n.set("oneWeekARange-user-info",s.response.role),await t.replace({name:"welcome"})}},i=async()=>{({asc:async()=>{let e={token:t.currentRoute.value.query.token};await c(e)},first:async()=>{let e={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await r(e)},test:async()=>{const e=await w();if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await a();n.set("oneWeekARange-user-info",JSON.stringify(s.response)),await t.replace({name:"welcome"})}}})[t.currentRoute.value.query.type]()};return p(()=>{i()}),(o,e)=>{const s=_;return f(),u("div",R,[l(s,{size:"38px",color:"#1989fa",vertical:""},{default:k(()=>[g(" 登录中")]),_:1})])}}};export{A as default};
import{b as p,c as u,a as l,w as k,u as m,L as _,o as f,d as g,C as w,e as n,G as a,S as y,f as d}from"./index-CtlYELMr.js";const R={style:{display:"flex","justify-content":"center","margin-top":"50%"}},A={__name:"SSO",setup(v){const t=m(),c=async o=>{const e=await y(o);if(e===void 0)console.log("🚀🚀🚀,",e),await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await a();n.set("oneWeekARange-user-info",JSON.stringify(s.response)),await t.replace({name:"welcome"})}},r=async o=>{const e=await d(o);if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await a();n.set("oneWeekARange-user-info",s.response.role),await t.replace({name:"welcome"})}},i=async()=>{({asc:async()=>{let e={token:t.currentRoute.value.query.token};await c(e)},first:async()=>{let e={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await r(e)},test:async()=>{const e=await w();if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await a();n.set("oneWeekARange-user-info",JSON.stringify(s.response)),await t.replace({name:"welcome"})}}})[t.currentRoute.value.query.type]()};return p(()=>{i()}),(o,e)=>{const s=_;return f(),u("div",R,[l(s,{size:"38px",color:"#1989fa",vertical:""},{default:k(()=>[g(" 登录中")]),_:1})])}}};export{A as default};
import{b as l,c as k,a as _,w as m,u as y,L as f,o as d,d as w,f as g,e as n,G as o,C as v,S as x}from"./index-CRjCC91L.js";const S={style:{display:"flex","justify-content":"center","margin-top":"50%"}},R={__name:"SSOInfo",setup(q){const t=y(),c=async a=>{const e=await x(a);if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("site-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await o();n.set("site-user-info",JSON.stringify(s.response)),await t.replace({name:"myActivity"})}},i=async a=>{const e=await(void 0)(a);if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("site-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await o();n.set("site-user-info",JSON.stringify(s.response)),await t.replace({name:"myActivity"})}},r=async()=>{({wx:async()=>{let e={token:t.currentRoute.value.query.token};const s=await g(e);if(s===void 0)await t.replace({name:"403"});else if(s.response.access_token.token_content!==""){n.set("site-management-token",s.response.access_token.token_content),n.set("time",s.response.access_token.expires);const u=await o();n.set("site-user-info",JSON.stringify(u.response));let p=t.currentRoute.value.query.id;await t.push({path:"/indexDetail",query:{id:p,pushMessage:1}})}},asc:async()=>{let e={token:t.currentRoute.value.query.token};await c(e)},first:async()=>{let e={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await i(e)},test:async()=>{const e=await v();if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("site-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await o();n.set("site-user-info",JSON.stringify(s.response)),await t.replace({name:"myActivity"})}}})[t.currentRoute.value.query.type]()};return l(()=>{r()}),(a,e)=>{const s=f;return d(),k("div",S,[_(s,{size:"38px",color:"#1989fa",vertical:""},{default:m(()=>[w(" 登录中")]),_:1})])}}};export{R as default};
import{b as l,c as k,a as _,w as m,u as y,L as f,o as d,d as w,f as g,e as n,G as o,C as v,S as x}from"./index-CtlYELMr.js";const R={style:{display:"flex","justify-content":"center","margin-top":"50%"}},O={__name:"SSOInfo",setup(S){const t=y(),c=async a=>{const e=await x(a);if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("oneWeekARange-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await o();n.set("oneWeekARange-user-info",JSON.stringify(s.response)),await t.replace({name:"workArrangementFilling"})}},i=async a=>{const e=await(void 0)(a);if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("site-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await o();n.set("site-user-info",JSON.stringify(s.response)),await t.replace({name:"myActivity"})}},r=async()=>{({wx:async()=>{let e={token:t.currentRoute.value.query.token};const s=await g(e);if(s===void 0)await t.replace({name:"403"});else if(s.response.access_token.token_content!==""){n.set("site-management-token",s.response.access_token.token_content),n.set("time",s.response.access_token.expires);const u=await o();n.set("site-user-info",JSON.stringify(u.response));let p=t.currentRoute.value.query.id;await t.push({path:"/indexDetail",query:{id:p,pushMessage:1}})}},asc:async()=>{let e={token:t.currentRoute.value.query.token};await c(e)},first:async()=>{let e={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await i(e)},test:async()=>{const e=await v();if(e===void 0)await t.replace({name:"403"});else if(e.response.access_token.token_content!==""){n.set("site-management-token",e.response.access_token.token_content),n.set("time",e.response.access_token.expires);const s=await o();n.set("site-user-info",JSON.stringify(s.response)),await t.replace({name:"myActivity"})}}})[t.currentRoute.value.query.type]()};return l(()=>{r()}),(a,e)=>{const s=f;return d(),k("div",R,[_(s,{size:"38px",color:"#1989fa",vertical:""},{default:m(()=>[w(" 登录中")]),_:1})])}}};export{O as default};
import{c as r,a as e,F as c,u as s,o as m,N as _}from"./index-CRjCC91L.js";import{E as l}from"./index-TV013WVb.js";const h={__name:"index",setup(p){const t=s(),o=()=>t.replace({name:"welcome"});return(i,u)=>{const a=_,n=l;return m(),r(c,null,[e(a,{"left-text":"返回","left-arrow":"",onClickLeft:o}),e(n,{style:{width:"100%",height:"100%"},image:"error",description:"异常"})],64)}}};export{h as default};
import{c as r,a as e,F as c,u as s,o as m,N as _}from"./index-CtlYELMr.js";import{E as l}from"./index-kOmZnPqx.js";const h={__name:"index",setup(p){const t=s(),o=()=>t.replace({name:"welcome"});return(i,u)=>{const a=_,n=l;return m(),r(c,null,[e(a,{"left-text":"返回","left-arrow":"",onClickLeft:o}),e(n,{style:{width:"100%",height:"100%"},image:"error",description:"异常"})],64)}}};export{h as default};
import{P as a,b as t,c as s,a as c,Q as e,o as n,a7 as l}from"./index-CRjCC91L.js";const i={class:"publicContainerNoPadding"},_=e("div",{class:"w-full h-[10px]"},null,-1),d=e("div",{class:"w-full h-[calc(100%-56px)] p-2 overflow-y-auto"},null,-1),h={__name:"index",setup(r){return a({fillInWork:{show:!1}}),t(()=>{document.title="系统配置"}),(p,u)=>{const o=l;return n(),s("div",i,[c(o,{path:"/welcome",title:"分管填报记录查看"}),_,d])}}};export{h as default};
import{P as a,b as t,c as s,a as c,Q as e,o as n,a7 as l}from"./index-CtlYELMr.js";const i={class:"publicContainerNoPadding"},_=e("div",{class:"w-full h-[10px]"},null,-1),d=e("div",{class:"w-full h-[calc(100%-56px)] p-2 overflow-y-auto"},null,-1),h={__name:"index",setup(r){return a({fillInWork:{show:!1}}),t(()=>{document.title="系统配置"}),(p,u)=>{const o=l;return n(),s("div",i,[c(o,{path:"/welcome",title:"分管填报记录查看"}),_,d])}}};export{h as default};
import{p as Q,i as W,k as L,ad as Y,a as u,B as q,E as z,ae as H,t as M,af as G,ag as J,g as X,O as U,_ as Z,r as D,o as f,c as b,P as ee,b as te,Q as i,R as B,T as se,F as V,U as A,w as x,V as ne,ah as ae,Y as g,d as E,a8 as T,$ as j,a4 as oe,a5 as le}from"./index-CRjCC91L.js";import{g as ie,S as re}from"./index-B4cmDMzD.js";import{E as ce}from"./index-TV013WVb.js";const[pe,C,O]=Q("pagination"),$=(a,c,o)=>({number:a,text:c,active:o}),de={mode:q("multi"),prevText:String,nextText:String,pageCount:z(0),modelValue:H(0),totalItems:z(0),showPageSize:z(5),itemsPerPage:z(10),forceEllipses:Boolean,showPrevButton:M,showNextButton:M};var ue=W({name:pe,props:de,emits:["change","update:modelValue"],setup(a,{emit:c,slots:o}){const e=L(()=>{const{pageCount:l,totalItems:d,itemsPerPage:h}=a,_=+l||Math.ceil(+d/+h);return Math.max(1,_)}),k=L(()=>{const l=[],d=e.value,h=+a.showPageSize,{modelValue:_,forceEllipses:t}=a;let s=1,r=d;const m=h<d;m&&(s=Math.max(_-Math.floor(h/2),1),r=s+h-1,r>d&&(r=d,s=r-h+1));for(let p=s;p<=r;p++){const y=$(p,p,p===_);l.push(y)}if(m&&h>0&&t){if(s>1){const p=$(s-1,"...");l.unshift(p)}if(r<d){const p=$(r+1,"...");l.push(p)}}return l}),v=(l,d)=>{l=J(l,1,e.value),a.modelValue!==l&&(c("update:modelValue",l),d&&c("change",l))};Y(()=>v(a.modelValue));const F=()=>u("li",{class:C("page-desc")},[o.pageDesc?o.pageDesc():`${a.modelValue}/${e.value}`]),R=()=>{const{mode:l,modelValue:d,showPrevButton:h}=a;if(!h)return;const _=o["prev-text"],t=d===1;return u("li",{class:[C("item",{disabled:t,border:l==="simple",prev:!0}),G]},[u("button",{type:"button",disabled:t,onClick:()=>v(d-1,!0)},[_?_():a.prevText||O("prev")])])},I=()=>{const{mode:l,modelValue:d,showNextButton:h}=a;if(!h)return;const _=o["next-text"],t=d===e.value;return u("li",{class:[C("item",{disabled:t,border:l==="simple",next:!0}),G]},[u("button",{type:"button",disabled:t,onClick:()=>v(d+1,!0)},[_?_():a.nextText||O("next")])])},P=()=>k.value.map(l=>u("li",{class:[C("item",{active:l.active,page:!0}),G]},[u("button",{type:"button","aria-current":l.active||void 0,onClick:()=>v(l.number,!0)},[o.page?o.page(l):l.text])]));return()=>u("nav",{role:"navigation",class:C()},[u("ul",{class:C("items")},[R(),a.mode==="simple"?F():P(),I()])])}});const me=X(ue);function he(a){return U.post("/api/Common/GetRoleList",a)}function _e(a,c){const o={page_index:a.page_index,page_size:a.page_size};return U.get("/api/UserRole/GetUserRoleList",{params:o,...c})}function fe(a,c){const o={id:a.id};return U.get("/api/UserRole/GetUserRoleInfo",{params:o,...c})}function ge(a,c){const o={keyword:a.keyword,page_index:a.page_index,page_size:a.page_size};return U.get("/api/UserRole/GetUserRoleSearch",{params:o,...c})}function xe(a,c){const o={userid:a.userid};return U.get("/api/UserRole/UserRoleIns",{params:o,...c})}function ve(a,c){return U.post("/api/UserRole/UserRoleSave",a,c)}const we={class:"w-full h-[55px] page"},be={__name:"page",props:{page_index:{type:Number,default:1},page_size:{type:Number,default:10},total:{type:Number,default:0}},emits:["pageChange"],setup(a,{expose:c,emit:o}){const e=a,k=D(1);function v(F){o("pageChange",F)}return c({currentPage:k}),(F,R)=>{const I=me;return f(),b("div",we,[u(I,{onChange:v,modelValue:k.value,"onUpdate:modelValue":R[0]||(R[0]=P=>k.value=P),"total-items":e.total,mode:"simple"},null,8,["modelValue","total-items"])])}}},ke=Z(be,[["__scopeId","data-v-54a6d0b5"]]),Pe={class:"publicContainerNoPadding"},ye={class:"w-full h-[calc(100%-111px)] p-3 overflow-y-auto"},Fe={class:"w-[80%] h-full"},Re={class:"w-full h-[40px] p-1 flex items-center"},Ce={class:"w-full min-h-1/2 p-1"},Ue=["onClick"],Ie={class:"w-full h-auto bg-white"},Se={class:"w-full min-h-[110px] p-4 flex justify-between flex-wrap"},Ve=i("div",{class:"h-[30px] w-[20%]"},"姓名:",-1),Ee={class:"h-[30px] w-[80%]"},Ne=i("div",{class:"h-[30px] w-[20%]"},"工号:",-1),ze={class:"h-[30px] w-[80%]"},Be=i("div",{class:"h-[30px] w-[20%]"},"部门:",-1),Ae={class:"h-[30px] w-[80%]"},Ge=i("div",{class:"h-[30px] w-[20%]"},"岗位:",-1),$e={class:"h-[30px] w-[80%]"},De=i("div",{class:"w-full h-3"},null,-1),Le={class:"w-full h-auto bg-white"},Me=i("div",{class:"w-full h-10 p-4 pb-0 font-bold"},"操作权限",-1),Te={class:"w-full min-h-[110px] p-4 flex justify-between flex-wrap"},je=i("div",{class:"w-full h-3"},null,-1),Oe={class:"w-full h-auto bg-white"},Ke=i("div",{class:"w-full h-10 p-4 pb-0 font-bold"},"分管部门",-1),Qe={class:"w-full min-h-[110px] p-4 flex justify-between flex-wrap"},He={__name:"index",setup(a){const c=D(),o=D(),e=ee({searchParams:{page_index:1,page_size:10,keyword:""},total:0,observer:"",loading:!0,comment:{dept:[],user:[],deptId:[]},check:{userroleid:"",userid:"",usercard:"",username:"",dept:"",position_name:"",dept_list:[],role_list:[]},select:{showPopup:!1},fillInWork:{show:!1},data:[],initParams:{page_index:1,page_size:10}});function k(){j(()=>ve({...e.check,role_list:e.check.role_list.map(t=>({role_name:"",role_id:t})),dept_list:e.check.dept_list.map(t=>({name:"",id:t}))}).then(t=>(t.code===1&&(o.value.search!==""&&h(o.value.search,e.searchParams.page_index),e.select.showPopup=!1),t)))}function v(t){e.check.dept_list.includes(t.id)?(e.check.dept_list.forEach((s,r)=>{s===t.id&&e.check.dept_list.splice(r,1)}),e.comment.dept.forEach(s=>{s.id===t.id&&(s.bg="",s.cl="")}),e.comment.deptId.forEach((s,r)=>{s===t.id&&e.comment.deptId.splice(r,1)})):(e.check.dept_list.push(t.id),e.comment.deptId.push(t.id),e.comment.dept.forEach(s=>{s.id===t.id&&(s.bg="#1989FA",s.cl="#FFFFFF")}))}function F(t){e.check.role_list.includes(t.id)?(e.check.role_list.forEach((s,r)=>{s===t.id&&e.check.role_list.splice(r,1,"")}),e.comment.user.forEach(s=>{s.id===t.id&&(s.bg="",s.cl="")})):(e.check.role_list.push(t.id),e.comment.user.forEach(s=>{s.id===t.id&&(s.bg="#1989FA",s.cl="#FFFFFF")})),console.log("🚀🚀check.tid_list🚀,",...e.check.role_list)}function R(){he().then(t=>{e.comment.user=t.response.map(s=>({...s,bg:"",cl:""}))})}function I(){ie().then(t=>{e.comment.dept=t.response.map(s=>({...s,bg:"",cl:""}))})}function P(){return _e(e.initParams).then(t=>{e.data=t.response.data.map(s=>({...s})),e.total=t.response.data_count})}function l(t){o.value.search===""?(e.initParams.page_index=t,P()):(e.searchParams.page_index=t,h(o.value.search,t))}function d(){o.value.search="",e.initParams={page_index:1,page_size:10},c.value.currentPage=1,P()}function h(t,s=1){o.value.search!==""&&(e.initParams.page_index!==1&&(c.value.currentPage=1,e.initParams.page_index=1),ge({...e.searchParams,keyword:t,page_index:s}).then(r=>{e.data=r.response.data.map(m=>({...m})),e.total=r.response.data_count}))}function _(t,s){let r={0:()=>{j(()=>xe({userid:s.userid}).then(m=>(m.code===1&&r[1](m.response),m)))},1:m=>{fe({id:s.userroleid||m}).then(p=>{let y=[],S=[];p.response.dept_list.map((n,w)=>{y.push(n.id)}),p.response.role_list.map((n,w)=>{S.push(n.role_id)}),e.comment.dept.map((n,w)=>(y.includes(n.id)?(n.bg="#1989FA",n.cl="#FFFFFF"):(n.bg="",n.cl=""),n)),e.comment.user.map((n,w)=>(S.includes(n.id)?(n.bg="#1989FA",n.cl="#FFFFFF"):(n.bg="",n.cl=""),n)),p.response.dept_list=y,p.response.role_list=S,e.check=p.response,p.code===1&&(e.select.showPopup=!0),console.log("🚀🚀🚀,",e.comment,p.response)})}};r[String(t)]()}return te(()=>{document.title="人员授权",P(),R(),I()}),(t,s)=>{const r=ce,m=oe,p=re,y=le,S=ne;return f(),b(V,null,[i("div",Pe,[u(ae,{ref_key:"headerInput",ref:o,onSearchFun:h,onReset:d,path:"/welcome"},null,512),i("div",ye,[e.data.length===[]?(f(),B(r,{key:0,description:"暂无授权名单,请通过搜索添加"})):se("",!0),(f(!0),b(V,null,A(e.data,(n,w)=>(f(),b("div",{key:w,class:"w-full min-h-[90px] flex rounded-[5px] p-2 bg-white mb-3"},[i("div",Fe,[i("div",Re,g(n.username)+"("+g(n.usercard)+")",1),i("div",Ce,[(f(!0),b(V,null,A(n.dept_list,(N,K)=>(f(),B(m,{style:{margin:"5px 5px 5px 0"},key:K,plain:"",hairline:"",size:"small",type:"primary"},{default:x(()=>[E(g(N.name),1)]),_:2},1024))),128))])]),i("div",{onClick:N=>_(+(n.userroleid!==null),n),class:"w-[20%] flex justify-center items-center text-blue-500"},g(["添加","编辑"][+(n.userroleid!==null)]),9,Ue)]))),128))]),u(ke,{ref_key:"pageRef",ref:c,total:e.total,onPageChange:l},null,8,["total"])]),u(S,{show:e.select.showPopup,height:80},{content:x(()=>[(f(),b("div",{class:"w-full h-[calc(100%-64px)] bg-gray-200",key:e.calendarKey},[i("div",Ie,[i("div",Se,[Ve,i("div",Ee,g(e.check.username),1),Ne,i("div",ze,g(e.check.usercard),1),Be,i("div",Ae,g(e.check.dept),1),Ge,i("div",$e,g(e.check.position_name),1)])]),De,i("div",Le,[Me,i("div",Te,[u(p,{wrap:""},{default:x(()=>[(f(!0),b(V,null,A(e.comment.user,(n,w)=>(f(),B(m,{onClick:N=>F(n),style:T({margin:"5px",padding:"15px !important",height:"40px",background:n.bg,color:n.cl}),size:"normal",plain:"",hairline:"",type:"primary"},{default:x(()=>[E(g(n.name),1)]),_:2},1032,["onClick","style"]))),256))]),_:1})])]),je,i("div",Oe,[Ke,i("div",Qe,[u(p,{wrap:""},{default:x(()=>[(f(!0),b(V,null,A(e.comment.dept,(n,w)=>(f(),B(m,{onClick:N=>v(n),key:w,style:T({margin:"5px",padding:"15px !important",height:"40px",background:n.bg,color:n.cl}),size:"normal",plain:"",hairline:"",type:"primary"},{default:x(()=>[E(g(n.name),1)]),_:2},1032,["onClick","style"]))),128))]),_:1})])])])),u(y,null,{default:x(()=>[u(m,{type:"primary",round:"",class:"w-[90px]",onClick:k},{default:x(()=>[E("确定")]),_:1}),u(m,{round:"",class:"w-[90px]",onClick:s[0]||(s[0]=n=>e.select.showPopup=!1)},{default:x(()=>[E("取消")]),_:1})]),_:1})]),_:1},8,["show"])],64)}}};export{He as default};
import{_ as e}from"./index-CRjCC91L.js";const n={};function r(c,t){return null}const o=e(n,[["render",r]]);export{o as default};
import{_ as e}from"./index-CtlYELMr.js";const n={};function r(c,t){return null}const o=e(n,[["render",r]]);export{o as default};
import{p as f,i as d,k as y,a as s,F as c,ak as h,al as v,g as A,O as z}from"./index-CRjCC91L.js";const[m,w]=f("space"),S={align:String,direction:{type:String,default:"horizontal"},size:{type:[Number,String,Array],default:8},wrap:Boolean,fill:Boolean};function u(e=[]){const a=[];return e.forEach(t=>{Array.isArray(t)?a.push(...t):t.type===c?a.push(...u(t.children)):a.push(t)}),a.filter(t=>{var r;return!(t&&(t.type===h||t.type===c&&((r=t.children)==null?void 0:r.length)===0||t.type===v&&t.children.trim()===""))})}var p=d({name:m,props:S,setup(e,{slots:a}){const t=y(()=>{var n;return(n=e.align)!=null?n:e.direction==="horizontal"?"center":""}),r=n=>typeof n=="number"?n+"px":n,g=n=>{const i={},o=`${r(Array.isArray(e.size)?e.size[0]:e.size)}`,l=`${r(Array.isArray(e.size)?e.size[1]:e.size)}`;return n?e.wrap?{marginBottom:l}:{}:(e.direction==="horizontal"&&(i.marginRight=o),(e.direction==="vertical"||e.wrap)&&(i.marginBottom=l),i)};return()=>{var n;const i=u((n=a.default)==null?void 0:n.call(a));return s("div",{class:[w({[e.direction]:e.direction,[`align-${t.value}`]:t.value,wrap:e.wrap,fill:e.fill})]},[i.map((o,l)=>s("div",{key:`item-${l}`,class:`${m}-item`,style:g(l===i.length-1)},[o]))])}}});const x=A(p);function B(e){return z.get("/api/Common/GetDeptList",e)}export{x as S,B as g};
import{p as f,i as d,k as y,a as s,F as c,ak as h,al as v,g as A,O as z}from"./index-CtlYELMr.js";const[m,w]=f("space"),S={align:String,direction:{type:String,default:"horizontal"},size:{type:[Number,String,Array],default:8},wrap:Boolean,fill:Boolean};function u(e=[]){const a=[];return e.forEach(t=>{Array.isArray(t)?a.push(...t):t.type===c?a.push(...u(t.children)):a.push(t)}),a.filter(t=>{var r;return!(t&&(t.type===h||t.type===c&&((r=t.children)==null?void 0:r.length)===0||t.type===v&&t.children.trim()===""))})}var p=d({name:m,props:S,setup(e,{slots:a}){const t=y(()=>{var n;return(n=e.align)!=null?n:e.direction==="horizontal"?"center":""}),r=n=>typeof n=="number"?n+"px":n,g=n=>{const i={},o=`${r(Array.isArray(e.size)?e.size[0]:e.size)}`,l=`${r(Array.isArray(e.size)?e.size[1]:e.size)}`;return n?e.wrap?{marginBottom:l}:{}:(e.direction==="horizontal"&&(i.marginRight=o),(e.direction==="vertical"||e.wrap)&&(i.marginBottom=l),i)};return()=>{var n;const i=u((n=a.default)==null?void 0:n.call(a));return s("div",{class:[w({[e.direction]:e.direction,[`align-${t.value}`]:t.value,wrap:e.wrap,fill:e.fill})]},[i.map((o,l)=>s("div",{key:`item-${l}`,class:`${m}-item`,style:g(l===i.length-1)},[o]))])}}});const x=A(p);function B(e){return z.get("/api/Common/GetDeptList",e)}export{x as S,B as g};
import{p as Q,i as W,k as L,ad as Y,a as u,B as q,E as z,ae as H,t as M,af as G,ag as J,g as X,O as U,_ as Z,r as D,o as f,c as b,P as ee,b as te,Q as i,R as B,T as se,F as V,U as A,w as x,V as ae,ah as ne,Y as g,d as E,a8 as T,$ as j,a4 as oe,a5 as le}from"./index-CtlYELMr.js";import{g as ie,S as re}from"./index-EEPlLw5i.js";import{E as ce}from"./index-kOmZnPqx.js";const[pe,C,O]=Q("pagination"),$=(n,r,o)=>({number:n,text:r,active:o}),de={mode:q("multi"),prevText:String,nextText:String,pageCount:z(0),modelValue:H(0),totalItems:z(0),showPageSize:z(5),itemsPerPage:z(10),forceEllipses:Boolean,showPrevButton:M,showNextButton:M};var ue=W({name:pe,props:de,emits:["change","update:modelValue"],setup(n,{emit:r,slots:o}){const e=L(()=>{const{pageCount:l,totalItems:d,itemsPerPage:_}=n,h=+l||Math.ceil(+d/+_);return Math.max(1,h)}),k=L(()=>{const l=[],d=e.value,_=+n.showPageSize,{modelValue:h,forceEllipses:t}=n;let s=1,c=d;const m=_<d;m&&(s=Math.max(h-Math.floor(_/2),1),c=s+_-1,c>d&&(c=d,s=c-_+1));for(let p=s;p<=c;p++){const y=$(p,p,p===h);l.push(y)}if(m&&_>0&&t){if(s>1){const p=$(s-1,"...");l.unshift(p)}if(c<d){const p=$(c+1,"...");l.push(p)}}return l}),v=(l,d)=>{l=J(l,1,e.value),n.modelValue!==l&&(r("update:modelValue",l),d&&r("change",l))};Y(()=>v(n.modelValue));const F=()=>u("li",{class:C("page-desc")},[o.pageDesc?o.pageDesc():`${n.modelValue}/${e.value}`]),R=()=>{const{mode:l,modelValue:d,showPrevButton:_}=n;if(!_)return;const h=o["prev-text"],t=d===1;return u("li",{class:[C("item",{disabled:t,border:l==="simple",prev:!0}),G]},[u("button",{type:"button",disabled:t,onClick:()=>v(d-1,!0)},[h?h():n.prevText||O("prev")])])},I=()=>{const{mode:l,modelValue:d,showNextButton:_}=n;if(!_)return;const h=o["next-text"],t=d===e.value;return u("li",{class:[C("item",{disabled:t,border:l==="simple",next:!0}),G]},[u("button",{type:"button",disabled:t,onClick:()=>v(d+1,!0)},[h?h():n.nextText||O("next")])])},P=()=>k.value.map(l=>u("li",{class:[C("item",{active:l.active,page:!0}),G]},[u("button",{type:"button","aria-current":l.active||void 0,onClick:()=>v(l.number,!0)},[o.page?o.page(l):l.text])]));return()=>u("nav",{role:"navigation",class:C()},[u("ul",{class:C("items")},[R(),n.mode==="simple"?F():P(),I()])])}});const me=X(ue);function _e(n){return U.post("/api/Common/GetRoleList",n)}function he(n,r){const o={page_index:n.page_index,page_size:n.page_size};return U.get("/api/UserRole/GetUserRoleList",{params:o,...r})}function fe(n,r){const o={id:n.id};return U.get("/api/UserRole/GetUserRoleInfo",{params:o,...r})}function ge(n,r){const o={keyword:n.keyword,page_index:n.page_index,page_size:n.page_size};return U.get("/api/UserRole/GetUserRoleSearch",{params:o,...r})}function xe(n,r){const o={userid:n.userid};return U.get("/api/UserRole/UserRoleIns",{params:o,...r})}function ve(n,r){return U.post("/api/UserRole/UserRoleSave",n,r)}const we={class:"w-full h-[55px] page"},be={__name:"page",props:{page_index:{type:Number,default:1},page_size:{type:Number,default:10},total:{type:Number,default:0}},emits:["pageChange"],setup(n,{expose:r,emit:o}){const e=n,k=D(1);function v(F){o("pageChange",F)}return r({currentPage:k}),(F,R)=>{const I=me;return f(),b("div",we,[u(I,{onChange:v,modelValue:k.value,"onUpdate:modelValue":R[0]||(R[0]=P=>k.value=P),"total-items":e.total,mode:"simple"},null,8,["modelValue","total-items"])])}}},ke=Z(be,[["__scopeId","data-v-54a6d0b5"]]),Pe={class:"publicContainerNoPadding"},ye={class:"w-full h-[calc(100%-111px)] p-3 overflow-y-auto"},Fe={class:"w-[80%] h-full"},Re={class:"w-full h-[40px] p-1 flex items-center"},Ce={class:"w-full min-h-1/2 p-1"},Ue=["onClick"],Ie={class:"w-full h-auto bg-white"},Se={class:"w-full min-h-[110px] p-4 flex justify-between flex-wrap"},Ve=i("div",{class:"h-[30px] w-[20%]"},"姓名:",-1),Ee={class:"h-[30px] w-[80%]"},Ne=i("div",{class:"h-[30px] w-[20%]"},"工号:",-1),ze={class:"h-[30px] w-[80%]"},Be=i("div",{class:"h-[30px] w-[20%]"},"部门:",-1),Ae={class:"h-[30px] w-[80%]"},Ge=i("div",{class:"h-[30px] w-[20%]"},"岗位:",-1),$e={class:"h-[30px] w-[80%]"},De=i("div",{class:"w-full h-3"},null,-1),Le={class:"w-full h-auto bg-white"},Me=i("div",{class:"w-full h-10 p-4 pb-0 font-bold"},"操作权限",-1),Te={class:"w-full min-h-[110px] p-4 flex justify-between flex-wrap"},je=i("div",{class:"w-full h-3"},null,-1),Oe={class:"w-full h-auto bg-white"},Ke=i("div",{class:"w-full h-10 p-4 pb-0 font-bold"},"分管部门",-1),Qe={class:"w-full min-h-[110px] p-4 flex justify-between flex-wrap"},He={__name:"index",setup(n){const r=D(),o=D(),e=ee({searchParams:{page_index:1,page_size:10,keyword:""},total:0,observer:"",loading:!0,comment:{dept:[],user:[],deptId:[]},check:{userroleid:"",userid:"",usercard:"",username:"",dept:"",position_name:"",dept_list:[],role_list:[]},select:{showPopup:!1},fillInWork:{show:!1},data:[],initParams:{page_index:1,page_size:10}});function k(){j(()=>ve({...e.check,role_list:e.check.role_list.map(t=>({role_name:"",role_id:t})),dept_list:e.check.dept_list.map(t=>({name:"",id:t}))}).then(t=>(t.code===1&&(o.value.search!==""?_(o.value.search,e.searchParams.page_index):(d(e.initParams.page_index),r.value.currentPage=e.initParams.page_index),e.select.showPopup=!1),t)))}function v(t){e.check.dept_list.includes(t.id)?(e.check.dept_list.forEach((s,c)=>{s===t.id&&e.check.dept_list.splice(c,1)}),e.comment.dept.forEach(s=>{s.id===t.id&&(s.bg="",s.cl="")}),e.comment.deptId.forEach((s,c)=>{s===t.id&&e.comment.deptId.splice(c,1)})):(e.check.dept_list.push(t.id),e.comment.deptId.push(t.id),e.comment.dept.forEach(s=>{s.id===t.id&&(s.bg="#1989FA",s.cl="#FFFFFF")}))}function F(t){e.check.role_list.includes(t.id)?(e.check.role_list.forEach((s,c)=>{s===t.id&&e.check.role_list.splice(c,1,"")}),e.comment.user.forEach(s=>{s.id===t.id&&(s.bg="",s.cl="")})):(e.check.role_list.push(t.id),e.comment.user.forEach(s=>{s.id===t.id&&(s.bg="#1989FA",s.cl="#FFFFFF")})),console.log("🚀🚀check.tid_list🚀,",...e.check.role_list)}function R(){_e().then(t=>{e.comment.user=t.response.map(s=>({...s,bg:"",cl:""}))})}function I(){ie().then(t=>{e.comment.dept=t.response.map(s=>({...s,bg:"",cl:""}))})}function P(){return he(e.initParams).then(t=>{e.data=t.response.data.map(s=>({...s})),e.total=t.response.data_count})}function l(t){o.value.search===""?(e.initParams.page_index=t,P()):(e.searchParams.page_index=t,_(o.value.search,t))}function d(t=""){o.value.search="",e.initParams={page_index:t||1,page_size:10},r.value.currentPage=1,P()}function _(t,s=1){o.value.search!==""&&(e.initParams.page_index!==1&&(r.value.currentPage=1,e.initParams.page_index=1),ge({...e.searchParams,keyword:t,page_index:s}).then(c=>{e.data=c.response.data.map(m=>({...m})),e.total=c.response.data_count}))}function h(t,s){let c={0:()=>{j(()=>xe({userid:s.userid}).then(m=>(m.code===1&&c[1](m.response),m)))},1:m=>{fe({id:s.userroleid||m}).then(p=>{let y=[],S=[];p.response.dept_list.map((a,w)=>{y.push(a.id)}),p.response.role_list.map((a,w)=>{S.push(a.role_id)}),e.comment.dept.map((a,w)=>(y.includes(a.id)?(a.bg="#1989FA",a.cl="#FFFFFF"):(a.bg="",a.cl=""),a)),e.comment.user.map((a,w)=>(S.includes(a.id)?(a.bg="#1989FA",a.cl="#FFFFFF"):(a.bg="",a.cl=""),a)),p.response.dept_list=y,p.response.role_list=S,e.check=p.response,p.code===1&&(e.select.showPopup=!0),console.log("🚀🚀🚀,",e.comment,p.response)})}};c[String(t)]()}return te(()=>{document.title="人员授权",P(),R(),I()}),(t,s)=>{const c=ce,m=oe,p=re,y=le,S=ae;return f(),b(V,null,[i("div",Pe,[u(ne,{ref_key:"headerInput",ref:o,onSearchFun:_,onReset:d,path:"/welcome"},null,512),i("div",ye,[e.data.length===[]?(f(),B(c,{key:0,description:"暂无授权名单,请通过搜索添加"})):se("",!0),(f(!0),b(V,null,A(e.data,(a,w)=>(f(),b("div",{key:w,class:"w-full min-h-[90px] flex rounded-[5px] p-2 bg-white mb-3"},[i("div",Fe,[i("div",Re,g(a.username)+"("+g(a.usercard)+")",1),i("div",Ce,[(f(!0),b(V,null,A(a.dept_list,(N,K)=>(f(),B(m,{style:{margin:"5px 5px 5px 0"},key:K,plain:"",hairline:"",size:"small",type:"primary"},{default:x(()=>[E(g(N.name),1)]),_:2},1024))),128))])]),i("div",{onClick:N=>h(+(a.userroleid!==null),a),class:"w-[20%] flex justify-center items-center text-blue-500"},g(["添加","编辑"][+(a.userroleid!==null)]),9,Ue)]))),128))]),u(ke,{ref_key:"pageRef",ref:r,total:e.total,onPageChange:l},null,8,["total"])]),u(S,{show:e.select.showPopup,height:80},{content:x(()=>[(f(),b("div",{class:"w-full h-[calc(100%-64px)] bg-gray-200 overflow-y-auto",key:e.calendarKey},[i("div",Ie,[i("div",Se,[Ve,i("div",Ee,g(e.check.username),1),Ne,i("div",ze,g(e.check.usercard),1),Be,i("div",Ae,g(e.check.dept),1),Ge,i("div",$e,g(e.check.position_name),1)])]),De,i("div",Le,[Me,i("div",Te,[u(p,{wrap:""},{default:x(()=>[(f(!0),b(V,null,A(e.comment.user,(a,w)=>(f(),B(m,{onClick:N=>F(a),style:T({margin:"5px",padding:"15px !important",height:"40px",background:a.bg,color:a.cl}),size:"normal",plain:"",hairline:"",type:"primary"},{default:x(()=>[E(g(a.name),1)]),_:2},1032,["onClick","style"]))),256))]),_:1})])]),je,i("div",Oe,[Ke,i("div",Qe,[u(p,{wrap:""},{default:x(()=>[(f(!0),b(V,null,A(e.comment.dept,(a,w)=>(f(),B(m,{onClick:N=>v(a),key:w,style:T({margin:"5px",padding:"15px !important",height:"40px",background:a.bg,color:a.cl}),size:"normal",plain:"",hairline:"",type:"primary"},{default:x(()=>[E(g(a.name),1)]),_:2},1032,["onClick","style"]))),128))]),_:1})])])])),u(y,null,{default:x(()=>[u(m,{type:"primary",round:"",class:"w-[90px]",onClick:k},{default:x(()=>[E("确定")]),_:1}),u(m,{round:"",class:"w-[90px]",onClick:s[0]||(s[0]=a=>e.select.showPopup=!1)},{default:x(()=>[E("取消")]),_:1})]),_:1})]),_:1},8,["show"])],64)}}};export{He as default};
import{p as v,i as w,ai as G,a as e,aj as k,B,g as M}from"./index-CRjCC91L.js";const[S,s]=v("empty"),C={image:B("default"),imageSize:[Number,String,Array],description:String};var z=w({name:S,props:C,setup(o,{slots:a}){const F=()=>{const r=a.description?a.description():o.description;if(r)return e("p",{class:s("description")},[r])},u=()=>{if(a.default)return e("div",{class:s("bottom")},[a.default()])},f=G(),t=r=>`${f}-${r}`,l=r=>`url(#${t(r)})`,i=(r,d,D)=>e("stop",{"stop-color":r,offset:`${d}%`,"stop-opacity":D},null),n=(r,d)=>[i(r,0),i(d,100)],x=r=>[e("defs",null,[e("radialGradient",{id:t(r),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)"},[i("#EBEDF0",0),i("#F2F3F5",100,.3)])]),e("ellipse",{fill:l(r),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],c=()=>[e("defs",null,[e("linearGradient",{id:t("a"),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)])]),e("g",{opacity:".8"},[e("path",{d:"M36 131V53H16v20H2v58h34z",fill:l("a")},null),e("path",{d:"M123 15h22v14h9v77h-31V15z",fill:l("a")},null)])],h=()=>[e("defs",null,[e("linearGradient",{id:t("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%"},[i("#F2F3F5",0,.3),i("#F2F3F5",100)])]),e("g",{opacity:".8"},[e("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:l("b")},null),e("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:l("b")},null)])],y=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{id:t(1),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)]),e("linearGradient",{id:t(2),x1:"50%",x2:"50%",y2:"84%"},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),e("linearGradient",{id:t(3),x1:"100%",x2:"100%",y2:"100%"},[n("#EAEDF0","#DCDEE0")]),e("radialGradient",{id:t(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[i("#EBEDF0",0),i("#FFF",100,0)])]),e("g",{fill:"none"},[c(),e("path",{fill:l(4),d:"M0 139h160v21H0z"},null),e("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:l(2)},null),e("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7"},[e("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:l(3)},null),e("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:l(3)},null),e("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:l(3)},null),e("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:l(3)},null)]),e("g",{transform:"translate(31 105)"},[e("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),e("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),e("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),g=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(5)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:t(6)},[n("#EAEDF1","#DCDEE0")]),e("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:t(7)},[n("#EAEDF1","#DCDEE0")])]),c(),h(),e("g",{transform:"translate(36 50)",fill:"none"},[e("g",{transform:"translate(8)"},[e("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),e("rect",{fill:l(5),width:"64",height:"66",rx:"2"},null),e("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),e("g",{transform:"translate(15 17)",fill:l(6)},[e("rect",{width:"34",height:"6",rx:"1"},null),e("path",{d:"M0 14h34v6H0z"},null),e("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),e("rect",{fill:l(7),y:"61",width:"88",height:"28",rx:"1"},null),e("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),E=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(8)},[n("#EAEDF1","#DCDEE0")])]),c(),h(),x("c"),e("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:l(8)},null)]),p=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:t(9)},[n("#EEE","#D8D8D8")]),e("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:t(10)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(11)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(12)},[n("#FFF","#F7F8FA")])]),c(),h(),x("d"),e("g",{transform:"rotate(-45 113 -4)",fill:"none"},[e("rect",{fill:l(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),e("rect",{fill:l(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),e("circle",{stroke:l(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),e("circle",{fill:l(12),cx:"27",cy:"27",r:"16"},null),e("path",{d:"M37 7c-8 0-15 5-16 12",stroke:l(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),m=()=>{var r;if(a.image)return a.image();const d={error:E,search:p,network:y,default:g};return((r=d[o.image])==null?void 0:r.call(d))||e("img",{src:o.image},null)};return()=>e("div",{class:s()},[e("div",{class:s("image"),style:k(o.imageSize)},[m()]),F(),u()])}});const b=M(z);export{b as E};
import{p as v,i as w,ai as G,a as e,aj as k,B,g as M}from"./index-CtlYELMr.js";const[S,s]=v("empty"),C={image:B("default"),imageSize:[Number,String,Array],description:String};var z=w({name:S,props:C,setup(o,{slots:a}){const F=()=>{const r=a.description?a.description():o.description;if(r)return e("p",{class:s("description")},[r])},u=()=>{if(a.default)return e("div",{class:s("bottom")},[a.default()])},f=G(),t=r=>`${f}-${r}`,l=r=>`url(#${t(r)})`,i=(r,d,D)=>e("stop",{"stop-color":r,offset:`${d}%`,"stop-opacity":D},null),n=(r,d)=>[i(r,0),i(d,100)],x=r=>[e("defs",null,[e("radialGradient",{id:t(r),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)"},[i("#EBEDF0",0),i("#F2F3F5",100,.3)])]),e("ellipse",{fill:l(r),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],c=()=>[e("defs",null,[e("linearGradient",{id:t("a"),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)])]),e("g",{opacity:".8"},[e("path",{d:"M36 131V53H16v20H2v58h34z",fill:l("a")},null),e("path",{d:"M123 15h22v14h9v77h-31V15z",fill:l("a")},null)])],h=()=>[e("defs",null,[e("linearGradient",{id:t("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%"},[i("#F2F3F5",0,.3),i("#F2F3F5",100)])]),e("g",{opacity:".8"},[e("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:l("b")},null),e("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:l("b")},null)])],y=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{id:t(1),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)]),e("linearGradient",{id:t(2),x1:"50%",x2:"50%",y2:"84%"},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),e("linearGradient",{id:t(3),x1:"100%",x2:"100%",y2:"100%"},[n("#EAEDF0","#DCDEE0")]),e("radialGradient",{id:t(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[i("#EBEDF0",0),i("#FFF",100,0)])]),e("g",{fill:"none"},[c(),e("path",{fill:l(4),d:"M0 139h160v21H0z"},null),e("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:l(2)},null),e("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7"},[e("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:l(3)},null),e("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:l(3)},null),e("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:l(3)},null),e("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:l(3)},null)]),e("g",{transform:"translate(31 105)"},[e("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),e("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),e("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),g=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(5)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:t(6)},[n("#EAEDF1","#DCDEE0")]),e("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:t(7)},[n("#EAEDF1","#DCDEE0")])]),c(),h(),e("g",{transform:"translate(36 50)",fill:"none"},[e("g",{transform:"translate(8)"},[e("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),e("rect",{fill:l(5),width:"64",height:"66",rx:"2"},null),e("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),e("g",{transform:"translate(15 17)",fill:l(6)},[e("rect",{width:"34",height:"6",rx:"1"},null),e("path",{d:"M0 14h34v6H0z"},null),e("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),e("rect",{fill:l(7),y:"61",width:"88",height:"28",rx:"1"},null),e("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),E=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(8)},[n("#EAEDF1","#DCDEE0")])]),c(),h(),x("c"),e("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:l(8)},null)]),p=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:t(9)},[n("#EEE","#D8D8D8")]),e("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:t(10)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(11)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:t(12)},[n("#FFF","#F7F8FA")])]),c(),h(),x("d"),e("g",{transform:"rotate(-45 113 -4)",fill:"none"},[e("rect",{fill:l(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),e("rect",{fill:l(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),e("circle",{stroke:l(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),e("circle",{fill:l(12),cx:"27",cy:"27",r:"16"},null),e("path",{d:"M37 7c-8 0-15 5-16 12",stroke:l(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),m=()=>{var r;if(a.image)return a.image();const d={error:E,search:p,network:y,default:g};return((r=d[o.image])==null?void 0:r.call(d))||e("img",{src:o.image},null)};return()=>e("div",{class:s()},[e("div",{class:s("image"),style:k(o.imageSize)},[m()]),F(),u()])}});const b=M(z);export{b as E};
import{O as w,r as k,P as v,b as x,c as C,a as t,Q as r,w as n,a6 as g,a5 as y,o as l,R as I,d as i,T as W,a7 as B,a4 as N}from"./index-CRjCC91L.js";function A(a){return w.get("/api/Common/GetAheadWriteSwitch",a)}const V={class:"publicContainerNoPadding"},b=r("div",{class:"w-full h-[10px]"},null,-1),D={class:"w-full h-[calc(100%-120px)] p-2 overflow-y-auto"},R={__name:"index",setup(a){const s=k(),e=v({role:"0",data:{myFillingIn:[]},fillInWork:{show:!1}});function _(){e.fillInWork.show=!0}function d(){s.value.save()}function u(o){e.fillInWork.show=o}function f(){A().then(o=>{e.role=o.response})}return x(()=>{f()}),(o,G)=>{const p=B,m=g,c=N,h=y;return l(),C("div",V,[t(p,{path:"/welcome",title:"填报工作安排"}),b,r("div",D,[t(m,{ref_key:"saveRef",ref:s,show:e.fillInWork.show,onCloseDateComponent:u},null,8,["show"])]),t(h,null,{default:n(()=>[e.role==1?(l(),I(c,{key:0,type:"primary",round:"",class:"w-[120px]",onClick:_},{default:n(()=>[i("添加日期 ")]),_:1})):W("",!0),t(c,{type:"success",round:"",class:"w-[120px]",onClick:d},{default:n(()=>[i("保存")]),_:1})]),_:1})])}}};export{R as default};
import{O as w,r as k,P as v,b as x,c as C,a as t,Q as r,w as n,a6 as g,a5 as y,o as l,R as I,d as i,T as W,a7 as B,a4 as N}from"./index-CtlYELMr.js";function A(a){return w.get("/api/Common/GetAheadWriteSwitch",a)}const V={class:"publicContainerNoPadding"},b=r("div",{class:"w-full h-[10px]"},null,-1),D={class:"w-full h-[calc(100%-120px)] p-2 overflow-y-auto"},R={__name:"index",setup(a){const s=k(),e=v({role:"0",data:{myFillingIn:[]},fillInWork:{show:!1}});function _(){e.fillInWork.show=!0}function d(){s.value.save()}function u(o){e.fillInWork.show=o}function f(){A().then(o=>{e.role=o.response})}return x(()=>{f()}),(o,G)=>{const p=B,m=g,c=N,h=y;return l(),C("div",V,[t(p,{path:"/welcome",title:"填报工作安排"}),b,r("div",D,[t(m,{ref_key:"saveRef",ref:s,show:e.fillInWork.show,onCloseDateComponent:u},null,8,["show"])]),t(h,null,{default:n(()=>[e.role==1?(l(),I(c,{key:0,type:"primary",round:"",class:"w-[120px]",onClick:_},{default:n(()=>[i("添加日期 ")]),_:1})):W("",!0),t(c,{type:"success",round:"",class:"w-[120px]",onClick:d},{default:n(()=>[i("保存")]),_:1})]),_:1})])}}};export{R as default};
......@@ -6,8 +6,8 @@
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover, user-scalable=0">
<title>一周安排</title>
<script type="module" crossorigin src="./assets/index-CRjCC91L.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-EZwx0enI.css">
<script type="module" crossorigin src="./assets/index-CtlYELMr.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-2Xr08w2n.css">
</head>
<body>
<div id="app"></div>
......
......@@ -7,25 +7,26 @@
返回
</div>
<div class=" w-[72%] h-full bg-red-900">
<div class=" w-full h-full bg-red-900">
<!-- :click-right-icon="searchFunction"-->
<van-search
v-model="search"
placeholder="请输入搜索关键词"
:click-right-icon="searchFunction"
:clearable="false"
@clear="reset"
>
<template #left-icon></template>
<template #right-icon>
<van-icon @click="searchFunction" name="search"/>
</template>
<!-- <template #right-icon>-->
<!-- <van-icon @click="searchFunction" name="search"/>-->
<!-- </template>-->
</van-search>
</div>
<div @click="reset" class="w-[13%] text-[#5589FB] h-full flex justify-center text-[14px] items-center">重置</div>
<!-- <div @click="reset" class="w-[13%] text-[#5589FB] h-full flex justify-center text-[14px] items-center">重置</div>-->
</div>
</template>
<script setup>
import {getCurrentInstance, ref, defineProps, defineEmits} from "vue";
import {getCurrentInstance, ref, defineProps, defineEmits, watch} from "vue";
import {useRouter} from "vue-router";
const router = useRouter()
......@@ -49,7 +50,7 @@ function back() {
})
}
const search = ref('')
let search = ref('')
function searchFunction() {
//functionActionFlag 防止同界面 多个搜索框。 false 执行searchFun true 执行searchPeople
......@@ -62,6 +63,19 @@ function reset() {
emit('reset', '')
}
function clear() {
//清空输入框
search.value = ''
reset()
}
watch([() => search.value], (newValue, oldValue) => {
if (newValue[0] === '') reset()
else {
searchFunction()
}
})
defineExpose({
search,
})
......
......@@ -102,7 +102,7 @@
</div>
<div
v-if="validateCp(item.date) === false &&item.is_allday == 1 ||validateCp(item.date) === false &&item.is_allday == 0"
class="w-full h-[30px] flex items-center justify-between p-1">
class="w-full h-[45px] flex items-center justify-between p-1 border-t-[1px] border-[#E5E7EB] p-1">
<div>全天</div>
<div>
<van-switch :active-value="1" :inactive-value="0"
......@@ -238,7 +238,13 @@ function save() {
//保存填报工作
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(() => {
return api.postApiPlanProjectPlanProjectSave(init.work.data).then(res => {
return api.postApiPlanProjectPlanProjectSave(init.work.data.map((cur, index) => {
if (Number(cur.is_allday) === 1) {
if (cur.after_plan) cur.fore_plan = cur.after_plan
else cur.after_plan = cur.fore_plan
}
return cur
})).then(res => {
if (res.code === 1) PlanProjectInit()
return res
})
......
......@@ -5,45 +5,46 @@
<span :style="{background:props.data.peopleBg,color:props.data.peopleCl}">{{ props.data.username }}</span>-<span
:style="{background:props.data.deptBg,color:props.data.deptCl}">{{ props.data.dept_name }}</span>
</div>
<div v-if="props.alldayOrMidafternoonStatus" class="w-[65%] min-h-full p-2">
<!-- 上下午-->
<div class="w-full min-h-1/2 ">
<div v-if="props.alldayOrMidafternoonStatus" class="w-[65%] h-auto p-2">
<div class="w-full min-h-[108px] ">
<van-text-ellipsis
rows="2"
:content="props.data.fore_plan"
rows="4"
:content="`全天:`+props.data.after_plan"
expand-text="展开"
collapse-text="收起"
/>
</div>
<div class="w-full min-h-1/2 border-solid border-t-[1px] text-[#4B5563]">
</div>
<div v-else class="w-[65%] min-h-[108px] p-2">
<!-- 上下午-->
<div class="w-full min-h-[54px] ">
<van-text-ellipsis
rows="2"
:content="props.data.after_plan"
:content="`上午:`+props.data.fore_plan"
expand-text="展开"
collapse-text="收起"
/>
</div>
</div>
<!-- 全天-->
<div v-else class="w-[65%] min-h-[108px] p-2">
<div class="w-full min-h-full ">
<div class="w-full min-h-[54px] border-solid border-t-[1px] text-[#4B5563]">
<van-text-ellipsis
rows="4"
:content="props.data.after_plan"
rows="2"
:content="`下午:`+props.data.after_plan"
expand-text="展开"
collapse-text="收起"
/>
</div>
</div>
<!-- 全天-->
<div
class="w-[35%] flex items-center flex-wrap content-center min-h-[108px] border-[#E5E7EB] border-l-[1px] border-dashed p-3">
class="w-[35%] flex items-center flex-wrap content-center min-h-[108px] border-[#E5E7EB] border-l-[1px] border-dashed p-2">
<p class="w-full text-[14px]">{{ dayjs(props.data.date).format('YYYY年MM月DD日') }}</p>
<p class="w-full ">{{ props.data.week }}</p>
</div>
<div class="w-full h-11 p-2 flex items-center justify-end border-t-[1px] border-[#E5E7EB] border-solid">
<div v-if="props.data.planid "
class="w-full h-11 p-2 flex items-center justify-end border-t-[1px] border-[#E5E7EB] border-solid">
<van-button class="w-20" @click="cancel($parent,props.data)" type="primary" size="small">
{{ props.data.attention !== void 0 ? ['关注', '取消关注'][props.data.attention] : '取消关注' }}
</van-button>
......@@ -86,7 +87,6 @@ function cancel(parent, data) {
})
},
'1': (value = 0) => {
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(() => {
return api.getApiCollectUnCollect({
plan_id: props.data.planid,
......@@ -96,20 +96,17 @@ function cancel(parent, data) {
return res
})
})
})
}
}
strategy[props.data.attention]()
} else {
//主页
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(() => {
return api.getApiCollectUnCollect({plan_id: props.data.planid, collect_userid: props.data.userid}).then(res => {
if (res.code === 1) parent.GetCollectList()
return res
})
})
})
}
}
......
......@@ -24,12 +24,12 @@ const getTokenAction = async (date) => {
})
} else if (res.response.access_token.token_content !== '') {
// access_token.token_content
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('oneWeekARange-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
Cookies.set('oneWeekARange-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
name: 'workArrangementFilling'
})
}
}
......
......@@ -31,7 +31,7 @@
<!-- 编辑权限-->
<popup :show="init.select.showPopup" :height="80">
<template #content>
<div class="w-full h-[calc(100%-64px)] bg-gray-200" :key="init.calendarKey">
<div class="w-full h-[calc(100%-64px)] bg-gray-200 overflow-y-auto" :key="init.calendarKey">
<div class="w-full h-auto bg-white ">
<div class="w-full min-h-[110px] p-4 flex justify-between flex-wrap">
<div class="h-[30px] w-[20%]">姓名:</div>
......@@ -169,10 +169,12 @@ function save() {
}),
}).then(res => {
if (res.code === 1) {
headerInput.value.search !== '' ? (() => {
search(headerInput.value.search, init.searchParams.page_index)
})() : () => reset()()
})() : (() => {
reset(init.initParams.page_index)
pageRef.value.currentPage = init.initParams.page_index
})()
init.select.showPopup = false
}
return res
......@@ -307,12 +309,12 @@ function pageChange(index) {
}
}
function reset() {
function reset(index = '') {
//重置
headerInput.value.search = ''
init.initParams = {
page_index: 1,
page_index: (index || 1),
page_size: 10,
}
pageRef.value.currentPage = 1
......
......@@ -615,7 +615,8 @@ function selectTheExternalDepartment(deptId) {
} else {
init.paramsWeek.dept_id_list.push(deptId)
}
if (!!init.paramsWeek.dept_id_list.length) init.select.action = 1
if (validateActionSelect()) init.select.action = true
else init.select.action = false
init.weekArray.map((cur, index) => {
......@@ -643,8 +644,8 @@ function pickSomeoneFromTheOutside(userId) {
} else {
init.paramsWeek.tid_list.push(userId)
}
if (!!init.paramsWeek.tid_list.length) init.select.action = 1
if (validateActionSelect()) init.select.action = true
else init.select.action = false
init.weekArray.map((cur, index) => {
if (init.paramsWeek.dept_id_list.includes(cur.deptId)) {
cur.deptBg = '#1989FA'
......@@ -664,6 +665,11 @@ function pickSomeoneFromTheOutside(userId) {
}
function validateActionSelect() {
//验证 是否选中 部门和用户
return !!init.paramsWeek.dept_id_list.length || !!init.paramsWeek.tid_list.length
}
const formatter = (day) => {
//自定义日期文案
......
......@@ -5,7 +5,7 @@
<van-divider v-if="!!Object.keys(init.data.mySchedule).length"
:style="{ color: '#1989FA',fontSize:'18px', margin:0, borderColor: '#1989fa', padding:'5px 0'}"
content-position="left">
我的周安排
今日安排
</van-divider>
<weeklyArrangementCard v-if="!!Object.keys(init.data.mySchedule).length" :data="init.data.mySchedule"/>
......@@ -42,7 +42,7 @@
<popup :show="init.select.showPopup" :height="60">
<template #content>
<div class="w-full h-[calc(100%-64px)] bg-gray-200 relative " :key="init.calendarKey">
<div class="w-full h-[calc(100%-64px)] bg-gray-200 relative overflow-y-auto" :key="init.calendarKey">
<loading :show="init.loading"></loading>
<van-cell inset title="学期范围"
:value="init.paramsTransfers.semester_date_begin + ' - '+init.paramsTransfers.semester_date_end"
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或