app.e1f44ad1.js 53 KB

12
  1. (function(){var e={191:function(e,t,o){"use strict";o.d(t,{i:function(){return a}});var s=o(4642);const a={baseUrl:`${s.baseApi}onlinePost`,ajaxstart:{functionName:"select_user_type1",r_type:null,page:null,num:null},userstate:{functionName:"update_user_state"},ajax_admin:{functionName:"update_user_admin"},ajax_school:{functionName:"select_school_name",u_name:"",u_org:""},ajax_org:{functionName:"select_organization"},ajax_school_name:{functionName:"select_school_name"},ajax_add_school:{functionName:"insert_school"},ajax_add_org:{functionName:"insert_org"},ajax_confirm:{functionName:"updata_user_o_s"},moveUser:{functionName:"account_update_user2"},allRecords:{functionName:"select_requestuser2",page:1,num:10}}},3080:function(e){e.exports={env:"production",title:"cocorobo",baseUrl:"https://www.xxx.com/",baseApi:"https://pbl.cocorobo.cn/api/pbl/",APPID:"xxx",APPSECRET:"xxx",$cdn:"https://imgs.solui.cn"}},4642:function(e,t,o){const s=o(3080);e.exports=s},8527:function(e,t,o){"use strict";var s=o(6848),a=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},i=[],n=o(1656),l={},r=(0,n.A)(l,a,i,!1,null,null,null),c=r.exports,d=o(6178),u=function(){var e=this,t=e._self._c;return t("div",{staticClass:"body"},[t("div",{staticClass:"top"},[t("div",{staticClass:"title"},[e._v("CocoClass后台管理")]),t("div",{staticClass:"person"},[t("div",{staticClass:"person_name"},[e._v(e._s(e.userinfo?e.userinfo.username:""))]),t("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"text"},on:{click:e.handleLogout}},[e._v("退出")])],1)]),t("div",{staticClass:"container"},[t("div",{staticClass:"left"},[t("ul",[t("router-link",{staticClass:"menu_left",attrs:{to:"/user-list"}},[t("i",{staticClass:"el-icon-s-custom"}),e._v("账号列表 ")]),t("router-link",{staticClass:"menu_left",attrs:{to:"/user-examine"}},[t("i",{staticClass:"el-icon-edit"}),e._v("账号审核 ")])],1)]),t("div",{staticClass:"table-container"},[t("router-view")],1)])])},h=[],m=(o(4114),o(3518)),p=o(4373),_=o(9122),g=o.n(_);p.A.defaults.timeout=6e5,p.A.defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8",p.A.defaults.baseURL={NODE_ENV:"production",VUE_APP_ENV:"production",BASE_URL:"/"}.NODE_HOST,p.A.defaults.withCredentials=!0,console.log({NODE_ENV:"production",VUE_APP_ENV:"production",BASE_URL:"/"});const f=p.A.CancelToken;let b;function v(e){return JSON.stringify(e)}function y(e,t,o){return new Promise(((s,a)=>{p.A.post(e,t,o?{cancelToken:o.token}:"").then((e=>{s(e)}),(e=>{a(e)})).catch((e=>{a(e)}))}))}function x(e,t,o){return new Promise(((s,a)=>{p.A.put(e,t,o?{cancelToken:o.token}:"").then((e=>{s(e)}),(e=>{a(e)})).catch((e=>{a(e)}))}))}function C(e,t,o){return new Promise(((s,a)=>{let i=o?o.token:"";p.A.get(e,{params:t,cancelToken:i}).then((e=>{s(e)}),(e=>{a(e)})).catch((e=>{a(e)}))}))}p.A.interceptors.request.use((e=>{if("https://gpt.cocorobo.cn/search_image"===e.url||"https://gpt.cocorobo.cn/chat"===e.url||"https://gpt4.cocorobo.cn/create_free_assistants"===e.url||"https://gpt4.cocorobo.cn/assistants_completion_response"===e.url)e.data=v(e.data);else if(-1!==e.url.indexOf("https://gpt4.cocorobo.cn/")||-1!==e.url.indexOf("https://claude3.cocorobo.cn/")||-1!==e.url.indexOf("https://llm.cocorobo.cn/"))e.headers={"Content-Type":"application/json"};else if(e.data&&"1"===e.data[0].post&&"post"===e.method)e.data="mode="+Object.values(e.data[0]).join(",");else if("post"===e.method&&e.data){const t={};for(const o in e.data[0])Object.hasOwnProperty.call(e.data[0],o)&&(t[o]=encodeURIComponent(e.data[0][o]));e.data=g().stringify([t])}else{const t={};for(const o in e.data)Object.hasOwnProperty.call(e.data,o)&&(t[o]=encodeURIComponent(e.data[o]));e.data=t}return e}),(e=>Promise.reject(e))),p.A.interceptors.response.use((e=>{if(!e.data.success){let t=e.data.token;localStorage.setItem("access_token",t)}return e}),(e=>(p.A.isCancel(e)?console.log("请求已取消",e.message):"401"==e.response.data.status&&(void 0).$router.push("/login"),Promise.reject(e))));var S={get:C,post:y,put:x,setCancelSource:()=>(b=f.source(),b)},k=o(4642);function w(){return S.get("//beta.api.cocorobo.cn/api/getcookieuserid")}function O(e){return S.post("//beta.api.cocorobo.cn/api/logout",e)}function j(e){return S.get(`${k.baseApi}/selectUser`,e)}function N(e){return S.post(`${k.baseApi}/batchRegistrationUser`,[e])}function T(e){return S.post(`${k.baseApi}/addCourseBehavior`,[e])}var $={name:"HomeView",computed:{...(0,m.L8)(["userinfo"])},methods:{...(0,m.i0)({logout:"user/logout"}),async handleLogout(){this.$confirm("确定退出吗","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((async()=>{O().then((async()=>{this.$message({message:"退出成功",type:"success"}),await this.logout(),this.$router.push("/login")})).catch((e=>{console.error(e)}))})).catch((()=>{}))}},mounted(){}},A=$,E=(0,n.A)(A,u,h,!1,null,"cfbf65da",null),P=E.exports,I=function(){var e=this,t=e._self._c;return t("div",{staticClass:"list_container"},[t("div",{staticClass:"title_examine"},[t("div",{staticClass:"pub_title"},[e._v("账号列表")]),t("div",{staticStyle:{"margin-left":"auto"}},[t("el-input",{staticStyle:{"margin-right":"10px",width:"200px"},attrs:{placeholder:"输入检索用户名",size:"normal",clearable:""},on:{input:e.changeOid},model:{value:e.s_name,callback:function(t){e.s_name=t},expression:"s_name"}}),t("el-input",{staticStyle:{"margin-right":"10px",width:"200px"},attrs:{placeholder:"输入检索账号",size:"normal",clearable:""},on:{input:e.changeOid},model:{value:e.s_username,callback:function(t){e.s_username=t},expression:"s_username"}}),t("el-select",{staticStyle:{"margin-right":"10px",width:"120px"},attrs:{placeholder:"选择身份",clearable:"",filterable:""},on:{change:e.changeOid},model:{value:e.checkRole,callback:function(t){e.checkRole=t},expression:"checkRole"}},e._l(e.roleArray,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),t("el-select",{staticStyle:{"margin-right":"10px"},attrs:{placeholder:"选择学校",clearable:"",filterable:""},on:{change:e.changeOid},model:{value:e.checkOid,callback:function(t){e.checkOid=t},expression:"checkOid"}},e._l(e.getSchool,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),t("el-select",{staticStyle:{"margin-right":"10px"},attrs:{placeholder:"选择组织",clearable:"",filterable:""},on:{change:e.changeOrg},model:{value:e.checkOrg,callback:function(t){e.checkOrg=t},expression:"checkOrg"}},e._l(e.organizations,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.nextStep()}}},[e._v("新增账户")])],1)]),t("el-dialog",{staticClass:"table",attrs:{title:"移动选择",visible:e.isOrgFormVisible,"before-close":e.close_table,width:"920px"},on:{"update:visible":function(t){e.isOrgFormVisible=t}}},[t("div",{staticClass:"input-container"},[t("div",{staticClass:"input_box"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.searchQuery,expression:"searchQuery"}],staticClass:"table_find",attrs:{type:"text",placeholder:"搜索学校"},domProps:{value:e.searchQuery},on:{input:function(t){t.target.composing||(e.searchQuery=t.target.value)}}})]),t("el-select",{staticClass:"custom-select",staticStyle:{"margin-left":"10px"},attrs:{placeholder:"请选择组织",filterable:"",clearable:""},on:{change:e.ajax_org_check},model:{value:e.school.OrgId,callback:function(t){e.$set(e.school,"OrgId",t)},expression:"school.OrgId"}},e._l(e.organizations,(function(o,s){return t("el-option",{key:s,attrs:{label:o.name,value:o.id}},[e._v(" "+e._s(o.name)+" ")])})),1)],1),t("div",{staticClass:"table_down"},[e.cn_org?t("div",[t("div",{staticClass:"checkbox-container"},e._l(e.schoolList,(function(o,s){return t("div",{key:s,staticClass:"checkbox_comment"},[t("div",{staticClass:"checkbox-left"},[t("label",{staticClass:"checkbox-label"},[t("a",[e._v(e._s(o.name))])]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedSchool,expression:"selectedSchool"}],staticClass:"checkbox_input_org",attrs:{type:"radio",name:"school_selection"},domProps:{value:o.id,checked:e._q(e.selectedSchool,o.id)},on:{change:function(t){e.selectedSchool=o.id}}})])])})),0)]):e._e()]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.close_table}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){e.add_school_dialog=!0}}},[e._v("新增学校")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){e.add_org_dialog=!0}}},[e._v("新增组织")]),t("el-button",{attrs:{type:"primary"},on:{click:e.ajax_confirm}},[e._v("确认移动")])],1)]),t("el-dialog",{staticClass:"table",attrs:{title:"新增账户",visible:e.isTableUseVisible,"before-close":e.close_table,width:"700px"},on:{"update:visible":function(t){e.isTableUseVisible=t}}},[t("div",[t("form",{staticClass:"el-form"},[t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label"},[e._v("姓名")]),t("div",{staticClass:"el-form-item__content"},[t("el-input",{staticClass:"add_input",attrs:{placeholder:"请输入姓名",autocomplete:"off"},model:{value:e.person.name,callback:function(t){e.$set(e.person,"name",t)},expression:"person.name"}})],1)]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label"},[e._v("账号")]),t("div",{staticClass:"el-form-item__content"},[t("el-input",{staticClass:"add_input",attrs:{placeholder:"请输入账号",autocomplete:"off"},model:{value:e.person.account,callback:function(t){e.$set(e.person,"account",t)},expression:"person.account"}})],1)]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label"},[e._v("选择组织")]),t("div",{staticClass:"el-form-item__content"},[t("el-select",{staticClass:"custom-select",attrs:{placeholder:"请选择组织",clearable:"",filterable:""},on:{change:e.orgChange},model:{value:e.person.selectedOrg,callback:function(t){e.$set(e.person,"selectedOrg",t)},expression:"person.selectedOrg"}},e._l(e.organizations,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label"},[e._v("选择学校")]),t("div",{staticClass:"el-form-item__content"},[t("el-select",{staticClass:"custom-select",attrs:{placeholder:"请选择学校",clearable:"",filterable:""},on:{change:e.schoolChange},model:{value:e.person.selectedSchool,callback:function(t){e.$set(e.person,"selectedSchool",t)},expression:"person.selectedSchool"}},e._l(e.getSchool2,(function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)])])]),t("div",{staticClass:"el-dialog__footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.isTableUseVisible=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.addUser}},[e._v("确认")])],1)]),t("el-dialog",{staticClass:"table",attrs:{title:"新增学校",visible:e.add_school_dialog,"before-close":e.close_add_school,width:"700px"},on:{"update:visible":function(t){e.add_school_dialog=t}}},[t("div",{staticClass:"el_dialog_school_content"},[t("form",{staticClass:"el-form"},[t("div",{staticClass:"el-form-item",staticStyle:{"margin-top":"15px"}},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("学校名称")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.sch_name,expression:"sch_name"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"学校名称"},domProps:{value:e.sch_name},on:{input:function(t){t.target.composing||(e.sch_name=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("地区")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.region,expression:"region"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"请输入地区"},domProps:{value:e.region},on:{input:function(t){t.target.composing||(e.region=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("学校编码")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.schoolCode,expression:"schoolCode"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"请输入编码"},domProps:{value:e.schoolCode},on:{input:function(t){t.target.composing||(e.schoolCode=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("上级组织")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("el-form",{ref:"form",attrs:{model:e.school}},[t("el-select",{staticClass:"custom-select",attrs:{placeholder:"请选择组织",filterable:""},model:{value:e.school.parentOrgId,callback:function(t){e.$set(e.school,"parentOrgId",t)},expression:"school.parentOrgId"}},e._l(e.organizations,(function(o,s){return t("el-option",{key:s,attrs:{label:o.name,value:o.id}},[e._v(" "+e._s(o.name)+" ")])})),1)],1)],1)])])])])]),t("div",{staticClass:"el-dialog__footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.add_school_dialog=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.ajax_add_school}},[e._v("确认")])],1)]),t("el-dialog",{staticClass:"table",attrs:{title:"新增组织",visible:e.add_org_dialog,"before-close":e.close_add_org,width:"700px"},on:{"update:visible":function(t){e.add_org_dialog=t}}},[t("div",{staticClass:"el_dialog_org_content"},[t("form",{staticClass:"el-form"},[t("div",{staticClass:"el-form-item",staticStyle:{"margin-top":"15px"}},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("组织名称")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.orgName,expression:"orgName"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"组织名称"},domProps:{value:e.orgName},on:{input:function(t){t.target.composing||(e.orgName=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("组织编码")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.randomCode,expression:"randomCode"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"请输入随机码"},domProps:{value:e.randomCode},on:{input:function(t){t.target.composing||(e.randomCode=t.target.value)}}})])])])])])]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.add_org_dialog=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.ajax_add_org}},[e._v("确认")])],1)]),t("div",{staticClass:"content"},[t("div",{staticClass:"button_top"},[t("a",{style:{color:1==e.type?"black":"rgb(179, 179, 179)"},on:{click:function(t){return e.showType(1)}}},[e._v("启用中("+e._s(e.tableData_start)+")")]),t("a",{style:{color:0==e.type?"black":"rgb(179, 179, 179)"},on:{click:function(t){return e.showType(0)}}},[e._v("已停用("+e._s(e.tableData_stop)+")")])]),t("div",[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"",stripe:"","header-cell-style":e.headerCellStyle,"row-key":e=>e.userid},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"company_name",label:"组织名称","min-width":"32","header-align":"center",align:"center"}}),t("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"company_number",label:"学校名称","min-width":"32","header-align":"center",align:"center"}}),t("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"name",label:"姓名","min-width":"32","header-align":"center",align:"center"}}),t("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"account",label:"账户","min-width":"32","header-align":"center",align:"center"}}),t("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"身份","min-width":"32","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function({row:o}){return[t("div",[e._v(e._s(e.roleType(o)))])]}}])}),t("el-table-column",{attrs:{"show-overflow-toolti":"",label:"操作","min-width":"35","header-align":"center",align:"center"},scopedSlots:e._u([{key:"default",fn:function({row:o}){return[1==o.state?t("el-button",{attrs:{link:"",type:"text",size:"small"},on:{click:function(t){return e.ajax__open_stop(o)}}},[e._v("停用")]):e._e(),1==o.state?t("el-button",{attrs:{link:"",type:"text",size:"small"},on:{click:function(t){return e.run(o)}}},[e._v("移动")]):e._e(),0==o.state?t("el-button",{attrs:{link:"",type:"text",size:"small"},on:{click:function(t){return e.ajax__open_stop(o)}}},[e._v("启用")]):e._e(),1===o.type&&1==o.state?t("el-button",{attrs:{link:"",type:"text",size:"small"},on:{click:function(t){return e.ajax_admin(o.userid,o.role,o.type)}}},[e._v(" "+e._s(1===o.role?"取消管理员":"设置管理员")+" ")]):e._e()]}}])})],1),e.total?t("div",{staticClass:"Pagetion"},[t("el-pagination",{attrs:{"current-page":e.currentPage,"page-size":e.pageSize,total:e.total,layout:"total, prev, pager, next, jumper"},on:{"current-change":e.handlePageChange}})],1):e._e()],1)])],1)},U=[],D=(o(8992),o(4520),o(2577),o(1454),o(191)),L=o(8626),R={name:"HelloWorld",components:{},data(){return{schoolList:[],dropdownVisible:!1,checked:!0,showCompany:!1,isOrgFormVisible:!1,isTableUseVisible:!1,add_org_dialog:!1,orgName:"",u_create:"",randomCode:"",uLogin:"1",radio:"1",sch_name:"",region:"",schoolType:"1",schoolCode:"",loginPermission:"1",add_school_dialog:!1,isCompanyDropdownVisible:!1,companyListVisibility:[!1,!1,!1],open_content:!0,add_button:!0,stop_content:!1,open:!0,stop:!1,selectedSchool:"",currentPage:1,pageSize:10,down_currentPage:1,down_pageSize:10,up_page:!0,down_page:!1,company_name:0,tableData:[],tableData_start:"",tableData_stop:"",form:{name:"",account:"",organization:"",school:""},cn_org:!0,hk_org:!1,com_org:!1,organizations:[],cn_school:[],searchQuery:"",dialogVisible:!0,school:{OrgId:null},ajaxParams:null,check_user_id:"",type:1,total:0,tableLoading:!1,checkOrg:"",checkOid:"",s_name:"",s_username:"",checkRole:"",roleArray:[{value:"1",label:"老师"},{value:"2",label:"学生"},{value:"3",label:"管理员"}],opUser:{},person:{name:"",account:"",type:"",selectedOrg:"",selectedSchool:""},checkArray:[]}},computed:{...(0,m.L8)(["userid"]),roleType(){return function(e){return 2==e.type?"学生":1==e.type?1==e.role?"管理员":"老师":void 0}},getSchool(){return this.checkOrg?this.cn_school.filter((e=>e.org===this.checkOrg)):this.cn_school},getSchool2(){return this.person.selectedOrg?this.cn_school.filter((e=>e.org===this.person.selectedOrg)):this.cn_school},getSchool3(){return this.school.OrgId||this.searchQuery?this.cn_school.filter((e=>e.org===this.school.OrgId||e.name.includes(this.searchQuery))):this.cn_school}},watch:{school:{deep:!0,handler:function(e){this.schoolList=[],e.OrgId?(this.schoolList=this.cn_school.filter((t=>t.org==e.OrgId)),this.searchQuery&&(this.schoolList=this.schoolList.filter((e=>e.name.includes(this.searchQuery))))):this.searchQuery?this.schoolList=this.cn_school.filter((e=>e.name.includes(this.searchQuery))):this.schoolList=this.cn_school,console.log("value is change",e)},immediate:!0},searchQuery(e){this.schoolList=[],this.school.OrgId?(this.schoolList=this.cn_school.filter((e=>e.org==this.school.OrgId)),this.searchQuery&&(this.schoolList=this.schoolList.filter((e=>e.name.includes(this.searchQuery)))),console.log("111")):e?(this.schoolList=this.cn_school.filter((t=>t.name.includes(e))),console.log("222")):this.schoolList=this.cn_school,console.log("value is change",e)}},methods:{handleSelectionChange(e){this.checkArray=e.map((e=>e.userid))},run(e){this.opUser=e,this.check_user_id=e.userid,this.isOrgFormVisible=!0},close_table(){this.isOrgFormVisible=!1,this.isTableUseVisible=!1,this.selectedSchool=""},nextStep(){this.isTableUseVisible=!0,this.person={name:"",account:"",type:2,selectedOrg:"",selectedSchool:""}},form_clost(){this.isTableUseVisible=!1},close_add_org(){this.add_org_dialog=!1},close_add_school(){this.add_school_dialog=!1},showType(e){this.type=e,this.currentPage=1,this.getData()},handlePageChange(e){this.currentPage=e,this.getData()},headerCellStyle(){return{backgroundColor:"#f1f1f1"}},getData(){this.tableLoading=!0;let e=[{functionName:D.i.ajaxstart.functionName,r_type:this.type,cn:this.s_name,un:this.s_username,oid:this.checkOid,org:this.checkOrg,userType:this.checkRole,page:this.currentPage,num:this.pageSize}];this.tableData=[],this.$ajax.post(D.i.baseUrl,e).then((e=>{const t=e.data[0].map((e=>({company_name:e.org_name||"暂无",company_number:e.school_name||"暂无",name:e.user_name||"暂无",account:e.account_name||"暂无",userid:e.user_id,role:e.admin_role||0,school:e.s_id,org:e.org,type:e.usertype,state:e.user_state})));this.tableData=t,this.total=e.data[0][0].total_count,this.tableData_stop=e.data[2][0].num,this.tableData_start=e.data[1][0].num,this.tableLoading=!1})).catch((e=>{this.tableLoading=!1,console.error("请求失败,错误信息:",e)}))},ajax__open_stop(e){const t=1==e.state?"停用该用户":"启用该用户",o=1==e.state?"停用成功!":"启用成功!",s=1==e.state?"已取消停用":"已取消启用";let a=[{functionName:D.i.userstate.functionName,u_id:e.userid}];this.$confirm(`此操作将会${t}, 是否继续?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{this.$ajax.post(D.i.baseUrl,a).then((async()=>{this.$message({type:"success",message:o}),this.getData(),await T({uid:this.userid,cid:"",type:"user_op",content:`${1==e.state?"停用":"启用"}了${e.userid}`})})).catch((e=>{this.$message.error("处理失败"),console.error("请求失败,错误信息:",e)}))})).catch((()=>{this.$message({type:"info",message:s})}))},ajax_admin(e,t){let o=1===t?"此操作将会取消此用户的管理员状态,是否继续?":"此操作将会设置该用户为管理员,是否继续?";this.$confirm(o,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{let o=[{functionName:D.i.ajax_admin.functionName,u_id:e}];this.$ajax.post(D.i.baseUrl,o).then((async()=>{this.getData(),this.$message({type:"success",message:"已成功执行!"}),await T({uid:this.userid,cid:"",type:"user_op",content:`将${e}${1==t?"取消了管理员":"设置了管理员"}`})})).catch((e=>{console.error("请求失败:",e),this.$message({type:"error",message:"操作失败,请稍后再试"})}))})).catch((()=>{this.$message({type:"info",message:"已取消操作"})}))},addUser(){if(!this.person.name||!this.person.account||!this.person.selectedSchool)return void this.$message({type:"error",message:"请填写所有必填项:姓名、账号、组织和学校。"});if(!/\S+@\S+\.\S+/.test(this.person.account))return void this.$message.error("账号要填写邮箱格式");let e={alias:this.person.name,username:this.person.account,org:this.person.selectedOrg,oid:this.person.selectedSchool,ph:"",cid:"",type:1,opid:"",dest:"",eduid:""};N(e).then((async e=>{e&&(await T({uid:this.userid,cid:"",type:"user_op",content:`添加了${this.person.name} 账号为${this.person.account}`}),this.$message({type:"success",message:"操作成功"}),this.isTableUseVisible=!1,this.getData())})).catch((e=>{console.error("请求失败,错误信息:",e)}))},ajax_school(){const e=[D.i.ajax_school];this.$ajax.post(D.i.baseUrl,e).then((e=>{e.data&&Array.isArray(e.data[0])&&(this.cn_school=e.data[0].map((e=>({name:e.name,id:e.id,org:e.org}))),this.schoolList=e.data[0].map((e=>({name:e.name,id:e.id,org:e.org}))),console.log(this.cn_school))})).catch((e=>{this.$message.error("查询失败"),console.error("请求失败,错误信息:",e)}))},ajax_org(){const e=[D.i.ajax_org];this.$ajax.post(D.i.baseUrl,e).then((e=>{e.data&&Array.isArray(e.data[0])&&(this.organizations=e.data[0].map((e=>({name:e.name,id:e.id}))))})).catch((e=>{this.$message.error("查询失败"),console.error("请求失败,错误信息:",e)}))},ajax_school_name(){this.selectedSchool=""},ajax_org_check(){this.selectedSchool=""},ajax_add_school(){if(!this.sch_name||""===this.sch_name.trim())return void this.$message.error("学校名称不能为空!");let e=[{functionName:D.i.ajax_add_school.functionName,u_name:this.sch_name,u_org:this.school.parentOrgId||"",u_dest:this.region||"",u_type:this.schoolType||"",u_code:this.schoolCode||"",u_isLogin:"1"===this.loginPermission?1:2,uid:this.userid}];this.$ajax.post(D.i.baseUrl,e).then((()=>{this.$message({type:"success",message:"已成功执行!"}),this.ajax_school(),this.add_school_dialog=!1,this.sch_name="",this.school.parentOrgId="",this.region="",this.schoolType="1",this.schoolCode="",this.loginPermission="1"})).catch((e=>{this.$message.error("插入失败"),console.error("请求失败,错误信息:",e)}))},ajax_add_org(){let e=this.orgName,t=this.randomCode||"",o=this.radio;if(!e)return void this.$message.error("组织名称不能为空");let s=[{functionName:D.i.ajax_add_org.functionName,u_name:e,u_create:this.userid,u_code:t,u_login:o}];this.$ajax.post(D.i.baseUrl,s).then((()=>{this.$message({type:"success",message:"已成功执行!"}),this.ajax_org(),this.add_org_dialog=!1,this.orgName="",this.randomCode="",this.uLogin="1"})).catch((e=>{this.$message.error("插入失败"),console.error("请求失败,错误信息:",e)}))},ajax_confirm(){let e=this.school.OrgId||"";const t=this.cn_school.find((e=>e.id===this.selectedSchool));if(!t||!t.id)return void this.$message({type:"warning",message:"请选择你要移动的学校!"});t.org&&(e=t.org);let o=[{functionName:D.i.ajax_confirm.functionName,u_id:this.check_user_id,o_id:e||"",s_id:t.id}];this.$ajax.post(D.i.baseUrl,o).then((async()=>{this.$message({type:"success",message:"移动成功!"}),this.isOrgFormVisible=!1,this.getData(),this.school.OrgId="",this.selectedSchool=null,this.ajax_school(),await T({uid:this.userid,cid:"",type:"user_op",content:`将${this.opUser.userid} 原组织id ${this.opUser.org?this.opUser.org:"无"} 原学校id ${this.opUser.school}移动到 组织id ${e||"无"} 学校id ${t.id}`})})).catch((e=>{this.$message.error("移动失败"),console.error("请求失败,错误信息:",e)}))},changeOrg(){this.checkOid="",this.currentPage=1,this.getData()},changeOid:(0,L.debounce)((function(){this.currentPage=1,this.getData()}),300),orgChange(){this.person.selectedSchool="",this.$forceUpdate()},schoolChange(){for(var e=0;e<this.cn_school.length;e++)this.cn_school[e].id==this.person.selectedSchool&&this.cn_school[e].org&&(this.person.selectedOrg=this.cn_school[e].org);this.$forceUpdate()}},mounted(){this.getData(),this.ajax_org(),this.ajax_school()}},V=R,z=(0,n.A)(V,I,U,!1,null,"7a5c6298",null),F=z.exports,Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"table_container"},[t("div",{staticClass:"title_examine"},[t("div",{staticClass:"pub_title"},[e._v("账号审核")]),t("div",{staticStyle:{"margin-left":"auto"}},[0==e.type?t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.bactchConfirm(1)}}},[e._v("批量通过")]):e._e(),0==e.type?t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.bactchConfirm(2)}}},[e._v("批量忽略")]):e._e(),2==e.type?t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.bactchConfirm(0)}}},[e._v("批量操作")]):e._e()],1)]),t("div",{staticClass:"table_content"},[t("div",{staticClass:"button_top"},[t("div",{staticClass:"examine_title"},[t("a",{style:{color:0==e.type?"black":"rgb(179, 179, 179)",fontWeight:"bold"},on:{click:function(t){return e.showData(0)}}},[e._v("待审核("+e._s(e.tableData)+")")])]),t("div",{staticClass:"examine_title"},[t("a",{style:{color:1==e.type?"black":"rgb(179, 179, 179)",fontWeight:"bold"},on:{click:function(t){return e.showData(1)}}},[e._v("已通过("+e._s(e.approvedData)+")")])]),t("div",{staticClass:"examine_title"},[t("a",{style:{color:2==e.type?"black":"rgb(179, 179, 179)",fontWeight:"bold"},on:{click:function(t){return e.showData(2)}}},[e._v("已忽略("+e._s(e.RefusedData)+")")])]),t("div",{staticClass:"examine_title"},[t("a",{style:{color:3==e.type?"black":"rgb(179, 179, 179)",fontWeight:"bold"},on:{click:function(t){return e.showData(3)}}},[e._v("全部记录("+e._s(e.AllData)+")")])])]),t("div",{staticClass:"content"},[t("div",{staticClass:"tableBox"},[t("el-table",{ref:"rtable",staticStyle:{width:"100%"},attrs:{data:e.currentTableData,stripe:"",border:"","header-cell-style":e.headerCellStyle,"row-key":e=>e.id},on:{"selection-change":e.handleSelectionChange,"sort-change":e.onSortChange}},[t("el-table-column",{attrs:{type:"selection",width:"50px"}}),t("el-table-column",{attrs:{label:"组织名称","min-width":"45","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.orgname?t.row.orgname:"-"))]}}])}),t("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:"contact_info",label:"电话/邮箱","min-width":"45"}}),t("el-table-column",{attrs:{prop:"name",label:"姓名","min-width":"45","show-overflow-tooltip":"","label-class-name":"address-column"}}),t("el-table-column",{attrs:{prop:"time",label:"提交时间",width:"180px",sortable:"custom"}}),t("el-table-column",{attrs:{prop:"remark",label:"备注","min-width":"45"}}),0!==e.type?t("el-table-column",{attrs:{prop:"utime",label:"审核时间",width:"180px",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.utime?t.row.utime:"-"))]}}],null,!1,1297987829)}):e._e(),1==e.type?t("el-table-column",{attrs:{label:"开通组织","min-width":"45","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.orgName?t.row.orgName:"-"))]}}],null,!1,1373081653)}):e._e(),0==e.type||2==e.type?t("el-table-column",{attrs:{label:"操作",width:"150px"},scopedSlots:e._u([{key:"default",fn:function(o){return[0==o.row.type?t("button",{staticStyle:{color:"#308fff",background:"none",border:"none",cursor:"pointer","margin-left":"25px"},on:{click:function(t){return e.ajax_move_user(1,o.row)}}},[e._v(" 通过 ")]):e._e(),0==o.row.type?t("button",{staticStyle:{color:"#ff2570",background:"none",border:"none",cursor:"pointer","margin-left":"35px"},on:{click:function(t){return e.ajax_move_user(2,o.row)}}},[e._v(" 忽略 ")]):e._e(),2==o.row.type?t("button",{staticStyle:{color:"#308fff",background:"none",border:"none",cursor:"pointer","margin-left":"25px"},on:{click:function(t){return e.ajax_move_user(0,o.row)}}},[e._v(" 移动至待审核 ")]):e._e()]}}],null,!1,2652193109)}):e._e(),3==e.type?t("el-table-column",{attrs:{label:"状态","min-width":"45"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.getStatusText(t.row.type))+" ")]}}],null,!1,1641654171)}):e._e()],1)],1),t("el-dialog",{staticClass:"table",attrs:{title:"补充信息",visible:e.isOrgFormVisible,"before-close":e.close_table,width:"920px"},on:{"update:visible":function(t){e.isOrgFormVisible=t}}},[t("div",{staticClass:"input-container"},[t("div",{staticClass:"input_box"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.searchQuery,expression:"searchQuery"}],staticClass:"table_find",attrs:{type:"text",placeholder:"搜索学校"},domProps:{value:e.searchQuery},on:{input:function(t){t.target.composing||(e.searchQuery=t.target.value)}}})]),t("el-select",{staticClass:"custom-select",staticStyle:{"margin-left":"10px"},attrs:{placeholder:"请选择组织",filterable:"",clearable:""},on:{change:e.ajax_org_check},model:{value:e.school.OrgId,callback:function(t){e.$set(e.school,"OrgId",t)},expression:"school.OrgId"}},e._l(e.organizations,(function(o,s){return t("el-option",{key:s,attrs:{label:o.name,value:o.id}},[e._v(" "+e._s(o.name)+" ")])})),1)],1),t("div",{staticClass:"table_down"},[e.cn_org?t("div",[t("div",{staticClass:"checkbox-container"},e._l(e.schoolList,(function(o,s){return t("div",{key:s,staticClass:"checkbox_comment"},[t("div",{staticClass:"checkbox-left"},[t("label",{staticClass:"checkbox-label"},[t("a",[e._v(e._s(o.name))])]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.selectedSchool,expression:"selectedSchool"}],staticClass:"checkbox_input_org",attrs:{type:"radio",name:"school_selection"},domProps:{value:o,checked:e._q(e.selectedSchool,o)},on:{change:function(t){e.selectedSchool=o}}})])])})),0)]):e._e()]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.close_table}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){e.add_school_dialog=!0}}},[e._v("新增学校")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){e.add_org_dialog=!0}}},[e._v("新增组织")]),e.addBtn?e._e():t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.ajax_move_user(1,e.AddUserInfo)}}},[e._v("通过")]),e.addBtn?t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.bactchConfirm(1)}}},[e._v("批量通过")]):e._e()],1)]),t("el-dialog",{staticClass:"table",attrs:{title:"新增学校",visible:e.add_school_dialog,"before-close":e.close_add_school,width:"700px"},on:{"update:visible":function(t){e.add_school_dialog=t}}},[t("div",{staticClass:"el_dialog_school_content"},[t("form",{staticClass:"el-form"},[t("div",{staticClass:"el-form-item",staticStyle:{"margin-top":"15px"}},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("学校名称")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.sch_name,expression:"sch_name"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"学校名称"},domProps:{value:e.sch_name},on:{input:function(t){t.target.composing||(e.sch_name=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("地区")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.region,expression:"region"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"请输入地区"},domProps:{value:e.region},on:{input:function(t){t.target.composing||(e.region=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("学校编码")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.schoolCode,expression:"schoolCode"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"请输入编码"},domProps:{value:e.schoolCode},on:{input:function(t){t.target.composing||(e.schoolCode=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("上级组织")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("el-form",{ref:"form",attrs:{model:e.school}},[t("el-select",{staticClass:"custom-select",attrs:{placeholder:"请选择组织",filterable:""},model:{value:e.school.parentOrgId,callback:function(t){e.$set(e.school,"parentOrgId",t)},expression:"school.parentOrgId"}},e._l(e.organizations,(function(o,s){return t("el-option",{key:s,attrs:{label:o.name,value:o.id}},[e._v(" "+e._s(o.name)+" ")])})),1)],1)],1)])])])])]),t("div",{staticClass:"el-dialog__footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.add_school_dialog=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.ajax_add_school}},[e._v("确认")])],1)]),t("el-dialog",{staticClass:"table",attrs:{title:"新增组织",visible:e.add_org_dialog,"before-close":e.close_add_org,width:"700px"},on:{"update:visible":function(t){e.add_org_dialog=t}}},[t("div",{staticClass:"el_dialog_org_content"},[t("form",{staticClass:"el-form"},[t("div",{staticClass:"el-form-item",staticStyle:{"margin-top":"15px"}},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("组织名称")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.orgName,expression:"orgName"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"组织名称"},domProps:{value:e.orgName},on:{input:function(t){t.target.composing||(e.orgName=t.target.value)}}})])])])]),t("div",{staticClass:"el-form-item"},[t("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px"}},[e._v("组织编码")]),t("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"5px"}},[t("span",[t("div",{staticClass:"add_input el-input el-input--suffix"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.randomCode,expression:"randomCode"}],staticClass:"el-input__inner",attrs:{type:"text",autocomplete:"off",placeholder:"请输入随机码"},domProps:{value:e.randomCode},on:{input:function(t){t.target.composing||(e.randomCode=t.target.value)}}})])])])])])]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.add_org_dialog=!1}}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.ajax_add_org}},[e._v("确认")])],1)]),t("el-pagination",{attrs:{"current-page":e.currentPage,"page-size":e.pageSize,total:e.total,layout:"total,prev, pager, next, jumper"},on:{"current-change":e.handlePageChange}})],1)])])},B=[],M={name:"IndexTable",components:{},data(){return{addBtn:0,isOrgFormVisible:!1,add_org_dialog:!1,add_school_dialog:!1,cn_org:!0,searchQuery:"",selectedSchool:{},organizations:[],cn_school:[],school:{OrgId:null},schoolList:[],AddUserInfo:{},orgName:"",u_create:"",randomCode:"",uLogin:"1",radio:"1",sch_name:"",region:"",schoolType:"1",schoolCode:"",loginPermission:"1",checked:!0,selectedOptions:[],showCompany:!1,selectedOrg:"CN",checkboxStates:Array(10).fill(!1),selectedSchools:Array(16).fill(""),button:Array(10).fill(!1),currentPage:1,currentApprovedPage:1,currentRefusedPage:1,currentAllPage:1,total:0,pageSize:10,pageSizeOptions:[10,25,50],currentTableData:[],Pending_request:!0,type:0,tableData:0,approvedData:0,RefusedData:0,AllData:0,checkArray:[],checkArray2:[],sortF:"add_time",sortO:"DESC"}},watch:{school:{deep:!0,handler:function(e){this.schoolList=[],e.OrgId?(this.schoolList=this.cn_school.filter((t=>t.org==e.OrgId)),this.searchQuery&&(this.schoolList=this.schoolList.filter((e=>e.name.includes(this.searchQuery))))):this.searchQuery?this.schoolList=this.cn_school.filter((e=>e.name.includes(this.searchQuery))):this.schoolList=this.cn_school,console.log("value is change",e)},immediate:!0},searchQuery(e){this.schoolList=[],this.school.OrgId?(this.schoolList=this.cn_school.filter((e=>e.org==this.school.OrgId)),this.searchQuery&&(this.schoolList=this.schoolList.filter((e=>e.name.includes(this.searchQuery)))),console.log("111")):e?(this.schoolList=this.cn_school.filter((t=>t.name.includes(e))),console.log("222")):this.schoolList=this.cn_school,console.log("value is change",e)}},computed:{...(0,m.L8)(["userid"])},methods:{close_add_org(){this.add_org_dialog=!1},ajax_org(){const e=[D.i.ajax_org];this.$ajax.post(D.i.baseUrl,e).then((e=>{e.data&&Array.isArray(e.data[0])&&(this.organizations=e.data[0].map((e=>({name:e.name,id:e.id}))))})).catch((e=>{this.$message.error("查询失败"),console.error("请求失败,错误信息:",e)}))},ajax_school(){const e=[D.i.ajax_school];this.$ajax.post(D.i.baseUrl,e).then((e=>{e.data&&Array.isArray(e.data[0])&&(this.cn_school=e.data[0].map((e=>({name:e.name,id:e.id,org:e.org}))),this.schoolList=e.data[0].map((e=>({name:e.name,id:e.id,org:e.org}))),console.log(this.cn_school))})).catch((e=>{this.$message.error("查询失败"),console.error("请求失败,错误信息:",e)}))},ajax_add_school(){if(!this.sch_name||""===this.sch_name.trim())return void this.$message.error("学校名称不能为空!");let e=[{functionName:D.i.ajax_add_school.functionName,u_name:this.sch_name,u_org:this.school.parentOrgId||"",u_dest:this.region||"",u_type:this.schoolType||"",u_code:this.schoolCode||"",u_isLogin:"1"===this.loginPermission?1:2,uid:this.userid}];this.$ajax.post(D.i.baseUrl,e).then((()=>{this.$message({type:"success",message:"已成功执行!"}),this.ajax_school(),this.add_school_dialog=!1,this.sch_name="",this.school.parentOrgId="",this.region="",this.schoolType="1",this.schoolCode="",this.loginPermission="1"})).catch((e=>{this.$message.error("插入失败"),console.error("请求失败,错误信息:",e)}))},ajax_add_org(){let e=this.orgName,t=this.randomCode||"",o=this.radio;if(!e)return void this.$message.error("组织名称不能为空");let s=[{functionName:D.i.ajax_add_org.functionName,u_name:e,u_create:this.userid,u_code:t,u_login:o}];this.$ajax.post(D.i.baseUrl,s).then((()=>{this.$message({type:"success",message:"已成功执行!"}),this.ajax_org(),this.add_org_dialog=!1,this.orgName="",this.randomCode="",this.uLogin="1"})).catch((e=>{this.$message.error("插入失败"),console.error("请求失败,错误信息:",e)}))},close_add_school(){this.add_school_dialog=!1},ajax_org_check(){this.selectedSchool={}},close_table(){this.isOrgFormVisible=!1,this.selectedSchool={},this.sch_name="",this.school.parentOrgId="",this.region="",this.schoolType="1",this.schoolCode="",this.loginPermission="1",this.orgName="",this.randomCode="",this.uLogin="1"},getStatusText(e){const t={0:"待审核",1:"已通过",2:"已忽略"};return t[e]||"未知状态"},getButtonType(e){const t={0:"primary",1:"success",2:"danger"};return t[e]||"default"},headerCellStyle(){return{backgroundColor:"#f1f1f1"}},handlePageChange(e){D.i.allRecords.page=e,this.$forceUpdate(),this.ajaxAll()},showData(e){this.sortF="add_time",this.sortO="DESC",this.type=e,this.$refs.rtable.clearSort(),this.ajaxAll()},handleSelectionChange(e){console.log(e),this.checkArray=e.map((e=>e.id)),this.checkArray2=e},ajaxAll(){console.log("获取所有记录");const e=[{functionName:D.i.allRecords.functionName,r_type:3==this.type?'""':this.type,page:D.i.allRecords.page,r_num:D.i.allRecords.num,sort_field:this.sortF,sort_order:this.sortO}];this.currentTableData=[],this.$ajax.post(D.i.baseUrl,e).then((e=>{e.data&&(this.currentTableData=e.data[0],this.total=e.data[0].length?e.data[0][0].total_count:0,this.tableData=e.data[1][0].num,this.approvedData=e.data[2][0].num,this.RefusedData=e.data[3][0].num,this.AllData=e.data[4][0].num),console.log("返回的结果为:",e.data)})).catch((e=>{console.error("请求失败,错误信息:",e)}))},addUser(e){let t={alias:e.name,username:e.username,org:e.orgid,oid:e.oid,ph:e.phonenumber,cid:"",type:1,opid:"",dest:"",eduid:""};console.log("params",t),N(t).then((e=>{e&&(this.$message({type:"success",message:"操作成功"}),this.ajaxAll())})).catch((e=>{console.error("请求失败,错误信息:",e)}))},async bactchConfirm(e){if(!this.checkArray.length)return void this.$message.error("请选择要操作的用户");const t=1===e?"您确定同意这些用户申请并创建吗?":0==e?"您确定将这些用户移动至待审核吗?":"您确定忽略这些用户申请吗?",o=e;if(!this.isOrgFormVisible&&1==e)return this.addBtn=1,this.isOrgFormVisible=!0;this.$confirm(t,"确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((async()=>{for(const s of this.checkArray2){const a=[{functionName:D.i.moveUser.functionName,uid:s.id,org:this.selectedSchool.org,oid:this.selectedSchool.id,type:o,euid:this.userid}];try{const t=await this.$ajax.post(D.i.baseUrl,a);console.log(t),1===e?(s.oid=this.selectedSchool.id,s.orgid=this.selectedSchool.org,await this.addUser(s)):this.$message.success("操作成功"),console.log("此条数据处理后的id为:",s.id)}catch(t){this.$message.error("操作失败"),console.error("请求失败,错误信息:",t)}}this.close_table(),await this.ajaxAll()})).catch((()=>{}))},onSortChange({prop:e,order:t}){t?(this.sortF="time"==e?"add_time":"update_time",this.sortO="descending"==t?"DESC":"ASC"):(this.sortF="add_time",this.sortO="DESC"),this.ajaxAll(),console.log(e,t)},ajax_move_user(e,t){this.AddUserInfo=t;let o="";if(1==e){if(1==t.type)return;if(!t.oid&&"{}"===JSON.stringify(this.selectedSchool))return this.addBtn=0,this.isOrgFormVisible=!0;o="您确定同意此用户申请并创建吗?"}else 2==e?o="您确定忽略此用户申请吗?":0==e&&(o="您确定将此用户移动至待审核吗?");let s=e;this.$confirm(o,"确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{let o=[{functionName:D.i.moveUser.functionName,uid:t.id,org:this.selectedSchool.org,oid:this.selectedSchool.id,type:s,euid:this.userid}];this.$ajax.post(D.i.baseUrl,o).then((o=>{console.log(o),1==e?(t.oid=this.selectedSchool.id,t.orgid=this.selectedSchool.org,this.addUser(t)):(this.$message({type:"success",message:"操作成功"}),this.ajaxAll()),this.close_table(),console.log("此条数据处理后的id为:",t.id)})).catch((e=>{this.$message.error("操作失败"),console.error("请求失败,错误信息:",e)}))})).catch((()=>{}))}},mounted(){this.ajaxAll(),this.ajax_org(),this.ajax_school()}},q=M,H=(0,n.A)(q,Q,B,!1,null,"2d9ab69e",null),K=H.exports;s["default"].use(d.Ay);const W=[{path:"/login",component:()=>o.e(976).then(o.bind(o,1976)),meta:{title:"登录",keepAlive:!1}},{path:"/",name:"home",component:P,redirect:"/user-list",children:[{path:"user-list",name:"UserList",component:F},{path:"user-examine",name:"UserExamine",component:K}]},{path:"/examineDialog",name:"examineDialog",component:()=>o.e(448).then(o.bind(o,7356))}],J=new d.Ay({routes:W});var G=J;const X={courseId:e=>e.app.courseId,testId:e=>e.app.testId,shareCourseId:e=>e.app.shareCourseId,id:e=>e.user.id,userid:e=>e.user.userinfo.userid,userinfo:e=>e.user.userinfo,token:e=>e.user.token};var Y=X;const Z={courseId:"",testId:"",shareCourseId:""},ee={SET_COURSEID:(e,t)=>{e.courseId=t},SET_TESTID:(e,t)=>{e.testId=t},SET_SHARECOURSEID:(e,t)=>{e.shareCourseId=t}},te={};var oe={state:Z,mutations:ee,actions:te},se=o(8704);const ae="vue_admin_template_token";function ie(){return se.A.get(ae)}function ne(e){return se.A.set(ae,e)}function le(){return se.A.remove(ae)}const re=()=>({token:ie(),id:"",roles:[],name:"",username:"",avatar:"",is_init:!1,userinfo:{}}),ce=re(),de={RESET_STATE:e=>{Object.assign(e,re())},SET_TOKEN:(e,t)=>{e.token=t},SET_ROLES:(e,t)=>{e.roles=t},SET_ID:(e,t)=>{e.id=t},SET_NAME:(e,t)=>{e.name=t},SET_USERNAME:(e,t)=>{e.username=t},SET_IS_INIT:(e,t)=>{e.is_init=t},SET_AVATAR:(e,t)=>{e.avatar=t},SET_USERINFO:(e,t)=>{e.userinfo=t}},ue={login({commit:e}){return new Promise(((t,o)=>{w().then((o=>{console.log(o);var s=o.data[0][0];e("SET_ID",s.userid),e("SET_TOKEN",s.userid),ne(s.userid),t(s.userid)})).catch((e=>{o(e)}))}))},getInfo({commit:e,state:t}){return new Promise(((o,s)=>{e("SET_ID",t.token),j({userid:t.token}).then((t=>{console.log(t);const a=t.data[0][0];a||s("验证失败,请重新登录。"),e("SET_USERINFO",a),o(a)})).catch((e=>{s(e)}))}))},logout({commit:e}){return new Promise((t=>{e("SET_TOKEN",""),e("SET_ROLES",[]),le(),e("RESET_STATE"),t()}))},resetToken({commit:e}){return new Promise((t=>{e("SET_TOKEN",""),e("SET_ROLES",[]),le(),t()}))}};var he={namespaced:!0,state:ce,mutations:de,actions:ue};s["default"].use(m.Ay);const me=new m.Ay.Store({modules:{app:oe,user:he},getters:Y});var pe=me,_e=o(9143),ge=o.n(_e),fe=o(4130),be=o.n(fe);be().configure({showSpinner:!1});const ve=["/login","/examineDialog"];G.beforeEach((async(e,t,o)=>{be().start();const s=pe.getters.token;if(s)if("/login"===e.path)o({path:"/"}),be().done();else{const t=pe.getters.userinfo&&Object.keys(pe.getters.userinfo).length>0;if(t)o();else try{const t=await pe.dispatch("user/getInfo");await pe.commit("user/SET_USERINFO",t),o({...e,replace:!0})}catch(a){await pe.dispatch("user/resetToken"),o(`/login?redirect=${e.path}`),be().done()}}else-1!==ve.indexOf(e.path)?o():(o(`/login?redirect=${e.path}`),be().done())})),G.afterEach((()=>{be().done()})),s["default"].config.productionTip=!1,s["default"].use(ge()),s["default"].prototype.$ajax=S,new s["default"]({router:G,store:pe,render:e=>e(c)}).$mount("#app")},2634:function(){}},t={};function o(s){var a=t[s];if(void 0!==a)return a.exports;var i=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,function(){o.amdO={}}(),function(){var e=[];o.O=function(t,s,a,i){if(!s){var n=1/0;for(d=0;d<e.length;d++){s=e[d][0],a=e[d][1],i=e[d][2];for(var l=!0,r=0;r<s.length;r++)(!1&i||n>=i)&&Object.keys(o.O).every((function(e){return o.O[e](s[r])}))?s.splice(r--,1):(l=!1,i<n&&(n=i));if(l){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[s,a,i]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}}(),function(){o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce((function(t,s){return o.f[s](e,t),t}),[]))}}(),function(){o.u=function(e){return"js/"+(448===e?"examineDialog":e)+"."+{448:"2714f1af",976:"6ff2b0f3"}[e]+".js"}}(),function(){o.miniCssF=function(e){return"css/"+(448===e?"examineDialog":e)+"."+{448:"fb6088eb",976:"87799d5f"}[e]+".css"}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="userManage:";o.l=function(s,a,i,n){if(e[s])e[s].push(a);else{var l,r;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==s||u.getAttribute("data-webpack")==t+i){l=u;break}}l||(r=!0,l=document.createElement("script"),l.charset="utf-8",l.timeout=120,o.nc&&l.setAttribute("nonce",o.nc),l.setAttribute("data-webpack",t+i),l.src=s),e[s]=[a];var h=function(t,o){l.onerror=l.onload=null,clearTimeout(m);var a=e[s];if(delete e[s],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((function(e){return e(o)})),t)return t(o)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),r&&document.head.appendChild(l)}}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){o.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){o.p="/"}(),function(){if("undefined"!==typeof document){var e=function(e,t,s,a,i){var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",o.nc&&(n.nonce=o.nc);var l=function(o){if(n.onerror=n.onload=null,"load"===o.type)a();else{var s=o&&o.type,l=o&&o.target&&o.target.href||t,r=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+l+")");r.name="ChunkLoadError",r.code="CSS_CHUNK_LOAD_FAILED",r.type=s,r.request=l,n.parentNode&&n.parentNode.removeChild(n),i(r)}};return n.onerror=n.onload=l,n.href=t,s?s.parentNode.insertBefore(n,s.nextSibling):document.head.appendChild(n),n},t=function(e,t){for(var o=document.getElementsByTagName("link"),s=0;s<o.length;s++){var a=o[s],i=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var n=document.getElementsByTagName("style");for(s=0;s<n.length;s++){a=n[s],i=a.getAttribute("data-href");if(i===e||i===t)return a}},s=function(s){return new Promise((function(a,i){var n=o.miniCssF(s),l=o.p+n;if(t(n,l))return a();e(s,l,null,a,i)}))},a={524:0};o.f.miniCss=function(e,t){var o={448:1,976:1};a[e]?t.push(a[e]):0!==a[e]&&o[e]&&t.push(a[e]=s(e).then((function(){a[e]=0}),(function(t){throw delete a[e],t})))}}}(),function(){var e={524:0};o.f.j=function(t,s){var a=o.o(e,t)?e[t]:void 0;if(0!==a)if(a)s.push(a[2]);else{var i=new Promise((function(o,s){a=e[t]=[o,s]}));s.push(a[2]=i);var n=o.p+o.u(t),l=new Error,r=function(s){if(o.o(e,t)&&(a=e[t],0!==a&&(e[t]=void 0),a)){var i=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+n+")",l.name="ChunkLoadError",l.type=i,l.request=n,a[1](l)}};o.l(n,r,"chunk-"+t,t)}},o.O.j=function(t){return 0===e[t]};var t=function(t,s){var a,i,n=s[0],l=s[1],r=s[2],c=0;if(n.some((function(t){return 0!==e[t]}))){for(a in l)o.o(l,a)&&(o.m[a]=l[a]);if(r)var d=r(o)}for(t&&t(s);c<n.length;c++)i=n[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(d)},s=self["webpackChunkuserManage"]=self["webpackChunkuserManage"]||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))}();var s=o.O(void 0,[504],(function(){return o(8527)}));s=o.O(s)})();
  2. //# sourceMappingURL=app.e1f44ad1.js.map