1"use strict";(self.webpackChunkrainweb=self.webpackChunkrainweb||[]).push([["16133"],{23207:function(e,t,n){n.d(t,{Z:function(){return r}});var r=(0,n(81049).Z)({__name:"loading-spin",setup:function(e){return{__sfc:!0}}},function(){return this._self._c,this._self._setupProxy,this._m(0)},[function(){var e=this._self._c;return this._self._setupProxy,e("section",{staticClass:"loading__wrapper box-center"},[e("div",{staticClass:"loading"})])}],!1,null,"76639149",null).exports},75114:function(e,t,n){n.r(t),n.d(t,{default:function(){return d}}),n(80764),n(87481),n(42463),n(13794),n(35286),n(20573),n(16446),n(13054),n(88761),n(60668),n(63064);var r=n(56907),a=n(18108),i=n(41990),s=n(12884),c=n(85369),o=n(23207),u=n(80477);function l(e,t,n,r,a,i,s){try{var c=e[i](s),o=c.value}catch(e){n(e);return}c.done?t(o):Promise.resolve(o).then(r,a)}function f(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function s(e){l(i,r,a,s,c,"next",e)}function c(e){l(i,r,a,s,c,"throw",e)}s(void 0)})}}function p(e,t){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function c(c){return function(o){var u=[c,o];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var d=(0,n(81049).Z)({__name:"teacher-team-content",setup:function(e,t){var n=t.expose,l=(0,s._p)("aiResultStore").useState,d=l(["agentBasicInfo"]).agentBasicInfo,h=(0,a.ref)([]),v=(0,a.ref)(!1),m=[];function g(e){return e.map(function(e){return/^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/.test(e.id)?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({teacher_name:e.teacher_name,picture:e.picture},e.teacher_id&&{teacher_id:e.teacher_id}):e})}function y(){return f(function(){var e,t;return p(this,function(n){switch(n.label){case 0:if(m.some(function(e){return!e.teacher_name}))return(0,i.Message)({message:r.a.t("AiResultDisplay.TeacherInformationCannotBeEmpty"),type:"error",customClass:"toastMessage",iconClass:"iconfont icon-weidu-mianzhuang"}),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),e=API.result_display.update_teacher.replace(/\{id\}/,d.value.agent_id),t={teachers:g(m)},[4,request.put(e,t)];case 2:return n.sent(),c.Z.emit("module-notice",{moduleName:["teacher-team","first-screen"],type:"teachers"}),c.Z.emit("teacher-update"),(0,i.Message)({message:r.a.t("AiResultDisplay.SavedSuccessfully"),type:"success",customClass:"toastMessage",iconClass:"iconfont icon-yuanquangou-mianzhuang"}),[3,4];case 3:return console.error("Error saving teachers data:",n.sent()),[3,4];case 4:return[2]}})})()}var b=function(){return f(function(){var e,t;return p(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=API.result_display.get_teacher_list.replace("{id}",d.value.agent_id),[4,request.get(e)];case 1:return(t=n.sent()).success&&(h.value=t.data,m=JSON.parse(JSON.stringify(t.data)),v.value=!0),[3,3];case 2:return console.log("getTeacherList",n.sent()),[3,3];case 3:return[2]}})})()};return b(),n({self_update:function(){return f(function(){return p(this,function(e){return y(),[2]})})()}}),{__sfc:!0,useState:l,agentBasicInfo:d,teachers:h,isLoad:v,teachersData:m,paramsTrans:g,onSubmit:y,updateTeachers:function(e){m=JSON.parse(JSON.stringify(e))},getTeacherList:b,Loading:o.Z,TeachingTeamContent:u.Z}}},function(){var e=this._self._c,t=this._self._setupProxy;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:!t.isLoad,expression:"!isLoad"}],staticStyle:{"min-height":"150px"}},[t.isLoad?e(t.TeachingTeamContent,{attrs:{teachers:t.teachers,"agent-id":t.agentBasicInfo.agent_id,"university-id":t.agentBasicInfo.university_id},on:{"update:teachers":t.updateTeachers}}):e(t.Loading)],1)},[],!1,null,null,null).exports}
1,80477:function(e,t,n){n.d(t,{Z:function(){return l}}),n(80287),n(32927),n(35130),n(35350),n(63064),n(63649),n(35286),n(20573),n(16446),n(13054),n(88761),n(60668),n(42463),n(57952),n(86067),n(72775),n(76556),n(80764),n(52042),n(47482);var r=n(56907),a=n(18108),i=n(36688),s=n.n(i),c=n(21097);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(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,t){if(e){if("string"==typeof e)return o(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=(0,n(81049).Z)({__name:"teaching-team-content",props:{teachers:{type:Array,default:function(){return[]}},agentId:{type:[Number,String],default:""},universityId:{type:[Number,String],default:""}},emits:["update:teachers"],setup:function(e,t){var n=t.emit,i=(0,a.ref)(JSON.parse(JSON.stringify(e.teachers))),o="https://qn-sy.yuketang.cn/new_defaultuser.png",l=(0,a.ref)(null),f=(0,a.ref)([]),p=(0,a.ref)(!1),d=(0,a.ref)([]);function h(){i.value.push({id:crypto.randomUUID(),teacher_id:"",teacher_name:"",picture:""}),(0,a.nextTick)(function(){return l.value[i.value.length-1].focus()}),(0,a.nextTick)(function(){var e=document.querySelector(".teching-team-dialog .content-wrap");e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}),n("update:teachers",i.value)}return(0,a.onMounted)(function(){0===i.value.length&&(h(),(0,a.nextTick)(function(){return l.value[0].focus()}))}),{__sfc:!0,props:e,emits:n,teachingTeam:i,defaultAvatar:o,selectRef:l,possibleUsers:f,loadingUser:p,openSelectIds:d,searchUser:function(t,n){if(""!==t){d.value.includes(n)||(d.value=u(d.value).concat([n]));var a={offset:0,limit:1e3,status:1,name:t,uv_id:e.universityId,term:"latest",from:"ai_display"};p.value=!0,request.get("/c27/api/v1/permission/teachers/",a).then(function(e){var n=e.success?e.data.results:[];f.value=[{name:r.a.t("AiResultDisplay.FirstScreenBasicVersionTeachingTeamContentNew",{query:t})}].concat(u(n))}).catch(function(e){console.error("Error fetching users:",e),f.value=[]}).finally(function(){p.value=!1})}else d.value=d.value.filter(function(e){return e!==n}),f.value=[]},onSelectVisibleChange:function(e,t,n){if(e&&n){d.value.includes(t)||(d.value=u(d.value).concat([t]));return}d.value=d.value.filter(function(e){return e!==t})},onSelectUser:function(e,t){var r=f.value.find(function(t){return t.id===e});i.value=i.value.map(function(e){if(e.id===t){var n,a,i;return a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e,r.id&&{teacher_id:r.id}),i=i={teacher_name:r.id?r.name:r.name.slice(0,-4),picture:(null==(n=e.picture)?void 0:n.includes("ai_display"))?e.picture:r.picture||o},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(i)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(i,e))}),a}return e}),n("update:teachers",i.value)},onAddTeacher:h,onDeleteTeacher:function(e){i.value=i.value.filter(function(t){return t.id!==e}),n("update:teachers",i.value)},handleItemOrderChange:function(e){var t=e.oldIndex,r=e.newIndex,a=i.value[t];i.value.splice(t,1),i.value.splice(r,0,a),n("update:teachers",i.value)},draggable:s(),ImageUpload:c.Z}}},function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",[t(n.draggable,{staticClass:"group-list",attrs:{tag:"ul",handle:".handle","scroll-sensitivity":200},on:{update:n.handleItemOrderChange}},e._l(n.teachingTeam,function(r){return t("li",{key:r.id,staticClass:"group-item-wrapper"},[t("div",{staticClass:"group-item box-start"},[t("span",{staticClass:"btn-icon box-center pointer handle"},[t("i",{staticClass:"iconfont icon-paixu6dian"})]),e._v(" "),t("div",{staticClass:"upload-img-box pointer"},[t(n.ImageUpload,{staticClass:"img",attrs:{width:32,height:32,"init-image-url":r.picture,"need-cropper":!0,"cropper-options":{aspectRatio:1}},on:{"update:imageUrl":function(e){r.picture=e,n.emits("update:teachers",n.teachingTeam)}}},[t("span",{staticClass:"upload-slot"})]),e._v(" "),t("i",{staticClass:"iconfont icon-bianji-bi"})],1),e._v(" "),t("div",{staticClass:"remote-select-wrapper"},[t("el-select",{ref:"selectRef",refInFor:!0,staticClass:"remote-select",attrs:{filterable:"",remote:"",placeholder:e.$t("AiResultDisplay.PleaseEnterTeacher
1SName"),"remote-method":function(e){return n.searchUser(e,r.id)},loading:n.loadingUser},on:{change:function(e){return n.onSelectUser(e,r.id)},"visible-change":function(e){return n.onSelectVisibleChange(e,r.id,r.teacher_name)}},model:{value:r.teacher_name,callback:function(t){e.$set(r,"teacher_name",t)},expression:"teacher.teacher_name"}},e._l(n.possibleUsers,function(r){return t("el-option",{key:r.id,staticClass:"teacher-select-option",attrs:{label:r.name,value:r.id}},[t("div",{staticClass:"teacher-item"},[t("img",{staticClass:"avatar",attrs:{width:"26",src:r.picture||n.defaultAvatar}}),e._v(" "),t("span",{staticClass:"name"},[e._v(e._s(r.name))]),e._v(" "),r.department_name?t("span",{staticClass:"number"},[e._v("("+e._s(r.department_name)+")")]):e._e()])])}),1),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:!n.loadingUser,expression:"!loadingUser"}],staticClass:"remote-select-arrow",class:{"remote-select-arrow--up":n.openSelectIds.includes(r.id)}})],1),e._v(" "),n.teachingTeam.length>1?t("span",{staticClass:"btn-icon box-center pointer",on:{click:function(e){return n.onDeleteTeacher(r.id)}}},[t("i",{staticClass:"iconfont icon-shanchu"})]):e._e()])])}),0),e._v(" "),t("div",{staticClass:"add-new box-center pointer",on:{click:n.onAddTeacher}},[t("i",{staticClass:"iconfont icon-tianjia1"}),e._v(" "),t("span",[e._v(e._s(e.$t("AiResultDisplay.AddTeachers")))])])],1)},[],!1,null,"11b383a5",null).exports},57952:function(e,t,n){var r=n(39409),a=n(96037),i=n(56830),s=n(55504),c=n(52376),o=n(34387),u=n(58275),l=n(90160),f=n(40263),p=i&&i.prototype;if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&s(function(){p.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=u(this,c("Promise")),n=o(e);return this.then(n?function(n){return l(t,e()).then(function(){return n})}:e,n?function(n){return l(t,e()).then(function(){throw n})}:e)}}),!a&&o(i)){var d=c("Promise").prototype.finally;p.finally!==d&&f(p,"finally",d,{unsafe:!0})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.