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

1

上级 d5303875
流水线 #33808 已通过 ,包含阶段
in 1 minute 和 29 second
import{u as f,f as m,o as _,c as d,a as k,h as y,L as g,i as S,S as w,j as s,G as r,k as c,l as i,n as v}from"./index-ad3ad53b.js";const x={style:{display:"flex","justify-content":"center","margin-top":"50%"}},Y={__name:"SSO",setup(N){const e=f(),u=async o=>{const t=await w(o);if(t.code!==1)await e.replace({name:"403"});else if(t.response.access_token.token_content!==""){s.set("admin-token",t.response.access_token.token_content),s.set("time",t.response.access_token.expires);const n=await r();s.set("user-info",n.response.role),localStorage.setItem("user-info",n.response.role),s.set("userInfo",JSON.stringify(n.response)),c({date:i().format("YYYY-MM-DD")}).then(a=>{s.set("userDutyDate",JSON.stringify(a.response)),e.replace({name:"welcome"})})}},l=async o=>{const t=await v(o);if(t.code!==1)await e.replace({name:"403"});else if(t.response.access_token.token_content!==""){s.set("admin-token",t.response.access_token.token_content),s.set("time",t.response.access_token.expires);const n=await r();s.set("user-info",n.response.role),localStorage.setItem("user-info",n.response.role),s.set("userInfo",JSON.stringify(n.response)),c({date:i().format("YYYY-MM-DD")}).then(a=>{s.set("userDutyDate",JSON.stringify(a.response)),e.replace({name:"welcome"})})}},p=async()=>{if(Number(e.currentRoute.value.query.type)===2){let o={token:e.currentRoute.value.query.token};await u(o)}else if(Number(e.currentRoute.value.query.type)===1){let o={sign:e.currentRoute.value.query.sign,code:e.currentRoute.value.query.code,timestamp:e.currentRoute.value.query.timestamp};await l(o)}};return m(()=>{p()}),(o,t)=>{const n=g;return _(),d("div",x,[k(n,{size:"38px",color:"#1989fa",vertical:""},{default:y(()=>[S(" 登录中")]),_:1})])}}};export{Y as default}; import{u as f,f as m,o as _,c as d,a as k,h as y,L as g,i as S,S as w,j as s,G as r,k as c,l as i,n as v}from"./index-fa0494eb.js";const x={style:{display:"flex","justify-content":"center","margin-top":"50%"}},Y={__name:"SSO",setup(N){const e=f(),u=async o=>{const t=await w(o);if(t.code!==1)await e.replace({name:"403"});else if(t.response.access_token.token_content!==""){s.set("admin-token",t.response.access_token.token_content),s.set("time",t.response.access_token.expires);const n=await r();s.set("user-info",n.response.role),localStorage.setItem("user-info",n.response.role),s.set("userInfo",JSON.stringify(n.response)),c({date:i().format("YYYY-MM-DD")}).then(a=>{s.set("userDutyDate",JSON.stringify(a.response)),e.replace({name:"welcome"})})}},l=async o=>{const t=await v(o);if(t.code!==1)await e.replace({name:"403"});else if(t.response.access_token.token_content!==""){s.set("admin-token",t.response.access_token.token_content),s.set("time",t.response.access_token.expires);const n=await r();s.set("user-info",n.response.role),localStorage.setItem("user-info",n.response.role),s.set("userInfo",JSON.stringify(n.response)),c({date:i().format("YYYY-MM-DD")}).then(a=>{s.set("userDutyDate",JSON.stringify(a.response)),e.replace({name:"welcome"})})}},p=async()=>{if(Number(e.currentRoute.value.query.type)===2){let o={token:e.currentRoute.value.query.token};await u(o)}else if(Number(e.currentRoute.value.query.type)===1){let o={sign:e.currentRoute.value.query.sign,code:e.currentRoute.value.query.code,timestamp:e.currentRoute.value.query.timestamp};await l(o)}};return m(()=>{p()}),(o,t)=>{const n=g;return _(),d("div",x,[k(n,{size:"38px",color:"#1989fa",vertical:""},{default:y(()=>[S(" 登录中")]),_:1})])}}};export{Y as default};
import{u as y,f as d,o as m,c as _,a as g,h as S,j as e,G as u,L as h,i as v,S as q,k as c,l as i,n as w}from"./index-ad3ad53b.js";const N={style:{display:"flex","justify-content":"center","margin-top":"50%"}},D={__name:"SSOInfo",setup(R){const t=y(),l=async s=>{const n=await q(s);if(n.code!==1)await t.replace({name:"403"});else if(n.response.access_token.token_content!==""){e.set("admin-token",n.response.access_token.token_content),e.set("time",n.response.access_token.expires);let o=t.currentRoute.value.query.links,r=t.currentRoute.value.query.id;const a=await u();e.set("user-info",a.response.role),localStorage.setItem("user-info",a.response.role),e.set("userInfo",JSON.stringify(a.response)),c({date:i().format("YYYY-MM-DD")}).then(k=>{e.set("userDutyDate",JSON.stringify(k.response)),t.push({path:`/${o}`,query:{id:r}})})}},p=async s=>{const n=await w(s);if(n.code!==1)await t.replace({name:"403"});else if(n.response.access_token.token_content!==""){e.set("admin-token",n.response.access_token.token_content),e.set("time",n.response.access_token.expires);let o=t.currentRoute.value.query.links;const r=await u();e.set("user-info",r.response.role),localStorage.setItem("user-info",r.response.role),e.set("userInfo",JSON.stringify(r.response)),c({date:i().format("YYYY-MM-DD")}).then(a=>{e.set("userDutyDate",JSON.stringify(a.response)),t.push({path:`/${o}`})})}},f=async()=>{if(Number(t.currentRoute.value.query.type)===2){e.set("token",t.currentRoute.value.query.token);let s={token:e.get("token")};await l(s)}else if(Number(t.currentRoute.value.query.type)===1){let s={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await p(s)}u(e.get("admin-token")).then(s=>{e.set("userInfo",JSON.stringify(s.response))})};return d(()=>{f()}),(s,n)=>{const o=h;return m(),_("div",N,[g(o,{size:"38px",color:"#1989fa",vertical:""},{default:S(()=>[v(" 登录中")]),_:1})])}}};export{D as default}; import{u as y,f as d,o as m,c as _,a as g,h as S,j as e,G as u,L as h,i as v,S as q,k as c,l as i,n as w}from"./index-fa0494eb.js";const N={style:{display:"flex","justify-content":"center","margin-top":"50%"}},D={__name:"SSOInfo",setup(R){const t=y(),l=async s=>{const n=await q(s);if(n.code!==1)await t.replace({name:"403"});else if(n.response.access_token.token_content!==""){e.set("admin-token",n.response.access_token.token_content),e.set("time",n.response.access_token.expires);let o=t.currentRoute.value.query.links,r=t.currentRoute.value.query.id;const a=await u();e.set("user-info",a.response.role),localStorage.setItem("user-info",a.response.role),e.set("userInfo",JSON.stringify(a.response)),c({date:i().format("YYYY-MM-DD")}).then(k=>{e.set("userDutyDate",JSON.stringify(k.response)),t.push({path:`/${o}`,query:{id:r}})})}},p=async s=>{const n=await w(s);if(n.code!==1)await t.replace({name:"403"});else if(n.response.access_token.token_content!==""){e.set("admin-token",n.response.access_token.token_content),e.set("time",n.response.access_token.expires);let o=t.currentRoute.value.query.links;const r=await u();e.set("user-info",r.response.role),localStorage.setItem("user-info",r.response.role),e.set("userInfo",JSON.stringify(r.response)),c({date:i().format("YYYY-MM-DD")}).then(a=>{e.set("userDutyDate",JSON.stringify(a.response)),t.push({path:`/${o}`})})}},f=async()=>{if(Number(t.currentRoute.value.query.type)===2){e.set("token",t.currentRoute.value.query.token);let s={token:e.get("token")};await l(s)}else if(Number(t.currentRoute.value.query.type)===1){let s={sign:t.currentRoute.value.query.sign,code:t.currentRoute.value.query.code,timestamp:t.currentRoute.value.query.timestamp};await p(s)}u(e.get("admin-token")).then(s=>{e.set("userInfo",JSON.stringify(s.response))})};return d(()=>{f()}),(s,n)=>{const o=h;return m(),_("div",N,[g(o,{size:"38px",color:"#1989fa",vertical:""},{default:S(()=>[v(" 登录中")]),_:1})])}}};export{D as default};
import{b as v,d as w,e as G,a as e,g as k,m as M,w as B}from"./index-ad3ad53b.js";const[S,s]=v("empty"),C={image:M("default"),imageSize:[Number,String,Array],description:String};var b=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(),l=r=>`${f}-${r}`,t=r=>`url(#${l(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:l(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:t(r),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],c=()=>[e("defs",null,[e("linearGradient",{id:l("a"),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)])]),e("g",{opacity:".8"},[e("path",{d:"M36 131V53H16v20H2v58h34z",fill:t("a")},null),e("path",{d:"M123 15h22v14h9v77h-31V15z",fill:t("a")},null)])],h=()=>[e("defs",null,[e("linearGradient",{id:l("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:t("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:t("b")},null)])],y=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{id:l(1),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)]),e("linearGradient",{id:l(2),x1:"50%",x2:"50%",y2:"84%"},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),e("linearGradient",{id:l(3),x1:"100%",x2:"100%",y2:"100%"},[n("#EAEDF0","#DCDEE0")]),e("radialGradient",{id:l(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:t(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:t(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:t(3)},null),e("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:t(3)},null),e("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:t(3)},null),e("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:t(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:l(5)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:l(6)},[n("#EAEDF1","#DCDEE0")]),e("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:l(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:t(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:t(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:t(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:l(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:t(8)},null)]),p=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:l(9)},[n("#EEE","#D8D8D8")]),e("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:l(10)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(11)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(12)},[n("#FFF","#F7F8FA")])]),c(),h(),x("d"),e("g",{transform:"rotate(-45 113 -4)",fill:"none"},[e("rect",{fill:t(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),e("rect",{fill:t(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),e("circle",{stroke:t(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),e("circle",{fill:t(12),cx:"27",cy:"27",r:"16"},null),e("path",{d:"M37 7c-8 0-15 5-16 12",stroke:t(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 A=B(b);export{A as E}; import{b as v,d as w,e as G,a as e,g as k,m as M,w as B}from"./index-fa0494eb.js";const[S,s]=v("empty"),C={image:M("default"),imageSize:[Number,String,Array],description:String};var b=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(),l=r=>`${f}-${r}`,t=r=>`url(#${l(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:l(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:t(r),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8"},null)],c=()=>[e("defs",null,[e("linearGradient",{id:l("a"),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)])]),e("g",{opacity:".8"},[e("path",{d:"M36 131V53H16v20H2v58h34z",fill:t("a")},null),e("path",{d:"M123 15h22v14h9v77h-31V15z",fill:t("a")},null)])],h=()=>[e("defs",null,[e("linearGradient",{id:l("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:t("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:t("b")},null)])],y=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{id:l(1),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)]),e("linearGradient",{id:l(2),x1:"50%",x2:"50%",y2:"84%"},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),e("linearGradient",{id:l(3),x1:"100%",x2:"100%",y2:"100%"},[n("#EAEDF0","#DCDEE0")]),e("radialGradient",{id:l(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:t(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:t(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:t(3)},null),e("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:t(3)},null),e("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:t(3)},null),e("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:t(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:l(5)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:l(6)},[n("#EAEDF1","#DCDEE0")]),e("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:l(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:t(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:t(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:t(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:l(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:t(8)},null)]),p=()=>e("svg",{viewBox:"0 0 160 160"},[e("defs",null,[e("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:l(9)},[n("#EEE","#D8D8D8")]),e("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:l(10)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(11)},[n("#F2F3F5","#DCDEE0")]),e("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:l(12)},[n("#FFF","#F7F8FA")])]),c(),h(),x("d"),e("g",{transform:"rotate(-45 113 -4)",fill:"none"},[e("rect",{fill:t(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),e("rect",{fill:t(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),e("circle",{stroke:t(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),e("circle",{fill:t(12),cx:"27",cy:"27",r:"16"},null),e("path",{d:"M37 7c-8 0-15 5-16 12",stroke:t(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 A=B(b);export{A as E};
import{u as y,r as f,f as x,o as g,c as v,a,s as l,h as t,F as C,a3 as h,V as w,t as n,a0 as r,i as N,N as k,a2 as B,U as V}from"./index-ad3ad53b.js";const b={class:"container"},F={__name:"index",setup(L){const o=y();let e=f({data:{}});const d=async()=>{let _={id:o.currentRoute.value.query.id};const i=await h(_);e.data=i.response};x(()=>{d()});const p=()=>o.push({name:"signList"});return(_,i)=>{const u=k,s=B,c=V,m=w;return g(),v(C,null,[a(u,{title:"值班信息","left-text":"返回","left-arrow":"",onClickLeft:p}),l("div",b,[a(m,{class:"cardContainer",inset:""},{default:t(()=>[a(c,{class:"cardContent",title:n(e).data.username},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.card_name),1)]),_:1}),a(s,{color:"#7232dd",type:"primary",plain:"",style:{"margin-left":"10px"}},{default:t(()=>[N(r(["值班教师","值班领导"][n(e).data.is_lead]),1)]),_:1})]),_:1},8,["title"]),a(c,{class:"cardContent",title:"手机号"},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.mobile),1)]),_:1})]),_:1}),a(c,{class:"cardContent",title:"日期"},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.watch_date),1)]),_:1})]),_:1}),a(c,{class:"cardContent",title:"时段"},{extra:t(()=>[a(s,{type:"primary",plain:"",style:{"margin-left":"10px"}},{default:t(()=>[l("span",null,r(n(e).data.watch_hour_time),1)]),_:1})]),_:1}),a(c,{class:"cardContent",title:"类型"},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.watchtypename+"-"+n(e).data.dept_name+"-"+n(e).data.campusname),1)]),_:1})]),_:1})]),_:1})])],64)}}};export{F as default}; import{u as y,r as f,f as x,o as g,c as v,a,s as l,h as t,F as C,a6 as h,V as w,t as n,a3 as r,i as N,N as k,a5 as B,U as V}from"./index-fa0494eb.js";const b={class:"container"},F={__name:"index",setup(L){const o=y();let e=f({data:{}});const d=async()=>{let _={id:o.currentRoute.value.query.id};const i=await h(_);e.data=i.response};x(()=>{d()});const p=()=>o.push({name:"signList"});return(_,i)=>{const u=k,s=B,c=V,m=w;return g(),v(C,null,[a(u,{title:"值班信息","left-text":"返回","left-arrow":"",onClickLeft:p}),l("div",b,[a(m,{class:"cardContainer",inset:""},{default:t(()=>[a(c,{class:"cardContent",title:n(e).data.username},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.card_name),1)]),_:1}),a(s,{color:"#7232dd",type:"primary",plain:"",style:{"margin-left":"10px"}},{default:t(()=>[N(r(["值班教师","值班领导"][n(e).data.is_lead]),1)]),_:1})]),_:1},8,["title"]),a(c,{class:"cardContent",title:"手机号"},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.mobile),1)]),_:1})]),_:1}),a(c,{class:"cardContent",title:"日期"},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.watch_date),1)]),_:1})]),_:1}),a(c,{class:"cardContent",title:"时段"},{extra:t(()=>[a(s,{type:"primary",plain:"",style:{"margin-left":"10px"}},{default:t(()=>[l("span",null,r(n(e).data.watch_hour_time),1)]),_:1})]),_:1}),a(c,{class:"cardContent",title:"类型"},{extra:t(()=>[a(s,{type:"primary",plain:""},{default:t(()=>[l("span",null,r(n(e).data.watchtypename+"-"+n(e).data.dept_name+"-"+n(e).data.campusname),1)]),_:1})]),_:1})]),_:1})])],64)}}};export{F as default};
import{_ as fe,r as T,l as n,p as d,q as he,f as ye,o as g,c as W,s as m,a as o,h as i,t as p,F as A,j as De,C as ge,v as Ye,P as ve,i as j,x as b,y as R,z as K,A as we,B as xe,D as H,E as Me,H as ke,I as $,J as Ce,K as Se,W as Le,M as Te,O as be,Q as Ie,R as Ge,T as Oe,U as We,V as Ae,X as Ve,Y as Ne,Z as Ue,$ as Fe,a0 as M,a1 as Pe,a2 as Be}from"./index-ad3ad53b.js";function ze(){const h=window.localStorage.getItem("user-info");return h?h.includes("管理员"):!1}const J=h=>(we("data-v-e11e2dd9"),h=h(),xe(),h),Ee={class:"container1",style:{position:"relative",background:"#F5F5F7"}},je={style:{width:"100%"}},Re=J(()=>m("div",{class:""},null,-1)),Ke=J(()=>m("div",{style:{position:"absolute",bottom:"20px",width:"100%",color:"#D0CECF"}},[m("div",{style:{display:"flex",width:"100%",height:"50px","justify-content":"center","align-items":"center"}},[m("span",{style:{"text-align":"center",color:"#b1b1b1","font-size":"12px",width:"100%"}}," V1.0.1.250221-250225 ")])],-1)),He={__name:"index",setup(h){let y=T({minDate:new Date(n().year(),n().month()-1,1),maxDate:new Date(n().year(),n().month()+2,0),array:[],dateFlag:!1,addDateFlag:!0,week:["周日","周一","周二","周三","周四","周五","周六"],center:!0,right:!1,left:!1,isShow:!0,toDay:"",dateBackgroundText:[],loading:!1});const k=d(!1),w=d(!1),V=d(!1),N=d({}),x=d(!1),U=d(""),F=d([]),I=d(!1);let q=d("");d(1);let _=T({page_index:0,page_size:1e3,startTime:"",endTime:"",GetWatchListInitArray:[]});const P=e=>{const t=Number(n(e.date).format("M")),r=Number(n(e.date).format("D"));return JSON.parse(De.get("userDutyDate")).forEach((c,L)=>{const v=Number(n(c).format("M")),D=Number(n(c).format("D"));t===v&&r===D&&(e.bottomInfo="值班")}),e};function C(){_.GetWatchListInitArray=[],l.params.page_index=1,k.value=!1}const Q=e=>{X(n(e).format("YYYY-MM-DD"))},X=e=>{C(),l.params.end_time=e,l.params.start_time=e,Y()},Z=()=>{const t=n().startOf("week"),r=[];for(let s=0;s<7;s++){const c=t.add(s,"day");r.push(c.format("YYYY-MM-DD")),y.array.push({date:c.format("YYYY-MM-DD"),dateDay:c.format("D"),week:y.week})}console.log("🚀🚀🚀,",n().format("YYYY-MM-DD"),y.array),q.value=y.array.length},ee=()=>{H.push({name:"myDuty"})},te=()=>{H.push({name:"signList"})},Y=async()=>{w.value=!0;let e={is_lead:3,...l.params};Me(e).then(t=>{t.response.data.length===0&&(k.value=!0),t.response.data.forEach(s=>{_.GetWatchListInitArray.push(s)});let r=1;r===1&&(_.GetWatchListInitArray.forEach((s,c)=>{y.dateBackgroundText.push(s.watch_date)}),r++),w.value=!1}).finally(()=>{l.params.page_index++,w.value=!1})};function ae(){Y(),l.params.page_index++}const ne=()=>{const e=n();e.startOf("day").format("YYYY-MM-DD"),e.endOf("month").format("YYYY-MM-DD"),_.startTime=n().format("YYYY-MM-DD"),_.endTime=n().format("YYYY-MM-DD")};function se(e){x.value=!0,N.value=e}function oe(e){I.value=!0,ke(e).then(t=>{t.code==1?F.value=t.response.map(r=>({...r,text:r.name,value:r.id})):$(t.msg_detail)}).finally(()=>{I.value=!1})}function le(e){if(e.selectedOptions[0]==null){Ce("请选择换班人员");return}Se({title:"提示",message:"是否确认换班?"}).then(()=>{let t=N.value.watchid,r=e.selectedOptions[0].id;Le(t,r).then(s=>{s.code==1?(Te(s.response),x.value=!1,_.page_index=1,_.GetWatchListInitArray=[],Y()):$(s.msg_detail)})}).catch(()=>{})}function re(){x.value=!1}const l=T({params:{dep_id:"",key_name:"",start_time:n().format("YYYY-MM-DD"),end_time:n().format("YYYY-MM-DD"),type_id:"",watchhour_time:"",is_lead:3,campus_id:"",page_index:1,page_size:1e3}});let u=T({minDate:new Date(n().year(),n().month()-1,1),maxDate:new Date(n().year(),n().month()+2,0),addDutySelectList:[],DatePickerKey:1,showCenter:!1,message:"",show:!1,startTime:n().startOf("day").format("YYYY-MM-DD"),endTime:n().startOf("day").format("YYYY-MM-DD"),page_index:1,page_size:1e3,total:"",deleteSetTimeOut:"",menuKey:1,loading:!1,watchtypeid:"",dept_id:"",watch_hour_id:"",campusid:""});d([]),d(!1),d(!1),d(!1),d({});const G=d("");function ie(){l.params={dep_id:"",key_name:"",start_time:n().format("YYYY-MM-DD"),end_time:n().format("YYYY-MM-DD"),type_id:"",watchhour_time:"",is_lead:3,campus_id:"",page_index:1,page_size:1e3},G.value&&G.value.reset(),C(),Y()}const de=async e=>{l.params.start_time=n(e).format("YYYY-MM-DD"),l.params.end_time=n(e).format("YYYY-MM-DD"),C(),Y(),u.menuKey++,ce()},ce=()=>{u.show=!1},ue=()=>{u.show=!0},me=()=>{Promise.all([S("dutyType","类型","type_id",be),S("dutyHourTime","时段","watchhour_time",Ie),S("campusname","校区","campus_id",Ge),S("dept_name","部门","dep_id",Oe)]).then(e=>{u.addDutySelectList=e,u.DatePickerKey++})},S=(e,t,r,s)=>new Promise(async(c,L)=>{const v=await s(),D=[];v.response.map((f,z)=>{D.push({text:f.name,value:f.id})}),c([D,t,r])});return he([()=>l.params.key_name,()=>l.params.type_id,()=>l.params.watchhour_time,()=>l.params.campus_id,()=>l.params.dep_id],(e,t)=>{(e[0]||e[1]||e[2]||e[3]||e[4])&&(C(),Y())},{deep:!0}),ye(()=>{ne(),Z(),me()}),(e,t)=>{const r=ge,s=We,c=Ae,L=Ve,v=Ne,D=Pe,B=Ue,f=Be,z=Ye,pe=Fe,_e=ve;return g(),W(A,null,[m("div",Ee,[o(z,{class:"container",loading:w.value,"onUpdate:loading":t[1]||(t[1]=a=>w.value=a),error:V.value,"onUpdate:error":t[2]||(t[2]=a=>V.value=a),finished:k.value,"onUpdate:finished":t[3]||(t[3]=a=>k.value=a),"error-text":"请求失败,点击重新加载","finished-text":"数据全部加载完成",onLoad:ae},{default:i(()=>[o(r,{type:"single","show-subtitle":!1,poppable:!1,"show-confirm":!1,style:{height:"350px"},"show-title":!1,onConfirm:Q,formatter:P,minDate:p(y).minDate,maxDate:p(y).maxDate},null,8,["minDate","maxDate"]),o(c,{style:{width:"100%","margin-top":"10px"}},{default:i(()=>[o(s,{icon:"manager-o",onClick:ee,"is-link":"",class:"cardTitle",title:"我的值班",value:"值班记录"}),o(s,{icon:"label-o",onClick:te,"is-link":"",class:"cardTitle",title:"签到列表",value:"教师签到"})]),_:1}),m("div",je,[o(v,{modelValue:l.params.key_name,"onUpdate:modelValue":t[0]||(t[0]=a=>l.params.key_name=a),"show-action":"",placeholder:"请输入搜索关键词"},{action:i(()=>[o(L,{onClick:ie},{default:i(()=>[j(" 重置 ")]),_:1})]),_:1},8,["modelValue"]),o(B,{overlay:!0,class:"aaa"},{default:i(()=>[p(u).addDutySelectList.length>0?(g(),b(D,{key:0,onOpen:ue,title:"日期"})):R("",!0),(g(!0),W(A,null,K(p(u).addDutySelectList,(a,O)=>(g(),b(D,{modelValue:l.params[a[2]],"onUpdate:modelValue":E=>l.params[a[2]]=E,key:O,title:a[1],options:a[0]},null,8,["modelValue","onUpdate:modelValue","title","options"]))),128))]),_:1})]),(g(!0),W(A,null,K(p(_).GetWatchListInitArray,(a,O)=>(g(),b(c,{key:O,inset:"",class:"cardContainer w-full mb-12"},{default:i(()=>[o(s,{class:"cardContent",title:a.username},{extra:i(()=>[o(f,{type:"primary",plain:""},{default:i(()=>[m("span",null,M(a.card_name),1)]),_:2},1024),o(f,{color:["","#7232dd"][a.is_lead],type:"primary",plain:"",style:{"margin-left":"10px"}},{default:i(()=>[m("span",null,M(["值班教师","值班领导"][a.is_lead]),1)]),_:2},1032,["color"])]),_:2},1032,["title"]),o(s,{class:"cardContent",title:"日期"},{extra:i(()=>[o(f,{type:"primary",plain:""},{default:i(()=>[m("span",null,M(a.watch_date),1)]),_:2},1024),o(f,{type:"primary",plain:"",style:{"margin-left":"10px"}},{default:i(()=>[m("span",null,M(a.watch_hour_time),1)]),_:2},1024)]),_:2},1024),o(s,{class:"cardContent",title:"类型"},{extra:i(()=>[o(f,{type:"primary",plain:""},{default:i(()=>[m("span",null,M(a.watchtypename+"-"+a.dept_name+"-"+a.campusname),1)]),_:2},1024)]),_:2},1024),ze()?(g(),b(s,{key:0,class:"",title:"换班"},{value:i(()=>[o(L,{plain:"",type:"warning",size:"small",onClick:E=>se(a)},{default:i(()=>[j("换班")]),_:2},1032,["onClick"])]),_:2},1024)):R("",!0)]),_:2},1024))),128)),Re]),_:1},8,["loading","error","finished"]),Ke]),o(r,{minDate:p(u).minDate,"allow-same-day":!0,ref_key:"dateRangeRef",ref:G,maxDate:p(u).maxDate,show:p(u).show,"onUpdate:show":t[4]||(t[4]=a=>p(u).show=a),formatter:P,onConfirm:de},null,8,["minDate","maxDate","show"]),o(_e,{show:x.value,"onUpdate:show":t[6]||(t[6]=a=>x.value=a),round:"",position:"bottom"},{default:i(()=>[o(v,{modelValue:U.value,"onUpdate:modelValue":[t[5]||(t[5]=a=>U.value=a),oe],placeholder:"请输入姓名或工号"},null,8,["modelValue"]),o(pe,{columns:F.value,loading:I.value,onCancel:re,onConfirm:le},null,8,["columns","loading"])]),_:1},8,["show"])],64)}}},Je=fe(He,[["__scopeId","data-v-e11e2dd9"]]);export{Je as default};
import{u as r,o as c,c as s,a as e,F as m,N as _}from"./index-ad3ad53b.js";import{E as l}from"./index-94aa1388.js";const h={__name:"index",setup(p){const t=r(),o=()=>t.replace({name:"welcome"});return(i,u)=>{const a=_,n=l;return c(),s(m,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{u as r,o as c,c as s,a as e,F as m,N as _}from"./index-fa0494eb.js";import{E as l}from"./index-08c498b4.js";const h={__name:"index",setup(p){const t=r(),o=()=>t.replace({name:"welcome"});return(i,u)=>{const a=_,n=l;return c(),s(m,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{_ as Pe,r as F,l as r,p as d,q as Ce,f as Me,o as w,c as A,s as p,a as n,h as s,t as m,F as N,j as be,C as Le,v as Ve,P as Te,i as Y,x as U,y as X,z as Z,A as Fe,B as Ue,D as ee,E as Ie,H as te,I as $,J as ae,K as Ge,W as We,M as Ae,O as Ne,Q as $e,R as je,T as ze,U as Be,V as Ee,X as Re,Y as Ke,Z as He,$ as Je,a0 as qe,a1 as Qe,a2 as Xe,a3 as C,a4 as Ze,a5 as et}from"./index-fa0494eb.js";function tt(){const y=window.localStorage.getItem("user-info");return y?y.includes("管理员"):!1}const j=y=>(Fe("data-v-50fae170"),y=y(),Ue(),y),at={class:"container1",style:{position:"relative",background:"#F5F5F7"}},ot={style:{width:"100%"}},nt=j(()=>p("div",{class:""},null,-1)),lt=j(()=>p("div",{style:{position:"absolute",bottom:"20px",width:"100%",color:"#D0CECF"}},[p("div",{style:{display:"flex",width:"100%",height:"50px","justify-content":"center","align-items":"center"}},[p("span",{style:{"text-align":"center",color:"#b1b1b1","font-size":"12px",width:"100%"}}," V1.0.1.250221-250225 ")])],-1)),st={style:{height:"90%",width:"100%","background-color":"#f5f5f5","overflow-y":"auto",display:"flex","flex-direction":"column","align-items":"center"}},rt=j(()=>p("div",{style:{height:"54px",width:"100%",display:"flex","align-items":"center","justify-content":"center","background-color":"#fff"}},[p("div",{style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center"}},[p("span",null,"相互换班")])],-1)),it={style:{width:"100%",height:"calc(100% - 54px)","overflow-y":"auto"}},pt={style:{width:"100%",height:"60px","background-color":"#fff",display:"flex","align-items":"center","justify-content":"center"}},dt={style:{"background-color":"white",width:"100%",height:"10%",display:"flex","align-items":"center","justify-content":"space-between",padding:"12px"}},ut={__name:"index",setup(y){let g=F({minDate:new Date(r().year(),r().month()-1,1),maxDate:new Date(r().year(),r().month()+2,0),array:[],dateFlag:!1,addDateFlag:!0,week:["周日","周一","周二","周三","周四","周五","周六"],center:!0,right:!1,left:!1,isShow:!0,toDay:"",dateBackgroundText:[],loading:!1});const M=d(!1),k=d(!1),z=d(!1),B=d({}),S=d(!1),E=d(""),R=d([]),x=d(!1);let oe=d("");d(1);let f=F({page_index:0,page_size:1e3,startTime:"",endTime:"",GetWatchListInitArray:[]});const K=o=>{const t=Number(r(o.date).format("M")),i=Number(r(o.date).format("D"));return JSON.parse(be.get("userDutyDate")).forEach((u,D)=>{const _=Number(r(u).format("M")),v=Number(r(u).format("D"));t===_&&i===v&&(o.bottomInfo="值班")}),o};function b(){f.GetWatchListInitArray=[],e.params.page_index=1,M.value=!1}const ne=o=>{le(r(o).format("YYYY-MM-DD"))},le=o=>{b(),e.params.end_time=o,e.params.start_time=o,O()},se=()=>{const t=r().startOf("week"),i=[];for(let l=0;l<7;l++){const u=t.add(l,"day");i.push(u.format("YYYY-MM-DD")),g.array.push({date:u.format("YYYY-MM-DD"),dateDay:u.format("D"),week:g.week})}console.log("🚀🚀🚀,",r().format("YYYY-MM-DD"),g.array),oe.value=g.array.length},re=()=>{ee.push({name:"myDuty"})},ie=()=>{ee.push({name:"signList"})},O=async()=>{k.value=!0;let o={is_lead:3,...e.params};Ie(o).then(t=>{t.response.data.length===0&&(M.value=!0),t.response.data.forEach(l=>{f.GetWatchListInitArray.push(l)});let i=1;i===1&&(f.GetWatchListInitArray.forEach((l,u)=>{g.dateBackgroundText.push(l.watch_date)}),i++),k.value=!1}).finally(()=>{e.params.page_index++,k.value=!1})};function pe(){O(),e.params.page_index++}const de=()=>{const o=r();o.startOf("day").format("YYYY-MM-DD"),o.endOf("month").format("YYYY-MM-DD"),f.startTime=r().format("YYYY-MM-DD"),f.endTime=r().format("YYYY-MM-DD")};function ue(o){S.value=!0,B.value=o}function ce(o){x.value=!0,te(o).then(t=>{t.code==1?R.value=t.response.map(i=>({...i,text:i.name,value:i.id})):$(t.msg_detail)}).finally(()=>{x.value=!1})}function me(o){if(o.selectedOptions[0]==null){ae("请选择换班人员");return}Ge({title:"提示",message:"是否确认换班?"}).then(()=>{let t=B.value.watchid,i=o.selectedOptions[0].id;We(t,i).then(l=>{l.code==1?(Ae(l.response),S.value=!1,f.page_index=1,f.GetWatchListInitArray=[],O()):$(l.msg_detail)})}).catch(()=>{})}function fe(){S.value=!1}function he(o){console.log("打开相互换班",o),e.operatorOnDuty.people.value=o.username+"-"+o.card_name,e.operatorOnDuty.date.value=o.watch_date,e.personnelData.show=!0}function ye(o){x.value=!0,te(o).then(t=>{t.code==1?{operatorOnDutyPeople:()=>{e.operatorOnDuty.people.columns=t.response.map(l=>({...l,text:l.name,value:l.id}))},changeShiftsPeoplePeople:()=>{e.operatorOnDuty.people.columns=t.response.map(l=>({...l,text:l.name,value:l.id}))}}[e.changeFlag]():$(t.msg_detail)}).finally(()=>{x.value=!1})}function ge(o){if(o.selectedOptions[0]==null){ae("请选择换班人员");return}({operatorOnDutyPeople:()=>{e.operatorOnDuty.people.value=o.selectedOptions[0].name,e.operatorOnDuty.people.show=!1,H()},changeShiftsPeoplePeople:()=>{e.changeShiftsPeople.people.value=o.selectedOptions[0].name,e.operatorOnDuty.people.show=!1,H()}})[e.changeFlag]()}function De(){e.operatorOnDuty.people.show=!1}function H(o){console.log("获取值班日期",e.operatorOnDuty.people.value),{operatorOnDutyPeople:()=>{e.operatorOnDuty.date.columns=[{text:"2025-03-11",value:"2025-03-11"},{text:"2025-03-12",value:"2025-03-12"},{text:"2025-03-13",value:"2025-03-13"},{text:"2025-03-14",value:"2025-03-14"},{text:"2025-03-15",value:"2025-03-15"},{text:"2025-03-16",value:"2025-03-16"},{text:"2025-03-17",value:"2025-03-17"}]},changeShiftsPeoplePeople:()=>{e.changeShiftsPeople.date.columns=[{text:"2025-03-11",value:"2025-03-11"},{text:"2025-03-12",value:"2025-03-12"},{text:"2025-03-13",value:"2025-03-13"},{text:"2025-03-14",value:"2025-03-14"},{text:"2025-03-15",value:"2025-03-15"},{text:"2025-03-16",value:"2025-03-16"},{text:"2025-03-17",value:"2025-03-17"}]}}[e.changeFlag]()}function J(o){console.log("选择器确认",o),{operatorOnDutyPeople:()=>{e.operatorOnDuty.date.value=o.selectedOptions[0].value,e.operatorOnDuty.date.show=!1},changeShiftsPeoplePeople:()=>{e.changeShiftsPeople.date.value=o.selectedOptions[0].value,e.changeShiftsPeople.date.show=!1}}[e.changeFlag]()}function _e(){console.log("提交相互换班",e.operatorOnDuty.people.value,e.operatorOnDuty.date.value,e.changeShiftsPeople.people.value,e.changeShiftsPeople.date.value)}const e=F({changeFlag:"",userDutyDate:[],operatorOnDuty:{people:{params:{condition:""},value:"",columns:[],showPicker:!1},date:{columns:[],value:"",show:!1}},changeShiftsPeople:{people:{params:{condition:""},value:"",columns:[],showPicker:!1},date:{columns:[],value:"",show:!1}},personnelData:{initList:[],formData:{duty_type_id:"",date:"",record_id:"",duty_daytime_people_id:[],duty_night_people_id:[],originalList:[]},show:!1,params:{page_index:1,page_size:10,keyword:""},list:[],loading:!1,finished:!1,refreshing:!1,timer:{}},date:{value:"",show:!1},params:{dep_id:"",key_name:"",start_time:r().format("YYYY-MM-DD"),end_time:r().format("YYYY-MM-DD"),type_id:"",watchhour_time:"",is_lead:3,campus_id:"",page_index:1,page_size:1e3}});let c=F({minDate:new Date(r().year(),r().month()-1,1),maxDate:new Date(r().year(),r().month()+2,0),addDutySelectList:[],DatePickerKey:1,showCenter:!1,message:"",show:!1,startTime:r().startOf("day").format("YYYY-MM-DD"),endTime:r().startOf("day").format("YYYY-MM-DD"),page_index:1,page_size:1e3,total:"",deleteSetTimeOut:"",menuKey:1,loading:!1,watchtypeid:"",dept_id:"",watch_hour_id:"",campusid:""});d([]),d(!1),d(!1),d(!1),d({});const I=d("");function ve(){e.params={dep_id:"",key_name:"",start_time:r().format("YYYY-MM-DD"),end_time:r().format("YYYY-MM-DD"),type_id:"",watchhour_time:"",is_lead:3,campus_id:"",page_index:1,page_size:1e3},I.value&&I.value.reset(),b(),O()}const we=async o=>{e.params.start_time=r(o).format("YYYY-MM-DD"),e.params.end_time=r(o).format("YYYY-MM-DD"),b(),O(),c.menuKey++,xe()},xe=()=>{c.show=!1},Oe=()=>{c.show=!0},Ye=()=>{Promise.all([L("dutyType","类型","type_id",Ne),L("dutyHourTime","时段","watchhour_time",$e),L("campusname","校区","campus_id",je),L("dept_name","部门","dep_id",ze)]).then(o=>{c.addDutySelectList=o,c.DatePickerKey++})},L=(o,t,i,l)=>new Promise(async(u,D)=>{const _=await l(),v=[];_.response.map((h,Q)=>{v.push({text:h.name,value:h.id})}),u([v,t,i])});return Ce([()=>e.params.key_name,()=>e.params.type_id,()=>e.params.watchhour_time,()=>e.params.campus_id,()=>e.params.dep_id],(o,t)=>{(o[0]||o[1]||o[2]||o[3]||o[4])&&(b(),O())},{deep:!0}),Me(()=>{de(),se(),Ye()}),(o,t)=>{const i=Le,l=Be,u=Ee,D=Re,_=Ke,v=Ze,q=He,h=et,Q=Ve,V=Je,P=Te,ke=qe,T=Qe,Se=Xe;return w(),A(N,null,[p("div",at,[n(Q,{class:"container",loading:k.value,"onUpdate:loading":t[1]||(t[1]=a=>k.value=a),error:z.value,"onUpdate:error":t[2]||(t[2]=a=>z.value=a),finished:M.value,"onUpdate:finished":t[3]||(t[3]=a=>M.value=a),"error-text":"请求失败,点击重新加载","finished-text":"数据全部加载完成",onLoad:pe},{default:s(()=>[n(i,{type:"single","show-subtitle":!1,poppable:!1,"show-confirm":!1,style:{height:"350px"},"show-title":!1,onConfirm:ne,formatter:K,minDate:m(g).minDate,maxDate:m(g).maxDate},null,8,["minDate","maxDate"]),n(u,{style:{width:"100%","margin-top":"10px"}},{default:s(()=>[n(l,{icon:"manager-o",onClick:re,"is-link":"",class:"cardTitle",title:"我的值班",value:"值班记录"}),n(l,{icon:"label-o",onClick:ie,"is-link":"",class:"cardTitle",title:"签到列表",value:"教师签到"})]),_:1}),p("div",ot,[n(_,{modelValue:e.params.key_name,"onUpdate:modelValue":t[0]||(t[0]=a=>e.params.key_name=a),"show-action":"",placeholder:"请输入搜索关键词"},{action:s(()=>[n(D,{onClick:ve},{default:s(()=>[Y(" 重置 ")]),_:1})]),_:1},8,["modelValue"]),n(q,{overlay:!0,class:"aaa"},{default:s(()=>[m(c).addDutySelectList.length>0?(w(),U(v,{key:0,onOpen:Oe,title:"日期"})):X("",!0),(w(!0),A(N,null,Z(m(c).addDutySelectList,(a,G)=>(w(),U(v,{modelValue:e.params[a[2]],"onUpdate:modelValue":W=>e.params[a[2]]=W,key:G,title:a[1],options:a[0]},null,8,["modelValue","onUpdate:modelValue","title","options"]))),128))]),_:1})]),(w(!0),A(N,null,Z(m(f).GetWatchListInitArray,(a,G)=>(w(),U(u,{key:G,inset:"",class:"cardContainer w-full mb-12"},{default:s(()=>[n(l,{class:"cardContent",title:a.username},{extra:s(()=>[n(h,{type:"primary",plain:""},{default:s(()=>[p("span",null,C(a.card_name),1)]),_:2},1024),n(h,{color:["","#7232dd"][a.is_lead],type:"primary",plain:"",style:{"margin-left":"10px"}},{default:s(()=>[p("span",null,C(["值班教师","值班领导"][a.is_lead]),1)]),_:2},1032,["color"])]),_:2},1032,["title"]),n(l,{class:"cardContent",title:"日期"},{extra:s(()=>[n(h,{type:"primary",plain:""},{default:s(()=>[p("span",null,C(a.watch_date),1)]),_:2},1024),n(h,{type:"primary",plain:"",style:{"margin-left":"10px"}},{default:s(()=>[p("span",null,C(a.watch_hour_time),1)]),_:2},1024)]),_:2},1024),n(l,{class:"cardContent",title:"类型"},{extra:s(()=>[n(h,{type:"primary",plain:""},{default:s(()=>[p("span",null,C(a.watchtypename+"-"+a.dept_name+"-"+a.campusname),1)]),_:2},1024)]),_:2},1024),tt()?(w(),U(l,{key:0,class:"",title:"换班"},{value:s(()=>[n(D,{style:{"margin-right":"10px"},plain:"",type:"warning",size:"small",onClick:W=>he(a)},{default:s(()=>[Y("相互换班")]),_:2},1032,["onClick"]),n(D,{plain:"",type:"warning",size:"small",onClick:W=>ue(a)},{default:s(()=>[Y("换班")]),_:2},1032,["onClick"])]),_:2},1024)):X("",!0)]),_:2},1024))),128)),nt]),_:1},8,["loading","error","finished"]),lt]),n(i,{minDate:m(c).minDate,"allow-same-day":!0,ref_key:"dateRangeRef",ref:I,maxDate:m(c).maxDate,show:m(c).show,"onUpdate:show":t[4]||(t[4]=a=>m(c).show=a),formatter:K,onConfirm:we},null,8,["minDate","maxDate","show"]),n(P,{show:S.value,"onUpdate:show":t[6]||(t[6]=a=>S.value=a),round:"",position:"bottom"},{default:s(()=>[n(_,{modelValue:E.value,"onUpdate:modelValue":[t[5]||(t[5]=a=>E.value=a),ce],placeholder:"请输入姓名或工号"},null,8,["modelValue"]),n(V,{columns:R.value,loading:x.value,onCancel:fe,onConfirm:me},null,8,["columns","loading"])]),_:1},8,["show"]),n(P,{show:e.operatorOnDuty.people.show,"onUpdate:show":t[8]||(t[8]=a=>e.operatorOnDuty.people.show=a),round:"",position:"bottom"},{default:s(()=>[n(_,{modelValue:e.operatorOnDuty.people.params.condition,"onUpdate:modelValue":[t[7]||(t[7]=a=>e.operatorOnDuty.people.params.condition=a),ye],placeholder:"请输入姓名或工号"},null,8,["modelValue"]),n(V,{columns:e.operatorOnDuty.people.columns,loading:x.value,onCancel:De,onConfirm:ge},null,8,["columns","loading"])]),_:1},8,["show"]),n(P,{show:e.personnelData.show,"onUpdate:show":t[22]||(t[22]=a=>e.personnelData.show=a),position:"bottom",style:{height:"70%"}},{default:s(()=>[p("div",st,[rt,p("div",it,[n(ke,{color:"#1989fa",background:"#ecf9ff","left-icon":"info-o"},{default:s(()=>[Y(" 温馨提示:选择人员及日期,提交进行相互换班。 ")]),_:1}),n(u,{style:{width:"100%","margin-top":"12px"}},{default:s(()=>[n(T,{modelValue:e.operatorOnDuty.people.value,"onUpdate:modelValue":t[9]||(t[9]=a=>e.operatorOnDuty.people.value=a),"is-link":"",readonly:"",name:"operatorOnDutyPeople",label:"值班人员",placeholder:"点击选择值班人员",onClick:t[10]||(t[10]=a=>{e.changeFlag="operatorOnDutyPeople",e.operatorOnDuty.people.show=!0})},null,8,["modelValue"]),n(T,{modelValue:e.operatorOnDuty.date.value,"onUpdate:modelValue":t[11]||(t[11]=a=>e.operatorOnDuty.date.value=a),"is-link":"",readonly:"",name:"operatorOnDutyDate",label:"值班日期",placeholder:"点击选择值班日期",onClick:t[12]||(t[12]=a=>{e.changeFlag="operatorOnDutyPeople",e.operatorOnDuty.date.show=!0})},null,8,["modelValue"]),n(P,{show:e.operatorOnDuty.date.show,"onUpdate:show":t[14]||(t[14]=a=>e.operatorOnDuty.date.show=a),round:"",position:"bottom"},{default:s(()=>[n(V,{title:"值班日期","show-toolbar":"",columns:e.operatorOnDuty.date.columns,onConfirm:J,onCancel:t[13]||(t[13]=a=>e.operatorOnDuty.date.show=!1)},null,8,["columns"])]),_:1},8,["show"])]),_:1}),p("div",pt,[n(Se,{name:"sort",color:"#3287F8",size:"30px"})]),n(u,{style:{width:"100%"}},{default:s(()=>[n(T,{modelValue:e.changeShiftsPeople.people.value,"onUpdate:modelValue":t[15]||(t[15]=a=>e.changeShiftsPeople.people.value=a),"is-link":"",readonly:"",name:"changeShiftsPeoplePeople",label:"换班人员",placeholder:"点击选择换班人员",onClick:t[16]||(t[16]=a=>{e.changeFlag="changeShiftsPeoplePeople",e.operatorOnDuty.people.show=!0})},null,8,["modelValue"]),n(T,{modelValue:e.changeShiftsPeople.date.value,"onUpdate:modelValue":t[17]||(t[17]=a=>e.changeShiftsPeople.date.value=a),"is-link":"",readonly:"",name:"changeShiftsPeopleDate",label:"换班日期",placeholder:"点击选择换班日期",onClick:t[18]||(t[18]=a=>{e.changeFlag="changeShiftsPeoplePeople",e.changeShiftsPeople.date.show=!0})},null,8,["modelValue"]),n(P,{show:e.changeShiftsPeople.date.show,"onUpdate:show":t[20]||(t[20]=a=>e.changeShiftsPeople.date.show=a),round:"",position:"bottom"},{default:s(()=>[n(V,{title:"换班日期","show-toolbar":"",columns:e.changeShiftsPeople.date.columns,onConfirm:J,onCancel:t[19]||(t[19]=a=>e.changeShiftsPeople.date.show=!1)},null,8,["columns"])]),_:1},8,["show"])]),_:1})])]),p("div",dt,[n(D,{style:{width:"30%"},round:"",onClick:t[21]||(t[21]=a=>e.personnelData.show=!1)},{default:s(()=>[Y("关闭")]),_:1}),n(D,{style:{width:"65%"},round:"",type:"primary",onClick:_e},{default:s(()=>[Y("提交")]),_:1})])]),_:1},8,["show"])],64)}}},mt=Pe(ut,[["__scopeId","data-v-50fae170"]]);export{mt as default};
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
import{u as r,o as c,c as s,a as e,F as m,N as _}from"./index-ad3ad53b.js";import{E as l}from"./index-94aa1388.js";const h={__name:"index",setup(p){const t=r(),o=()=>t.replace({name:"welcome"});return(i,u)=>{const a=_,n=l;return c(),s(m,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{u as r,o as c,c as s,a as e,F as m,N as _}from"./index-fa0494eb.js";import{E as l}from"./index-08c498b4.js";const h={__name:"index",setup(p){const t=r(),o=()=>t.replace({name:"welcome"});return(i,u)=>{const a=_,n=l;return c(),s(m,null,[e(a,{"left-text":"返回","left-arrow":"",onClickLeft:o}),e(n,{style:{width:"100%",height:"100%"},image:"error",description:"异常"})],64)}}};export{h as default};
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
.my-swipe .van-swipe-item[data-v-e11e2dd9]{width:100px;color:#fff;font-size:20px;line-height:150px;text-align:center;background-color:#39ed81}.container .dateContainer[data-v-e11e2dd9]{width:100%;height:auto;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin-top:10px}.container .dateContainer .left[data-v-e11e2dd9],.container .dateContainer .right[data-v-e11e2dd9]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:10%;height:50px;font-size:25px}.container .dateContainer .left[data-v-e11e2dd9]:hover,.container .dateContainer .right[data-v-e11e2dd9]:hover{color:#1989fa}.container .dateContainer .content[data-v-e11e2dd9]{width:11.42%;height:50px}.container .dateContainer .content[data-v-e11e2dd9]:hover{background-color:#1989fa;border-radius:10%;color:#fff}.container .cardContainer[data-v-e11e2dd9]{margin-top:10px;width:95%;background-color:#fff;height:20%;margin-bottom:10px}.aaa[data-v-e11e2dd9] .van-dropdown-menu__bar{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);-webkit-box-shadow:unset;box-shadow:unset} .my-swipe .van-swipe-item[data-v-50fae170]{width:100px;color:#fff;font-size:20px;line-height:150px;text-align:center;background-color:#39ed81}.container .dateContainer[data-v-50fae170]{width:100%;height:auto;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin-top:10px}.container .dateContainer .left[data-v-50fae170],.container .dateContainer .right[data-v-50fae170]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:10%;height:50px;font-size:25px}.container .dateContainer .left[data-v-50fae170]:hover,.container .dateContainer .right[data-v-50fae170]:hover{color:#1989fa}.container .dateContainer .content[data-v-50fae170]{width:11.42%;height:50px}.container .dateContainer .content[data-v-50fae170]:hover{background-color:#1989fa;border-radius:10%;color:#fff}.container .cardContainer[data-v-50fae170]{margin-top:10px;width:95%;background-color:#fff;height:20%;margin-bottom:10px}.aaa[data-v-50fae170] .van-dropdown-menu__bar{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);-webkit-box-shadow:unset;box-shadow:unset}
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="./vite.svg"/> <link rel="icon" type="image/svg+xml" href="./vite.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>值班管理</title> <title>值班管理</title>
<script type="module" crossorigin src="./assets/index-ad3ad53b.js"></script> <script type="module" crossorigin src="./assets/index-fa0494eb.js"></script>
<link rel="stylesheet" href="./assets/index-ec7e0b0b.css"> <link rel="stylesheet" href="./assets/index-db6cbade.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
</van-dropdown-menu> </van-dropdown-menu>
<div style="width: 100%;height: calc(100% - 158px);overflow: auto;background: #F5F5F7;padding: 0 0 10px 0;"> <div style="width: 100%;height: calc(100% - 158px);overflow: auto;background: #F5F5F7;padding: 0 0 10px 0;">
<van-pull-refresh v-model="refreshing1" @refresh="onRefresh1"> <van-pull-refresh v-model="refreshing1" @refresh="onRefresh1">
<van-list <van-list
...@@ -62,28 +61,17 @@ ...@@ -62,28 +61,17 @@
<van-cell v-if="configSwitchValue && roleIncludeDeptAdmin" class="" title="换班"> <van-cell v-if="configSwitchValue && roleIncludeDeptAdmin" class="" title="换班">
<!--系部干事换班--> <!--系部干事换班-->
<template #value> <template #value>
<van-button style="margin-right: 10px;" plain type="warning" size="small" @click="openChangeShifts(item)">相互换班</van-button>
<van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button> <van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button>
</template> </template>
</van-cell> </van-cell>
<van-cell v-else-if=" item.card_name == userInfo.card_number" class="" title="换班"> <van-cell v-else-if=" item.card_name == userInfo.card_number" class="" title="换班">
<!-- 普通换班--> <!-- 普通换班-->
<template #value> <template #value>
<van-button style="margin-right: 10px;" plain type="warning" size="small" @click="openChangeShifts(item)">相互换班</van-button>
<van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button> <van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button>
</template> </template>
</van-cell> </van-cell>
<!-- <van-cell v-if="item.card_name == userInfo.card_number" class="" title="换班">
<template #value>
<van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button>
</template>
</van-cell>-->
<!-- <van-cell class="cardContent">-->
<!-- <template #value>-->
<!-- <van-button @click="dutyLog(item)" type="primary" icon="edit" size="small" style="margin-right: 10px">日志</van-button>-->
<!-- </template>-->
<!-- </van-cell>-->
</van-cell-group> </van-cell-group>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
...@@ -138,6 +126,127 @@ ...@@ -138,6 +126,127 @@
@confirm="pickerConfirm" @confirm="pickerConfirm"
/> />
</van-popup> </van-popup>
<!-- 相互换班人员选择器 -->
<van-popup v-model:show="init.operatorOnDuty.people.show" round position="bottom">
<!-- 搜索框 -->
<van-search
v-model="init.operatorOnDuty.people.params.condition"
placeholder="请输入姓名或工号"
@update:model-value="searchChangeOperatorOnDuty"/>
<!-- 选择器 -->
<van-picker
:columns="init.operatorOnDuty.people.columns"
:loading="pickerLoading"
@cancel="pickerCancelOperatorOnDuty"
@confirm="pickerConfirmOperatorOnDuty"
/>
</van-popup>
<!-- 相互换班表单 -->
<van-popup v-model:show="init.personnelData.show" position="bottom" style="height: 70%">
<div style="height: 90%;width: 100%; background-color: #f5f5f5;overflow-y: auto;display: flex;flex-direction: column;align-items: center;" >
<!-- -->
<div style="height: 54px; width: 100%;display: flex;align-items: center;justify-content: center;background-color: #fff;">
<div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
<span>相互换班</span>
</div>
</div>
<!-- content -->
<div style="width: 100%;height: calc(100% - 54px);overflow-y: auto;">
<van-notice-bar color="#1989fa" background="#ecf9ff" left-icon="info-o">
温馨提示:选择人员及日期,提交进行相互换班。
</van-notice-bar>
<van-cell-group style="width: 100%;margin-top: 12px;">
<!-- 申请人-->
<van-field
v-model="init.operatorOnDuty.people.value"
is-link
readonly
name="operatorOnDutyPeople"
label="值班人员"
placeholder="点击选择值班人员"
@click="init.changeFlag = 'operatorOnDutyPeople'; init.operatorOnDuty.people.show = true"
/>
<!-- 换班日期-->
<van-field
v-model="init.operatorOnDuty.date.value"
is-link
readonly
name="operatorOnDutyDate"
label="值班日期"
placeholder="点击选择值班日期"
@click="init.changeFlag = 'operatorOnDutyPeople'; init.operatorOnDuty.date.show = true"
/>
<!-- 换班日期 -->
<van-popup v-model:show="init.operatorOnDuty.date.show" round position="bottom">
<van-picker
title="值班日期"
show-toolbar
:columns="init.operatorOnDuty.date.columns"
@confirm="onConfirm"
@cancel="init.operatorOnDuty.date.show = false"
/>
</van-popup>
</van-cell-group>
<div style="width: 100%;height: 60px;background-color: #fff;display: flex;align-items: center;justify-content: center;">
<van-icon name="sort" color="#3287F8" size="30px"/>
</div>
<van-cell-group style="width: 100%;">
<!-- 换班人员-->
<van-field
v-model="init.changeShiftsPeople.people.value"
is-link
readonly
name="changeShiftsPeoplePeople"
label="换班人员"
placeholder="点击选择换班人员"
@click="init.changeFlag = 'changeShiftsPeoplePeople'; init.operatorOnDuty.people.show = true"
/>
<!-- 相互换班人员选择器 -->
<!-- 换班日期-->
<van-field
v-model="init.changeShiftsPeople.date.value"
is-link
readonly
name="changeShiftsPeopleDate"
label="换班日期"
placeholder="点击选择换班日期"
@click="init.changeFlag = 'changeShiftsPeoplePeople'; init.changeShiftsPeople.date.show = true"
/>
<!-- 换班日期 -->
<van-popup v-model:show="init.changeShiftsPeople.date.show" round position="bottom">
<van-picker
title="换班日期"
show-toolbar
:columns="init.changeShiftsPeople.date.columns"
@confirm="onConfirm"
@cancel="init.changeShiftsPeople.date.show = false"
/>
</van-popup>
</van-cell-group>
</div>
</div>
<div style="background-color: white; width: 100%;height: 10%; display: flex;align-items: center;justify-content: space-between;padding: 12px; " >
<van-button style="width: 30%;" round @click="init.personnelData.show = false">关闭</van-button>
<van-button style="width: 65%;" round type="primary" @click="submitHandle">提交</van-button>
</div>
</van-popup>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.container { .container {
...@@ -406,6 +515,7 @@ onMounted(() => { ...@@ -406,6 +515,7 @@ onMounted(() => {
}) })
addDutySearchSelectList() addDutySearchSelectList()
init
// 获取当前用户信息 // 获取当前用户信息
userInfo.value = JSON.parse(Cookies.get('userInfo')) userInfo.value = JSON.parse(Cookies.get('userInfo'))
...@@ -413,7 +523,194 @@ onMounted(() => { ...@@ -413,7 +523,194 @@ onMounted(() => {
}) })
/**
* 相互换班
*
* */
//打开相互换班
function openChangeShifts(item) {
console.log('打开相互换班', item)
init.operatorOnDuty.people.value = item.username+'-'+item.card_name
init.operatorOnDuty.date.value = item.watch_date
init.personnelData.show = true
}
// 搜索值改变
function searchChangeOperatorOnDuty(val) {
pickerLoading.value = true
api.GetUserSelect(val).then(res => {
if (res.code == 1) {
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.people.columns = res.response.map(a => {
return {
...a,
text: a.name,
value: a.id,
}
})
},
changeShiftsPeoplePeople: () => {
init.operatorOnDuty.people.columns = res.response.map(a => {
return {
...a,
text: a.name,
value: a.id,
}
})
}
}
strategy[init.changeFlag]()
} else {
showFailToast(res.msg_detail)
}
}).finally(() => {
pickerLoading.value = false
})
}
// 换班选择器确认
function pickerConfirmOperatorOnDuty(val) {
// console.log('选择器确认', val)
if (val.selectedOptions[0] == undefined) {
// 未选择人员
showToast('请选择换班人员')
return
}
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.people.value = val.selectedOptions[0].name
init.operatorOnDuty.people.show = false
getDutyDate('card')
},
changeShiftsPeoplePeople: () => {
init.changeShiftsPeople.people.value = val.selectedOptions[0].name
init.operatorOnDuty.people.show = false
getDutyDate('card')
}
}
strategy[init.changeFlag]()
}
// 换班选择器取消
function pickerCancelOperatorOnDuty() {
init.operatorOnDuty.people.show = false
}
//获取值班日期
function getDutyDate(card) {
console.log('获取值班日期', init.operatorOnDuty.people.value)
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.date.columns = [
{text: '2025-03-11', value: '2025-03-11'},
{text: '2025-03-12', value: '2025-03-12'},
{text: '2025-03-13', value: '2025-03-13'},
{text: '2025-03-14', value: '2025-03-14'},
{text: '2025-03-15', value: '2025-03-15'},
{text: '2025-03-16', value: '2025-03-16'},
{text: '2025-03-17', value: '2025-03-17'},
]
},
changeShiftsPeoplePeople: () => {
init.changeShiftsPeople.date.columns = [
{text: '2025-03-11', value: '2025-03-11'},
{text: '2025-03-12', value: '2025-03-12'},
{text: '2025-03-13', value: '2025-03-13'},
{text: '2025-03-14', value: '2025-03-14'},
{text: '2025-03-15', value: '2025-03-15'},
{text: '2025-03-16', value: '2025-03-16'},
{text: '2025-03-17', value: '2025-03-17'},
]
}
}
strategy[init.changeFlag]()
}
//换班日期选择
function onConfirm(value) {
console.log('选择器确认', value)
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.date.value = value.selectedOptions[0].value
init.operatorOnDuty.date.show = false
},
changeShiftsPeoplePeople: () => {
init.changeShiftsPeople.date.value = value.selectedOptions[0].value
init.changeShiftsPeople.date.show = false
}
}
strategy[init.changeFlag]()
}
//提交相互换班
function submitHandle() {
console.log('提交相互换班', init.operatorOnDuty.people.value, init.operatorOnDuty.date.value, init.changeShiftsPeople.people.value, init.changeShiftsPeople.date.value)
}
/**
* 相互换班
*
* */
const init = reactive({ const init = reactive({
//相互换班
changeFlag:'',
userDutyDate: [],
operatorOnDuty:{
people:{
params:{
condition: '',
},
value: '',
columns: [],
showPicker: false,
},
date:{
columns: [],
value:'',
show:false,
},
},
//换班人员
changeShiftsPeople:{
people:{
params:{
condition: '',
},
value: '',
columns: [],
showPicker: false,
},
date:{
columns: [],
value:'',
show:false,
},
},
personnelData: {
initList:[],
formData: {
"duty_type_id": "",
"date": "",
"record_id": "",
"duty_daytime_people_id": [],
"duty_night_people_id": [],
originalList: []
},
show: false,
params: {
page_index: 1,
page_size: 10,
keyword: ''
},
list: [],
loading: false,
finished: false,
refreshing: false,
timer: {}
},
//相互换班
params: { params: {
"dep_id": "", "dep_id": "",
"key_name": "", "key_name": "",
......
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
</van-cell> </van-cell>
<van-cell v-if="hooks.isAdmin()" class="" title="换班"> <van-cell v-if="hooks.isAdmin()" class="" title="换班">
<template #value> <template #value>
<van-button style="margin-right: 10px;" plain type="warning" size="small" @click="openChangeShifts(item)">相互换班</van-button>
<van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button> <van-button plain type="warning" size="small" @click="pickerChgSftOpen(item)">换班</van-button>
</template> </template>
</van-cell> </van-cell>
...@@ -148,6 +149,126 @@ ...@@ -148,6 +149,126 @@
@confirm="pickerConfirm" @confirm="pickerConfirm"
/> />
</van-popup> </van-popup>
<!-- 相互换班人员选择器 -->
<van-popup v-model:show="init.operatorOnDuty.people.show" round position="bottom">
<!-- 搜索框 -->
<van-search
v-model="init.operatorOnDuty.people.params.condition"
placeholder="请输入姓名或工号"
@update:model-value="searchChangeOperatorOnDuty"/>
<!-- 选择器 -->
<van-picker
:columns="init.operatorOnDuty.people.columns"
:loading="pickerLoading"
@cancel="pickerCancelOperatorOnDuty"
@confirm="pickerConfirmOperatorOnDuty"
/>
</van-popup>
<!-- 相互换班表单 -->
<van-popup v-model:show="init.personnelData.show" position="bottom" style="height: 70%">
<div style="height: 90%;width: 100%; background-color: #f5f5f5;overflow-y: auto;display: flex;flex-direction: column;align-items: center;" >
<!-- -->
<div style="height: 54px; width: 100%;display: flex;align-items: center;justify-content: center;background-color: #fff;">
<div style="width: 100%; height: 100%;display: flex;align-items: center;justify-content: center;">
<span>相互换班</span>
</div>
</div>
<!-- content -->
<div style="width: 100%;height: calc(100% - 54px);overflow-y: auto;">
<van-notice-bar color="#1989fa" background="#ecf9ff" left-icon="info-o">
温馨提示:选择人员及日期,提交进行相互换班。
</van-notice-bar>
<van-cell-group style="width: 100%;margin-top: 12px;">
<!-- 申请人-->
<van-field
v-model="init.operatorOnDuty.people.value"
is-link
readonly
name="operatorOnDutyPeople"
label="值班人员"
placeholder="点击选择值班人员"
@click="init.changeFlag = 'operatorOnDutyPeople'; init.operatorOnDuty.people.show = true"
/>
<!-- 换班日期-->
<van-field
v-model="init.operatorOnDuty.date.value"
is-link
readonly
name="operatorOnDutyDate"
label="值班日期"
placeholder="点击选择值班日期"
@click="init.changeFlag = 'operatorOnDutyPeople'; init.operatorOnDuty.date.show = true"
/>
<!-- 换班日期 -->
<van-popup v-model:show="init.operatorOnDuty.date.show" round position="bottom">
<van-picker
title="值班日期"
show-toolbar
:columns="init.operatorOnDuty.date.columns"
@confirm="onConfirm"
@cancel="init.operatorOnDuty.date.show = false"
/>
</van-popup>
</van-cell-group>
<div style="width: 100%;height: 60px;background-color: #fff;display: flex;align-items: center;justify-content: center;">
<van-icon name="sort" color="#3287F8" size="30px"/>
</div>
<van-cell-group style="width: 100%;">
<!-- 换班人员-->
<van-field
v-model="init.changeShiftsPeople.people.value"
is-link
readonly
name="changeShiftsPeoplePeople"
label="换班人员"
placeholder="点击选择换班人员"
@click="init.changeFlag = 'changeShiftsPeoplePeople'; init.operatorOnDuty.people.show = true"
/>
<!-- 相互换班人员选择器 -->
<!-- 换班日期-->
<van-field
v-model="init.changeShiftsPeople.date.value"
is-link
readonly
name="changeShiftsPeopleDate"
label="换班日期"
placeholder="点击选择换班日期"
@click="init.changeFlag = 'changeShiftsPeoplePeople'; init.changeShiftsPeople.date.show = true"
/>
<!-- 换班日期 -->
<van-popup v-model:show="init.changeShiftsPeople.date.show" round position="bottom">
<van-picker
title="换班日期"
show-toolbar
:columns="init.changeShiftsPeople.date.columns"
@confirm="onConfirm"
@cancel="init.changeShiftsPeople.date.show = false"
/>
</van-popup>
</van-cell-group>
</div>
</div>
<div style="background-color: white; width: 100%;height: 10%; display: flex;align-items: center;justify-content: space-between;padding: 12px; " >
<van-button style="width: 30%;" round @click="init.personnelData.show = false">关闭</van-button>
<van-button style="width: 65%;" round type="primary" @click="submitHandle">提交</van-button>
</div>
</van-popup>
</template> </template>
<script setup> <script setup>
...@@ -353,6 +474,7 @@ const GetWatchList = async () => { ...@@ -353,6 +474,7 @@ const GetWatchList = async () => {
...init.params ...init.params
} }
api.GetWatchList(data).then(res => { api.GetWatchList(data).then(res => {
if (res.response.data.length === 0) finished.value = true if (res.response.data.length === 0) finished.value = true
res.response.data.forEach(cur => { res.response.data.forEach(cur => {
GetWatchListObject.GetWatchListInitArray.push(cur) GetWatchListObject.GetWatchListInitArray.push(cur)
...@@ -418,7 +540,6 @@ function searchChange(val) { ...@@ -418,7 +540,6 @@ function searchChange(val) {
}) })
} }
// 换班选择器确认 // 换班选择器确认
function pickerConfirm(val) { function pickerConfirm(val) {
// console.log('选择器确认', val) // console.log('选择器确认', val)
...@@ -456,11 +577,201 @@ function pickerCancel() { ...@@ -456,11 +577,201 @@ function pickerCancel() {
} }
/**
* 相互换班
*
* */
//打开相互换班
function openChangeShifts(item) {
console.log('打开相互换班', item)
init.operatorOnDuty.people.value = item.username+'-'+item.card_name
init.operatorOnDuty.date.value = item.watch_date
init.personnelData.show = true
}
// 搜索值改变
function searchChangeOperatorOnDuty(val) {
pickerLoading.value = true
api.GetUserSelect(val).then(res => {
if (res.code == 1) {
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.people.columns = res.response.map(a => {
return {
...a,
text: a.name,
value: a.id,
}
})
},
changeShiftsPeoplePeople: () => {
init.operatorOnDuty.people.columns = res.response.map(a => {
return {
...a,
text: a.name,
value: a.id,
}
})
}
}
strategy[init.changeFlag]()
} else {
showFailToast(res.msg_detail)
}
}).finally(() => {
pickerLoading.value = false
})
}
// 换班选择器确认
function pickerConfirmOperatorOnDuty(val) {
// console.log('选择器确认', val)
if (val.selectedOptions[0] == undefined) {
// 未选择人员
showToast('请选择换班人员')
return
}
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.people.value = val.selectedOptions[0].name
init.operatorOnDuty.people.show = false
getDutyDate('card')
},
changeShiftsPeoplePeople: () => {
init.changeShiftsPeople.people.value = val.selectedOptions[0].name
init.operatorOnDuty.people.show = false
getDutyDate('card')
}
}
strategy[init.changeFlag]()
}
// 换班选择器取消
function pickerCancelOperatorOnDuty() {
init.operatorOnDuty.people.show = false
}
//获取值班日期
function getDutyDate(card) {
console.log('获取值班日期', init.operatorOnDuty.people.value)
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.date.columns = [
{text: '2025-03-11', value: '2025-03-11'},
{text: '2025-03-12', value: '2025-03-12'},
{text: '2025-03-13', value: '2025-03-13'},
{text: '2025-03-14', value: '2025-03-14'},
{text: '2025-03-15', value: '2025-03-15'},
{text: '2025-03-16', value: '2025-03-16'},
{text: '2025-03-17', value: '2025-03-17'},
]
},
changeShiftsPeoplePeople: () => {
init.changeShiftsPeople.date.columns = [
{text: '2025-03-11', value: '2025-03-11'},
{text: '2025-03-12', value: '2025-03-12'},
{text: '2025-03-13', value: '2025-03-13'},
{text: '2025-03-14', value: '2025-03-14'},
{text: '2025-03-15', value: '2025-03-15'},
{text: '2025-03-16', value: '2025-03-16'},
{text: '2025-03-17', value: '2025-03-17'},
]
}
}
strategy[init.changeFlag]()
}
//换班日期选择
function onConfirm(value) {
console.log('选择器确认', value)
const strategy ={
operatorOnDutyPeople: () => {
init.operatorOnDuty.date.value = value.selectedOptions[0].value
init.operatorOnDuty.date.show = false
},
changeShiftsPeoplePeople: () => {
init.changeShiftsPeople.date.value = value.selectedOptions[0].value
init.changeShiftsPeople.date.show = false
}
}
strategy[init.changeFlag]()
}
//提交相互换班
function submitHandle() {
console.log('提交相互换班', init.operatorOnDuty.people.value, init.operatorOnDuty.date.value, init.changeShiftsPeople.people.value, init.changeShiftsPeople.date.value)
}
/**
* 相互换班
*
* */
/** /**
* 搜索条件 * 搜索条件
*/ */
// 搜索条件 // 搜索条件
const init = reactive({ const init = reactive({
//相互换班
changeFlag:'',
userDutyDate: [],
operatorOnDuty:{
people:{
params:{
condition: '',
},
value: '',
columns: [],
showPicker: false,
},
date:{
columns: [],
value:'',
show:false,
},
},
//换班人员
changeShiftsPeople:{
people:{
params:{
condition: '',
},
value: '',
columns: [],
showPicker: false,
},
date:{
columns: [],
value:'',
show:false,
},
},
personnelData: {
initList:[],
formData: {
"duty_type_id": "",
"date": "",
"record_id": "",
"duty_daytime_people_id": [],
"duty_night_people_id": [],
originalList: []
},
show: false,
params: {
page_index: 1,
page_size: 10,
keyword: ''
},
list: [],
loading: false,
finished: false,
refreshing: false,
timer: {}
},
//相互换班
date:{
value:'',
show:false,
},
params: { params: {
"dep_id": "", "dep_id": "",
"key_name": "", "key_name": "",
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或