manage-detail-legacy.56ebdaf3.js 11 KB

1
  1. !function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function n(n){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){t(n,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return i(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function o(e,n,t,r,i,o,u){try{var a=e[o](u),c=a.value}catch(l){return void t(l)}a.done?n(c):Promise.resolve(c).then(r,i)}function u(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,"next",e)}function c(e){o(u,r,i,a,c,"throw",e)}a(void 0)}))}}var a=document.createElement("style");a.innerHTML="._detailCellGroup_x1k9o_1{margin:.32rem .34667rem;overflow:hidden;border-radius:.26667rem}._manageTeacher_x1k9o_6{--van-dialog-message-font-size: .42667rem !important}._sectionCellGroup_x1k9o_9 .van-cell{padding:.48rem .4rem;font-size:.42667rem}._detailCell_x1k9o_1{padding:.4rem .34667rem}._detailCell_x1k9o_1 ._img_x1k9o_16{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.26667rem}._detailCell_x1k9o_1 ._name_x1k9o_23{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:5.86667rem}._detailCell_x1k9o_1 ._phone_x1k9o_30{padding-top:.05333rem;font-size:.37333rem;color:#777;line-height:.53333rem}._sectionTitle_x1k9o_36{padding:.21333rem .34667rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._sectionTitle_x1k9o_36 i{display:inline-block;margin-right:.16rem;width:.10667rem;height:.32rem;background:#ff8057;border-radius:.05333rem}._functionGrid_x1k9o_51{margin:.32rem .34667rem;padding:.26667rem 0;background:#ffffff;border-radius:.32rem;overflow:hidden}._functionGrid_x1k9o_51 ._functionImg_x1k9o_58{width:1.17333rem;height:1.17333rem}._functionGrid_x1k9o_51 ._functionText_x1k9o_62{max-width:1.33333rem;padding-top:.13333rem;font-size:.32rem;color:#333;line-height:.45333rem}._functionGrid_x1k9o_51 .van-grid-item__content{padding-top:.26667rem;padding-bottom:.26667rem}._dialogTitle_x1k9o_73{padding-left:.66667rem;text-align:left;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;padding-bottom:.32rem}._dialogTitle_x1k9o_73 i{display:inline-block;width:.10667rem;height:.37333rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._menuFunction_1ghfh_1{min-height:100vh;background-color:#f8f8f8}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5{margin:.32rem .34667rem;padding-bottom:.32rem;background-color:#fff;border-radius:.26667rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 h2{padding:.32rem .32rem .21333rem;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 ._functionImg_1ghfh_18{width:1.25333rem;height:1.25333rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 ._gray_1ghfh_22{transition:all .3s ease;filter:grayscale(100%);opacity:.76}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 ._functionText_1ghfh_27{max-width:1.33333rem;padding-top:.13333rem;font-size:.32rem;color:#333;line-height:.45333rem}._menuFunction_1ghfh_1 ._menuContent_1ghfh_5 .van-grid-item__content{padding-top:.26667rem;padding-bottom:.26667rem}\n",document.head.appendChild(a),System.register(["./index-legacy.48c8d62c.js","./index-legacy.f3037807.js","./index-legacy.d1078003.js","./index-legacy.8429fc95.js","./index-legacy.0e0de364.js","./index-legacy.a2ac81dd.js","./icon_teacher-legacy.07765f44.js","./index-legacy.8cf5f94f.js","./index-legacy.269a0b91.js","./index-legacy.087e0425.js","./index-legacy.ac553194.js","./index-legacy.c75fe8a2.js"],(function(e){"use strict";var t,i,o,a,c,l,s,f,d,m,_,g,h,p,v,x,y,b,k,C,w,T,O,I;return{setters:[function(e){t=e.d,i=e.r,o=e.$,a=e.c,c=e.q,l=e.B,s=e.m,f=e.aV,d=e.R,m=e.F,_=e.f,g=e.aW,h=e.ak,p=e.o},function(e){v=e.O},function(e){x=e.O},function(e){y=e.G,b=e.a},function(e){k=e.I},function(e){C=e.S},function(e){w=e.i},function(e){T=e.O},function(e){O=e.C},function(e){I=e.C},function(){},function(){}],execute:function(){var j={detailCellGroup:"_detailCellGroup_x1k9o_1",manageTeacher:"_manageTeacher_x1k9o_6",sectionCellGroup:"_sectionCellGroup_x1k9o_9",detailCell:"_detailCell_x1k9o_1",img:"_img_x1k9o_16",name:"_name_x1k9o_23",phone:"_phone_x1k9o_30",sectionTitle:"_sectionTitle_x1k9o_36",functionGrid:"_functionGrid_x1k9o_51",functionImg:"_functionImg_x1k9o_58",functionText:"_functionText_x1k9o_62",dialogTitle:"_dialogTitle_x1k9o_73"},S={menuFunction:"_menuFunction_1ghfh_1",menuContent:"_menuContent_1ghfh_5",functionImg:"_functionImg_1ghfh_18",gray:"_gray_1ghfh_22",functionText:"_functionText_1ghfh_27"},A=t({name:"menu-function",props:{teacherId:{type:String,default:""},menus:{type:Array||String,default:[]}},emits:["close","success"],setup:function(e,n){n.slots,n.attrs;var t=n.emit,f=i({list:[],selectMenus:[]}),d=function(){var e=u(regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.post("/api-school/sysMenuButton/page",{data:{auditFlag:!1,status:!0,clientType:"SCHOOL",page:1,rows:100}});case 3:n=e.sent,t=n.data,f.list=t.rows||[],e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),m=function(e){return f.selectMenus.includes(e)},_=function(){var n=u(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=[],f.list&&f.list.forEach((function(e){m(e.id)&&r.push({buttonImage:e.buttonImage,sortOrder:e.order,id:e.id,title:e.title,homePage:e.homePage})})),n.next=5,s.post("/api-school/schoolStaff/updateButton",{hideLoading:!1,data:{teacherId:e.teacherId,menuButtons:[].concat(r)}});case 5:t("close"),t("success"),n.next=11;break;case 9:n.prev=9,n.t0=n.catch(0);case 11:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(){return n.apply(this,arguments)}}();return o((function(){d();var n=(e.menus?e.menus:[]).map((function(e){return e.id}));f.selectMenus=r(n)})),function(){return a("div",{class:S.menuFunction},[a(v,{desotry:!1},null),a("div",{class:S.menuContent},[a("h2",null,[c("全部功能")]),a(y,{border:!1,class:S.functionGrid},{default:function(){return[f.list&&f.list.map((function(e){return a(b,{onClick:function(){return function(e){if(m(e.id)){var n=f.selectMenus.findIndex((function(n){return n===e.id}));f.selectMenus.splice(n,1)}else f.selectMenus.push(e.id)}(e)},class:m(e.id)?"":S.gray},{icon:function(){return a(k,{class:[S.functionImg],src:e.buttonImage},null)},text:function(){return a("div",{class:[S.functionText,"van-ellipsis"]},[e.title])}})}))]}})]),a(C,{position:"bottom"},{default:function(){return[a("div",{class:"btnGroup"},[a(l,{block:!0,round:!0,type:"primary",onClick:_},{default:function(){return[c("确认修改")]}})])]}})])}}});e("default",t({name:"manage-detail",setup:function(){var e=f(),t=d({}),r=i({menuStatus:!1,status:!1}),C=function(){var r=u(regeneratorRuntime.mark((function r(){var i,o,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.query,r.next=4,s.get("/api-school/schoolStaff/detail/"+i.id);case 4:o=r.sent,u=o.data,t.value=n({},u),r.next=11;break;case 9:r.prev=9,r.t0=r.catch(0);case 11:case"end":return r.stop()}}),r,null,[[0,9]])})));return function(){return r.apply(this,arguments)}}(),S=function(){var n=u(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=e.query,n.next=4,s.post("/api-school/schoolStaff/freeze/"+r.id,{hideLoading:!1});case 4:setTimeout((function(){"ACTIVATION"===t.value.status?(t.value.status="LOCKED",p("冻结成功")):(t.value.status="ACTIVATION",p("解冻成功"))}),100),n.next=9;break;case 7:n.prev=7,n.t0=n.catch(0);case 9:case"end":return n.stop()}}),n,null,[[0,7]])})));return function(){return n.apply(this,arguments)}}();return o((function(){C()})),function(){var e,n;return a("div",{class:j.manageTeacher},[a(v,null,null),a(O,{inset:!0,class:j.detailCellGroup},{default:function(){return[a(I,{center:!0,class:j.detailCell},{icon:function(){return a(k,{class:j.img,src:t.value.avatar?t.value.avatar:w},null)},title:function(){return a("div",{class:j.content},[a("p",{class:[j.name,"van-ellipsis"]},[t.value.nickname]),a("p",{class:j.phone},[t.value.phone])])}})]}}),a("div",{class:j.sectionTitle},[a("i",null,null),c("基本信息")]),a(O,{inset:!0,class:[j.detailCellGroup,j.sectionCellGroup]},{default:function(){return[a(I,{title:"手机号码",value:t.value.nickname},null),a(I,{title:"性别",value:1==t.value.gender?"男":0==t.value.gender?"女":""},null)]}}),t.value.menuButtons&&t.value.menuButtons.length>0&&a(m,null,[a("div",{class:j.sectionTitle},[a("i",null,null),c("功能权限")]),a(y,{border:!1,class:j.functionGrid},(n=e=t.value.menuButtons.map((function(e){return a(b,null,{icon:function(){return a(k,{class:j.functionImg,src:e.buttonImage},null)},text:function(){return a("div",{class:[j.functionText,"van-ellipsis"]},[e.title])}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!h(n)?e:{default:function(){return[e]}}))]),a(T,{position:"bottom"},{default:function(){return[a("div",{class:["btnGroup","btnMore"],style:{paddingLeft:"13px",paddingRight:"13px"}},[_.user.data.manageAdmin&&a(l,{type:"primary",round:!0,onClick:function(){return r.menuStatus=!0}},{default:function(){return[c("修改权限")]}}),a(l,{type:"primary",round:!0,color:"#64A9FF",onClick:function(){return r.status=!0}},{default:function(){return["ACTIVATION"===t.value.status&&"冻结账号","LOCKED"===t.value.status&&"解冻账号"]}})])]}}),a(x,{modelValue:r.menuStatus,"onUpdate:modelValue":function(e){return r.menuStatus=e},destroy:!0},{default:function(){return[a(A,{onClose:function(){return r.menuStatus=!1},onSuccess:function(){return C()},teacherId:t.value.id,menus:t.value.menuButtons},null)]}}),a(g,{show:r.status,"onUpdate:show":function(e){return r.status=e},message:"".concat("ACTIVATION"===t.value.status?"冻结后该管理老师将无法登录\n确认需要冻结吗?":"确认需要解冻吗?"),messageAlign:"left",showCancelButton:!0,onConfirm:S},{title:function(){return a("div",{class:j.dialogTitle},[a("i",null,null),"ACTIVATION"===t.value.status?"冻结":"解冻",c("管理老师")])}})])}}}))}}}))}();