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 o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){t(n,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,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 o(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 o(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 o(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 o(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 i(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(l){return void t(l)}a.done?n(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var u=e.apply(n,t);function a(e){i(u,r,o,a,c,"next",e)}function c(e){i(u,r,o,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.c1f63540.js","./index-legacy.fb4dcced.js","./index-legacy.cdcc5f23.js","./index-legacy.45d07924.js","./index-legacy.6603017a.js","./icon_teacher-legacy.07765f44.js","./index-legacy.7e71b67e.js","./index-legacy.2318e5fa.js","./index-legacy.8a8e9c42.js","./index-legacy.c75fe8a2.js"],(function(e){"use strict";var t,o,i,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,o=e.r,i=e.$,a=e.c,c=e.aj,l=e.q,s=e.B,f=e.m,d=e.ah,m=e.R,_=e.F,g=e.g,h=e.a$,p=e.al,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(){}],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,d=o({list:[],selectMenus:[]}),m=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,f.post("/api-school/sysMenuButton/page",{data:{auditFlag:!1,status:!0,clientType:"SCHOOL",page:1,rows:100}});case 3:n=e.sent,t=n.data,d.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)}}(),_=function(e){return d.selectMenus.includes(e)},g=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=[],d.list&&d.list.forEach((function(e){_(e.id)&&r.push({buttonImage:e.buttonImage,sortOrder:e.order,id:e.id,title:e.title,homePage:e.homePage})})),n.next=5,f.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 i((function(){m();var n=(e.menus?e.menus:[]).map((function(e){return e.id}));d.selectMenus=r(n)})),function(){return a("div",{class:S.menuFunction},[a(c,{desotry:!1},null),a("div",{class:S.menuContent},[a("h2",null,[l("全部功能")]),a(y,{border:!1,class:S.functionGrid},{default:function(){return[d.list&&d.list.map((function(e){return a(b,{onClick:function(){return function(e){if(_(e.id)){var n=d.selectMenus.findIndex((function(n){return n===e.id}));d.selectMenus.splice(n,1)}else d.selectMenus.push(e.id)}(e)},class:_(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(s,{block:!0,round:!0,type:"primary",onClick:g},{default:function(){return[l("确认修改")]}})])]}})])}}});e("default",t({name:"manage-detail",setup:function(){var e=d(),t=m({}),r=o({menuStatus:!1,status:!1}),C=function(){var r=u(regeneratorRuntime.mark((function r(){var o,i,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.query,r.next=4,f.get("/api-school/schoolStaff/detail/"+o.id);case 4:i=r.sent,u=i.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,f.post("/api-school/schoolStaff/freeze/"+r.id,{hideLoading:!1});case 4:setTimeout((function(){"ACTIVATION"===t.value.status?(t.value.status="LOCKED",v("冻结成功")):(t.value.status="ACTIVATION",v("解冻成功"))}),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 i((function(){C()})),function(){var e,n;return a("div",{class:j.manageTeacher},[a(c,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),l("基本信息")]),a(O,{inset:!0,class:[j.detailCellGroup,j.sectionCellGroup]},{default:function(){return[a(I,{title:"手机号码",value:t.value.phone},null),a(I,{title:"性别",value:1==t.value.gender?"男":0==t.value.gender?"女":""},null)]}}),t.value.menuButtons&&t.value.menuButtons.length>0&&a(_,null,[a("div",{class:j.sectionTitle},[a("i",null,null),l("功能权限")]),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)&&!p(n)?e:{default:function(){return[e]}}))]),a(T,{position:"bottom"},{default:function(){return[a("div",{class:["btnGroup","btnMore"],style:{paddingLeft:"13px",paddingRight:"13px"}},[g.user.data.manageAdmin&&a(s,{type:"primary",round:!0,onClick:function(){return r.menuStatus=!0}},{default:function(){return[l("修改权限")]}}),a(s,{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(h,{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?"冻结":"解冻",l("管理老师")])}})])}}}))}}}))}();
|