PageSourceSearch

https://fe-static-yuketang.yuketang.cn/fe/static/web/1.2.315/js/1819.19bf95ed.js

js yuketang.cn collected 2026-09-28 09:25:31 UTC 131,357 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkrainweb=self.webpackChunkrainweb||[]).push([["1819"],{72328:function(e,t,r){r.r(t),r.d(t,{default:function(){return o}}),r(80287);var a=r(18108),i=r(61982);function n(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}var o=(0,r(81049).Z)({__name:"problem",props:{graphInfo:{type:Object,default:function(){return{}}}},setup:function(e){var t=(0,a.ref)(!1),r=(0,a.ref)(null),o=(0,a.ref)({});(0,a.watch)(function(){return e.graphInfo},function(){e.graphInfo[0]&&(r.value=1==e.graphInfo[0].root_cnt?e.graphInfo[0].app_id:null,l())});var l=function(){var e;return(e=function(){var e,a;return function(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(i){return e=API.pc.exercise.get_instance_related_library_list,a={instance_id:r.value,page:1,size:1},request.get(e,a).then(function(e){if(e.success){t.value=!0;var r=e.data.library_list[0];o.value=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}({library_id:r.library_id,library_name:r.name,instance_id:r.instance_id},r)}}),[2]})},function(){var t=this,r=arguments;return new Promise(function(a,i){var o=e.apply(t,r);function l(e){n(o,a,i,l,s,"next",e)}function s(e){n(o,a,i,l,s,"throw",e)}l(void 0)})})()};return(0,a.onMounted)(function(){r.value=1==e.graphInfo[0].root_cnt?e.graphInfo[0].app_id:null,l()}),{__sfc:!0,props:e,hasLibraryId:t,instance_id:r,classroom_corresponding_library:o,fetchLibraryInfo:l,problemList:i.Z}}},function(){var e=this._self._c,t=this._self._setupProxy;return e("div",{staticClass:"problem-wrapper h-full"},[t.hasLibraryId?e(t.problemList,{attrs:{is_graph_library:!0,is_personal_library:!1,classroom_corresponding_library:t.classroom_corresponding_library}}):e("div",{staticClass:"flex flex-col items-center justify-center h-full"},[e("img",{attrs:{src:"https://qn-sfe.yuketang.cn/o_1htdv6lm0749160l1vk366m9sd9.png",width:"120"}}),this._v(" "),e("h4",[this._v("Oops!习题库不见了…")]),this._v(" "),e("p",{staticClass:"tips"},[this._v("没有找到习题库信息,请联系技术人员修复。")]),this._v(" "),e("p",{staticClass:"tips"},[this._v("可能的原因:习题库创建失败")])])],1)},[],!1,null,"422e7c81",null).exports},20815:function(e,t,r){r.d(t,{Z:function(){return a}});var a=(0,r(81049).Z)({name:"left-menu",data:function(){return{}},props:{background:Boolean,useSaveText:Boolean},components:{},computed:{},filters:{},methods:{}},function(){var e=this._self._c;return e("div",{staticClass:"loading-view"},[e("div",{staticClass:"loading-wrapper",class:this.background?"custom":""},[e("img",{attrs:{src:"https://qn-sfe.yuketang.cn/o_1cm4avc11ima6l71v0f19lb1fqq9.png",alt:""}}),this._v(" "),this._v(this._s(this.useSaveText?this.$t("pc.common.saving"):this.$t("pc.common.loading"))+"\n  ")])])},[],!1,null,"bb09e3f8",null).exports},79816:function(e,t,r){r.d(t,{Z:function(){return c}}),r(63064),r(63649),r(80287),r(35621),r(87481),r(80764),r(27281),r(13794),r(83765),r(72775),r(42463),r(76556),r(86067),r(35286),r(20573),r(16446),r(13054),r(88761),r(60668);var a=r(45287),i=r(2139),n=r(29473);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r.push.apply(r,a)}return r}
1)(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var s={props:["isUploadDialogShow","libraryid","_template_id_list","islibrary","folderId","is_graph_library"],data:function(){var e,t;return{name:"",baseInfo:{},importFileUrl:"".concat(API.pc.exercise.batch_import_templates),uploadData:{},file:{},fileTitle:"",is_importing:!1,isShowFile:!1,resultDialog:{visible:!1,data:{}},resultData:{},import_success:!0,suffixIsExcel:!0,suffixIsWord:!1,suffix:"",canUpload:!1,headers:{xtbz:this.is_graph_library?"ykt":"web","university-id":this.is_graph_library&&((null==(e=this.agentInfo)?void 0:e.university_id)||localStorage.getItem("university_id"))||0,term:"latest",uv_id:this.is_graph_library&&((null==(t=this.agentInfo)?void 0:t.university_id)||localStorage.getItem("university_id"))||0},qn:new a.B,wordUrl:"",is_docx_beta:!1}},computed:o({},(0,i.rn)(["agentInfo"])),components:{importResultDialog:n.Z},created:function(){if(this.getUser(),this.is_graph_library){var e,t=(null==(e=this.agentInfo)?void 0:e.university_id)||localStorage.getItem("university_id")||0;this.importFileUrl=API.pc.exercise.batch_modify_problem_knowledge+"?uv_id=".concat(t)}},methods:{getExcelInfo:function(e){if(e){if(e.size>0xa00000)return this.$message.error(this.$t("pc.paper.uploadwordorexcellimit")||"习题文件大小不得超过10M,请修改后再上传"),!1;var t=e.raw,r=e.name;this.isShowFile=!0,this.file=t;var a=r.split("."),i=a.pop();this.name=a.pop()||"",this.fileTitle="".concat(this.filenameHandle(this.name),".").concat(i),this.uploadData={folder_id:this.folderId||0,library_id:this.libraryid,is_from:1,error_type:+!this.islibrary},this.is_graph_library&&(this.uploadData.agent_id=+this.$route.params.course_id||0),this.suffixIsExcel="xlsx"==i||"xls"==i,this.suffixIsWord="docx"==i||"doc"==i,this.suffix=i,(this.suffixIsExcel||"doc"==this.suffix)&&(this.is_docx_beta=!1),this.suffixIsWord||this.suffixIsExcel?this.canUpload=!0:this.$message({message:this.$t("pc.paper.onlyuploadwordorexcel")||"只能上传 word 或 excel 文件",customClass:"toastMessage courseResourceToast courseClassToast",iconClass:"icon--toast-cuowu1 iconfont icon-font-20"})}},filenameHandle:function(e){if(this.strlength(e)>90){var t=e.split(""),r=e.length;return t.map(function(e,t){return t<40||t>r-3?e:t===r-4?"...":""}).join("")}return e},strlength:function(e){return e.replace(/[\u0000-\u007f]/g,"*").replace(/[\u0080-\u07ff]/g,"**").replace(/[\u0800-\uffff]/g,"***").length},removeFile:function(){this.$refs.upload.clearFiles(),this.file={},this.isShowFile=!1},imports:function(){this.suffixIsExcel?(this.$refs.upload.submit(),this.cancelUpload(-1),this.is_importing=!0):this.suffixIsWord&&(this.upload2QN(),this.cancelUpload(-1),this.is_importing=!0)},upload2QN:function(){var e=this;this.qn&&this.qn.trigger(this.file,function(t){var r=t.status,a=t.url;0===r&&e.asyncUploadDocx(a)})},asyncUploadDocx:function(e){var t=this,r=this.is_docx_beta?API.pc.exercise.async_upload_docx_beta:API.pc.exercise.async_upload_docx,a=this.userInfo,i=a.user_id,n=a.auth,o={url:e,library_id:this.libraryid,folder_id:this.folderId||0,user_id:i,auth:n};this.is_graph_library&&(o.source="ai_knowledge_graph",o.agent_id=+this.$route.params.course_id||0),request.post(r,o).then(function(e){var r=e.data.task_id;t.uploadDocxStatus(r)}).catch(function(){t.uploadFail(!0)})},uploadDocxStatus:function(e){var t=this,r=API.pc.exercise.upload_docx_status,a=this.userInfo,i=a.user_id,n=a.auth;request.post(r,{task_id:e,user_id:i,auth:n}).then(function(r){var a=r.data.status;"SUCCESS"===a?t.uploadDocxResult(e):"WAITING"===a||"RUNNING"===a?setTimeout(function(){t.uploadDocxStatus(e)},1e4):t.uploadFail(!0)}).catch(function(){t.uploadFail(!0)})},uploadDocxResult:function(e){var t=this;this.$refs.upload.clearFiles();var r=API.pc.exercise.upload_docx_result,a=this.userInfo,i=a.user_id,n=a.auth;request.post(r,{task_id:e,user_id:i,auth:n}).then(function(e){var r=e.data,a=r.problems,i=r.word_duplicate_count;t.is_importing=!1,t.$refs.upload.clearFiles(),t.canUpload=!1,t.wordImportHandle(a,i,r)}).catch(function(){t.uploadFail(!0)})},wordImportHandle:function(e,t,r){var a=this._template_id_list;if(this.islibrary){var i=r.problems,n=r.duplicate_count,s=r.success_count,c=r.failure_count,u=r.knowledge_error_count,d=r.error_list;this.$emit("updateList","3",s),Object.assign(this.resultData,{duplicate_count:n,success_count:s,error_count:c,error_list:void 0===d?[]:d,failure_count:c,knowledge_error_count:u}),i&&i.length?this.import_success=!0:(this.import_success=!1,this.is_importing=!1),this.getResultDialogData("word"),this.resultDialog.visible=!0;return}var p=e.filter(function(e){var t=e.template_id;return!t||!a.find(function(e){return t===e})}),f=e.filter(function(e){var t=e.template_id;return!!a.find(function(e){return t===e})});this.resultData.error_count=0;var h=p.map(function(e){return e.template_id}),_=p.length;if(_){var m={template_ids:h,list:p.map(function(e){return l(o({},e),{content:e})}),name:this.name};this.$emit("sendComponentData",{importData:m})}this.import_success=!0,this.resultData.success_count=_,this.resultData.duplicate_count=(f.length||0)+t,this.is_importing=!1,this.getResultDialogData("word"),this.resultDialog.visible=!0},generateProblemUnionId:function(){var e=new Date().getTime(),t=Math.floor(1e5*Math.random());return"".concat(e,"-").concat(t)},uploadSuccess:function(e){var t=this;if(this.is_importing=!1,e.success){this.$refs.upload.clearFiles(),this.canUpload=!1,this.resultData=e.data;var r=e.data,a=r.excel_problems_score_dict,i=r.excel_duplicate_count;if(this.islibrary){this.$emit("updateList","3",this.resultData.success_count),this.getResultDialogData("excel"),this.resultDialog.visible=!0;return}var n=e.data.problem_list;this.resultData.problemlist=n;var s=this._template_id_list,c=n.filter(function(e){return!s.find(function(t){return e===t})}),u=n.filter(function(e){return!!s.find(function(t){return e===t})}),d={template_ids:c,name:this.name};this.import_success=!0,this.resultData.success_count=c.length||0,this.resultData.duplicate_count=u.length+i,c.length?this.formSubmitCheck(c,a).then(function(e){t.getResultDialogData("excel"),t.resultDialog.visible=!0,d.list=e.map(function(e){return l(o({},e),{content:e})}),t.$emit("sendComponentData",{importData:d})}):(this.getResultDialogData("excel"),this.resultDialog.visible=!0)}else this.import_success=!1,this.getResultDialogData("excel"),this.resultDialog.visible=!0},uploadFail:function(e,t,r){console.log(e,t,r),e&&(this.is_importing=!1,this.import_success=!1,this.getResultDialogData("word"),this.resultDialog.visible=!0)},getResultDialogData:function(e){var t=this.resultData;if(!1==this.import_success)this.resultDialog.data={title:this.$t("pc.paper.importfail2")||"习题导入失败",icon:"icon-weidu-mianzhuang",iconstatus:"fail",body:this.$t("pc.paper.failtip")||"请参照模板修改文件内容并重新上传文件",type:e,error_list:this.resultData.error_list,failure_count:t.failure_count||0,knowledge_error_count:t.knowledge_error_count||0};else if(0==t.error_count&&0==t.duplicate_count)this.resultDialog.data={title:this.$t("pc.paper.successnum",{count:t.success_count})||"导入成功".concat(t.success_count,"题"),icon:"icon-yuanquangou-mianzhuang",iconstatus:"success",body:this.$t("pc.paper.reimport")||"* 建议您再次核对导入的习题内容",type:e};else{var r="<span>".concat(this.$t("pc.paper.successnum",{count:t.success_count}),"</span>")||"<span>导入成功".concat(t.success_count,"题</span>");r+=t.duplicate_count?'<span class="shuxian">|</span> <span>'.concat(this.$t("pc.paper.problemrepeat",{count:t.duplicate_count}),"</span>"):"",r+=t.error_count?'<span class="shuxian">|</span> <span>
1'.concat(this.$t("pc.paper.importfail",{count:t.error_count}),"</span>"):"",this.resultDialog.data={title:r,icon:"",iconstatus:"",body:this.$t("pc.paper.reimport")||"* 建议您再次核对导入的习题内容",type:e,error_list:t.error_list||[],error_count:t.error_count||0,knowledge_error_count:t.knowledge_error_count||0}}console.log("====",this.resultData)},cancelUpload:function(e){this.isShowFile=!1,this.$emit("update:isUploadDialogShow",!1),this.file={},-1!==e&&(this.$refs.upload.clearFiles(),this.canUpload=!1)},known:function(){var e=this;this.isShowFile=!1,this.file={},this.resultDialog.visible=!1,this.is_docx_beta=!1,setTimeout(function(){e.import_success=!0,e.resultData={},e.resultDialog.data={},e.$emit("known")})},formSubmitCheck:function(e,t){var r=this;return new Promise(function(a){var i=r.$loading({lock:!0,text:"loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.4)"});request.post(API.pc.exercise.batch_import_problems,{library_id:r.libraryid,template_ids:e,strategies:[3],reorder:1,excel_problems_score_dict:t}).then(function(e){if(e.success){var t=e.data.problems;t.forEach(function(e){"Polling"===e.Type&&(e.score=e.Score,e.is_score=e.isScore=+!!e.Score)}),a(t)}i.close()})})},getUser:function(){var e=this,t=API.lesson.get_user_info;return request.get(t).then(function(t){if(t&&t.data){var r=t.data,a=r.user_id,i=r.user_name;e.userInfo={user_id:a,auth:r.auth,avatar:r.avatar,user_name:i}}}).catch(function(e){return location.href=location.origin+"/web?next="+location.pathname+"&type=3",Promise.reject(e)})}}},c=(0,r(81049).Z)(s,function(){var e=this,t=e._self._c;return t("div",{staticClass:"uploadExcel"},[t("el-dialog",{staticClass:"upload_dialog",attrs:{title:e.$t("pc.paper.bulkimportproblem"),visible:e.isUploadDialogShow,width:"516px","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.isUploadDialogShow=t}}},[t("div",{staticClass:"upload_wrapper"},[t("div",{staticClass:"cover"},[t("el-upload",{ref:"upload",staticClass:"upload-excel",attrs:{drag:"",name:"problems",action:e.importFileUrl,data:e.uploadData,accept:".xlsx, .xls, .doc, .docx","on-error":e.uploadFail,"on-success":e.uploadSuccess,"auto-upload":!1,"show-file-list":!1,"on-change":e.getExcelInfo,headers:e.headers}},[t("img",{staticClass:"notHoverStyle",attrs:{src:r(38665)}}),e._v(" "),t("img",{staticClass:"hoverStyle",attrs:{src:r(73155)}}),e._v(" "),t("div",{staticStyle:{"margin-bottom":"10px"}},[e._v(" "+e._s(e.$t("pc.paper.uploadfile")))]),e._v(" "),t("div",{staticClass:"cover_size"},[e._v(" "+e._s(e.$t("pc.paper.uploadfiletip")))]),e._v(" "),t("div",{staticClass:"cover_size"},[e._v(" "+e._s(e.$t("pc.paper.problemnumlimt"))+","+e._s(e.$t("pc.paper.problemsizelimit")))])]),e._v(" "),e.isShowFile?t("div",{staticClass:"show_excel"},[t("div",{staticClass:"box"},[t("p",{staticClass:"file-icon-wrapper"},[t("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[t("use",e.suffixIsExcel?{attrs:{"xlink:href":e.is_graph_library?"#icon-xls":"#icon--xlsx"}}:{attrs:{"xlink:href":e.is_graph_library?"#icon-docx":"#icon--docx"}})])]),e._v(" "),t("p",[e._v("\n              "+e._s(e.fileTitle)+"\n              "),t("a",{on:{click:function(t){return e.removeFile()}}},[e._v(" "+e._s(e.$t("pc.common.delete")||"删除"))])])])]):e._e()],1),e._v(" "),t("div",{staticClass:"download-template"},[t("span",{staticClass:"text"},[t("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":e.is_graph_library?"#icon-xls":"#icon--xlsx"}})]),e._v(" "),t("span",[e._v("批量导入习题-模板.xlsx")])]),e._v(" "),t("span",{staticClass:"download"},[t("i",{staticClass:"iconfont icon-xiazai1"}),e._v(" "),t("a",{staticClass:"download_file",attrs:{href:e.is_graph_library?"https://fe-static-yuketang.yuketang.cn/fe/static/assets/rainweb/tiku/增强知识库-批量导入习题-模板.xlsx":"https://static-cdn.xuetangx.com/xtassets/provue/exam/excel/批量导入习题模板.xlsx",download:"download"}},[e._v(" "+e._s(e.$t("pc.paper.download")))])])]),e._v(" "),t("div",{staticClass:"download-template"},[t("span",{staticClass:"text"},[t("svg",{staticClass:"icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":e.is_graph_library?"#icon-docx":"#icon--docx"}})]),e._v(" "),t("span",[e._v("批量导入习题-模板.docx")])]),e._v(" "),t("span",{staticClass:"download"},[t("i",{staticClass:"iconfont icon-xiazai1"}),e._v(" "),t("a",{staticClass:"download_file",attrs:{href:e.is_graph_library?"https://fe-static-yuketang.yuketang.cn/fe/static/assets/rainweb/tiku/批量导入习题模板.docx":"https://storagecdn.xuetangx.com/public_assets/xuetangx/profession_vue/exams/批量导入习题模板1.docx",download:"download"}},[e._v(" "+e._s(e.$t("pc.paper.download")))])])])]),e._v(" "),e._e(),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{size:"medium",round:""},on:{click:e.cancelUpload}},[e._v(" "+e._s(e.$t("pc.common.cancel")))]),e._v(" "),t("el-button",{attrs:{size:"medium",round:"",type:"primary",disabled:0==Object.keys(e.file).length},on:{click:e.imports}}
1,[e._v(" "+e._s(e.$t("pc.common.ok")))])],1)]),e._v(" "),e.is_importing?t("div",{staticClass:"mode"},[t("div",{staticClass:"import-box"},[e._m(0),e._v(" "),t("p",{staticClass:"import-text"},[e._v(" "+e._s(e.$t("pc.paper.beimporting")))]),e._v(" "),t("p",{staticClass:"import-tips"},[e._v(" "+e._s(e.$t("pc.paper.notclosetip")))])])]):e._e(),e._v(" "),t("import-result-dialog",{attrs:{"result-dialog":e.resultDialog},on:{close:e.known}})],1)},[function(){var e=this._self._c;return e("p",[e("img",{attrs:{src:"https://qn-sfe.yuketang.cn/o_1e7515smc9cc1crg11nd4vd1rvj9.gif",width:"60px",height:"60px"}})])}],!1,null,null,null).exports},61982:function(e,t,r){r.d(t,{Z:function(){return Y}}),r(80287),r(13114),r(87481),r(93292),r(35350),r(42463),r(86067),r(27281),r(63649),r(83765),r(63064),r(47482),r(88353),r(13794),r(80764);var a=r(2139);r(72775);var i=r(18108);function n(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(a,i){var o=e.apply(t,r);function l(e){n(o,a,i,l,s,"next",e)}function s(e){n(o,a,i,l,s,"throw",e)}l(void 0)})}}function l(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var s=r(81049),c=(0,s.Z)({__name:"addOrEditFolderDialog",props:["editFolderDialog"],emits:["close","submitForm"],setup:function(e,t){var r=t.emit,a=(0,i.ref)(null),n=(0,i.ref)(null),s=(0,i.ref)({name:""}),c=(0,i.reactive)({name:[{required:!0,message:i18n.t("pc.library.inputFloderName"),trigger:"blur"}]});(0,i.watchEffect)(function(){var t;(null==(t=e.editFolderDialog)?void 0:t.name)&&(s.value.name=e.editFolderDialog.name),a.value&&a.value.focus()});var u=function(){return o(function(){return l(this,function(e){return[2,new Promise(function(e,t){n.value.validate(function(r){r?e(!0):t(!1)})})]})})()};return(0,i.onMounted)(function(){s.value.name=e.editFolderDialog.name,a.value&&a.value.focus()}),{__sfc:!0,props:e,emit:r,nameRef:a,ref_questionFolderForm:n,questionFolderForm:s,questionFolderRules:c,clearForm:function(){n.value.resetFields(),n.value.clearValidate(),r("close")},validate:u,submit:function(){return o(function(){return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,u()];case 1:return e.sent()&&r("submitForm",s.value.name),[3,3];case 2:return console.log(e.sent()),[3,3];case 3:return[2]}})})()}}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{attrs:{title:e.editFolderDialog.title,"custom-class":"library-folder-dialog",visible:e.editFolderDialog.visible,"close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){return e.$set(e.editFolderDialog,"visible",t)},close:r.clearForm}},[t("el-form",{ref:"ref_questionFolderForm",attrs:{"label-width":"120px",model:r.questionFolderForm,rules:r.questionFolderRules},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{label:e.$t("pc.library.folderName"),prop:"name"}},[t("el-input",{ref:"nameRef",staticStyle:{width:"90%"},attrs:{placeholder:e.$t("pc.library.inputFloderName")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:r.submit.apply(null,arguments)}},model:{value:r.questionFolderForm.name,callback:function(t){e.$set(r.questionFolderForm,"name",t)},expression:"questionFolderForm.name"}}
1)],1)],1),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer",center:"false"},slot:"footer"},[t("el-button",{on:{click:r.clearForm}},[e._v(e._s(e.$t("pc.common.cancel")))]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:r.submit}},[e._v(e._s(e.$t("pc.common.ok")))])],1)],1)},[],!1,null,null,null).exports,u=r(41990),d=(0,s.Z)({__name:"moveFolderDialog",props:["root_folders","moveFolderDialog"],emits:["close","confirm"],setup:function(e,t){var r=t.emit,a=(0,i.reactive)({children:"",label:"name",isLeaf:"isLeaf"}),n=(0,i.ref)(null),o=(0,i.computed)(function(){return n.value&&n.value.getCurrentNode()});return{__sfc:!0,props:e,emit:r,defaultProps:a,treeDialogFirst:n,handleMove:function(){var e=n.value&&n.value.getCurrentNode();if(!e)return(0,u.Message)({message:il8n.t("pc.library.listSelect")||"请选择目录",type:"success"}),!1;e&&r("confirm",{dialog_node:e,type:7})},moveAble:o}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{attrs:{title:e.$t("pc.library.selectlist"),visible:e.moveFolderDialog.visible,"custom-class":"library-move_folderDialog"},on:{"update:visible":function(t){return e.$set(e.moveFolderDialog,"visible",t)}}},[t("el-tree",{ref:"treeDialogFirst",staticClass:"folder-tree",attrs:{props:r.defaultProps,data:e.root_folders,"highlight-current":""},scopedSlots:e._u([{key:"default",fn:function(r){var a=r.node,i=r.data;return t("span",{staticClass:"custom-tree-node",class:{"custom-child-tree":2==a.level}},[t("span",{staticClass:"custom-tree-icon"},[t("svg",{staticClass:"icon svg-icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":i.problems_count?"#icon-wenjianjiahuang":"#icon-wenjianjia",fill:"#FFB02C"}})])]),e._v(" "),t("span",{staticClass:"tree_text"},[e._v(e._s(i.name))]),e._v(" "),t("i",{staticClass:"tree_status iconfont icon-cu-xuanzhong"})])}}])}),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer",center:"false"},slot:"footer"},[t("el-button",{on:{click:function(e){return r.emit("close")}}},[e._v(e._s(e.$t("pc.common.cancel")))]),e._v(" "),t("el-button",{attrs:{type:"primary",disabled:!r.moveAble},on:{click:r.handleMove}},[e._v(e._s(e.$t("pc.library.move")))])],1)],1)},[],!1,null,null,null).exports,p=r(51787),f=(0,s.Z)({name:"problemFolder",data:function(){return{root_folders:[],root_problems_list:{},root_problems:{total_problems_count:0,root_problem_count:0},defaultProps:{children:"inside_folders",label:"name",isLeaf:"isLeaf"},editFolderDialog:{visible:!1,title:this.ifedit?this.$t("pc.library.nameFolder"):this.$t("pc.library.createFolder")},questionFolderForm:{name:""},treeData:{},treeNode:{},ifedit:!1,moveFolderDialog:{visible:!1},showFolderListAllDialog:!1,library_name:"",isActive:0,canSubmit:!0,currentKey:0}},components:{addOrEditFolderDialog:c,moveFolderDialog:d},props:["showFolderListAll","page","size","problemList","fromCourseResource","library_id","isSearch","is_graph_library","searchForm"],mounted:function(){this.library_id&&this.init()},watch:{showFolderListAll:function(e,t){var r=this;
1e?(this.showFolderListAllDialog=!0,this.$nextTick(function(){r.$refs.treeDialogAll.root.setData(r.root_folders),r.$refs.treeDialogAll.filter()})):this.showFolderListAllDialog=!1},library_id:function(e,t){e&&this.init()}},methods:{toogleChild:function(e){e.childNodes.length&&(e.expanded=!e.expanded)},init:function(){var e=this,t=API.pc.exercise.get_library_root_catalog;request.get(t,{library_id:this.library_id,unfold:1}).then(function(t){if(t.success){var r=t.data,a=r.root_folders,i=r.total_problems_count,n=r.root_problem_count;e.root_folders=a,e.root_problems.total_problems_count=i,e.root_problems.root_problem_count=n}})},showAll:function(){this.isActive=0,this.setParentData("folder_id",0),this.initFactor(),this.$emit("showAll")},getUnclassifiedProblem:function(e,t){var r=this;this.isActive=1,this.initTreeSelect(null),e&&1!==e&&this.initFactor(),this.$nextTick(function(){var a=r.page;request.get(API.pc.exercise.get_root_problems_list,{library_id:r.library_id,page:a,size:r.size,source:r.searchForm.source}).then(function(i){if(i.success){var n="string"==typeof i.data?(0,p.o)(i.data):i.data;if(!n){r.root_problems_list={},r.setParentData("problemList",[]),r.setParentData("total",0);return}r.setParentData("lastSuccessfulPage",a),r.root_problems_list=n,r.setParentData("problemList",n.problems_list),r.setParentData("fromfolder",!0),r.setParentData("folder_id",0),r.setParentData("total",n.total_count),3==e&&r.changeumFromParent(0,0,t),1!=e&&(r.setParentData("multipleSelectionAllKey",[]),r.setParentData("multipleSelection",[]))}}).catch(function(e){r.$emit("problem-list-error",e)})})},addTotolNum:function(e){this.root_problems.total_problems_count+=e},initTreeSelect:function(e){this.$refs.tree.setCurrentKey(e)},setSL:function(e,t){e.target.scrollWidth>e.target.offsetWidth?this.$set(t,["showp"],!1):this.$set(t,["showp"],!0)},filterNodeFirst:function(e,t){return!t.noBtn&&t.name},initFactor:function(){this.$emit("initFactor")},changeumFromParent:function(e,t,r){var a=null;if(this.addTotolNum(r),e&&t)switch((a=this.$refs.tree.getNode(t)).level){case 1:a.data.problems_count+=r;break;case 2:a.data.problems_count+=r,a.parent.data.problems_count+=r}else this.root_problems.root_problem_count+=r},handleNodeClick:function(e,t,r,a){var i=this;this.isActive=2,(!e.folder_id||r&&1!=r)&&this.initFactor(),this.$nextTick(function(){var t=i.page;request.get(API.pc.exercise.get_upper_folder_catalog,{library_id:i.library_id,folder_id:e.folder_id,page:t,size:i.size,source:i.searchForm.source}).then(function(n){if(n.success){var o="string"==typeof n.data?(0,p.o)(n.data):n.data;if(!o){i.setParentData("problemList",[]),i.setParentData("total",0);return}i.setParentData("lastSuccessfulPage",t),3==r&&i.changeumFromParent(!0,e.folder_id,a),i.setParentData("fromfolder",!0),i.setParentData("folder_id",e.folder_id||0),i.setParentData("problemList",o.inside_problems_list.problems_list),i.setParentData("total",o.inside_problems_list.total_count),1!=r&&(i.setParentData("multipleSelectionAllKey",[]),i.setParentData("multipleSelection",[]))}}).catch(function(e){i.$emit("problem-list-error",e)})})},closeFolderDialog:function(){this.editFolderDialog.visible=!1},submitForm:function(e){var t=this;if(this.canSubmit){this.canSubmit=!1;var r=this.ifedit?API.pc.exercise.manage_folder:API.pc.exercise.create_folder,a={library_id:this.library_id,name:e};this.ifedit?a.folder_id=this.treeData.folder_id:a.pid=this.treeData.folder_id?this.treeData.folder_id:0,request.post(r,a).then(function(e){if(e.success){var r=e.data,a=r.folder_name,i=r.folder_id;if(t.ifedit)t.treeData.name=a,t.editFolderDialog.visible=!1,t.$message({message:t.$t("pc.library.modifySuccess")||"修改成功",type:"success"}),t.handleNodeClick(t.treeData,null),t.canSubmit=!0;else{var n={name:a,folder_id:i,problems_count:0,isLeaf:1==t.treeNode.level,inside_folders:[]};t.$refs.tree.append(n,t.treeNode),t.treeNode.expanded=!0,t.editFolderDialog.visible=!1,t.$message({message:t.$t("pc.library.newSuccess")||"新建成功",type:"success"});var o=t.treeNode.childNodes[t.treeNode.childNodes.length-1];t.handleNodeClick(o.data,null),t.initTreeSelect(o),setTimeout(function(){t.canSubmit=!0},2e3)}}})}},rightBtn:function(e){var t=this;switch(this.initTreeSelect(e.node),e.type){case 1:request.post(API.pc.exercise.move_folder,{folder_id:e.node.data.folder_id,library_id:this.library_id,relative_position:-1,target_pid:-1}
1).then(function(r){var a=e.node.parent.childNodes,i=a.findIndex(function(t){return t.data.folder_id===e.node.data.folder_id});i>0&&(t.$refs.tree.remove(e.node.data),t.$refs.tree.insertBefore(e.node.data,a[i-1])),t.$message({message:t.$t("pc.library.moveSuccess")||"移动成功",type:"success"})});break;case 2:request.post(API.pc.exercise.move_folder,{folder_id:e.node.data.folder_id,library_id:this.library_id,relative_position:1,target_pid:-1}).then(function(r){var a=e.node.parent.childNodes,i=a.findIndex(function(t){return t.data.folder_id===e.node.data.folder_id});a.length-1>i&&(t.$refs.tree.remove(e.node.data),t.$refs.tree.insertAfter(e.node.data,a[i])),t.$message({message:t.$t("pc.library.moveSuccess")||"移动成功",type:"success"})});break;case 3:this.showDialog(2,e.node);break;case 4:this.showDialog(1,e.data,e.node);break;case 5:var r=this.$t("pc.library.delTips0")||"文件夹内习题将移动到上级文件夹中",a=this.$t("pc.library.delTips1")||"文件夹(包括子文件夹)内习题将被移动到「未分类习题」中";this.$confirm(1==e.node.level?a:r,this.$t("pc.library.delFolder"),{showClose:!1,dangerouslyUseHTMLString:!0,confirmButtonText:this.$t("pc.common.confirm")||"确定",cancelButtonText:this.$t("pc.common.cancel")||"取消",type:"warning",iconClass:"iconfont icon-weidu-mianzhuang",customClass:"library-commondel__messagebox has-icon"}).then(function(){e.node.parent,request.post(API.pc.exercise.delete_folder,{folder_id:e.node.data.folder_id,library_id:t.library_id}).then(function(r){1==e.node.level&&(t.isActive=1,t.getUnclassifiedProblem(),t.root_problems.root_problem_count+=e.node.data.problems_count),t.$refs.tree.remove(e.node),t.$message({message:t.$t("pc.library.delSuccess")||"删除成功",type:"success"})})});break;case 6:this.moveFolderDialog.visible=!0,this.treeNode=e.node;break;case 7:var i=e.dialog_node,n=this.treeNode.parent,o=n.childNodes,l=this.$refs.tree.getNode(i.folder_id);n.data.folder_id!=i.folder_id?request.post(API.pc.exercise.move_folder,{folder_id:this.treeNode.data.folder_id,library_id:this.library_id,relative_position:0,target_pid:i.folder_id}).then(function(e){var r=o.findIndex(function(e){return e.data.folder_id===t.treeNode.data.folder_id});n.data.problems_count-=o[r].data.problems_count,l.data.problems_count+=o[r].data.problems_count;var a=t.treeNode.data;t.$refs.tree.remove(t.treeNode.data),t.$refs.tree.append(a,l),t.handleNodeClick(l.childNodes[l.childNodes.length-1].data,null),t.initTreeSelect(l.childNodes[l.childNodes.length-1]),l.expanded=!0,t.$message({message:t.$t("pc.library.moveSuccess")||"移动成功",type:"success"}),t.moveFolderDialog.visible=!1}):this.moveFolderDialog.visible=!1;break;case 8:var s=this.$refs.treeDialogAll.getCurrentNode();if(this.$refs.tree.getCurrentNode(),!s)return this.$message({message:this.$t("pc.library.listSelect")||"请选择目录",type:"success"}),!1;var c=[],u=this.$refs.tree.getNode(s);this.problemList.forEach(function(e){e.folder_id!=u.data.folder_id&&c.push(e.problem_id)});var d=this.problemList[0].folder_id?this.$refs.tree.getNode(this.problemList[0]):null,p=c.length;0==p?this.$message({message:this.$t("pc.library.selectTips")||"已经在此目录下",type:"success"}):request.post(API.pc.exercise.move_problem_template,{library_id:this.library_id,template_ids:c,target_folder_id:u.data.folder_id}).then(function(e){t.handleNodeClick(u.data,null),t.initTreeSelect(u),d?(d.data.problems_count-=p,2==d.level&&(d.parent.data.problems_count-=p)):t.root_problems.root_problem_count-=p,u.data.problems_count+=p,2==u.level&&(u.parent.data.problems_count+=p,u.parent.expanded=!0),t.setParentData("multipleSelection",[]),t.setParentData("showPLYDDialog",!1)})}},showDialog:function(e,t,r){switch(e){case 1:this.editFolderDialog.visible=!0,this.editFolderDialog.name="",this.treeData=t,this.treeNode=r,this.ifedit=!1,this.editFolderDialog.title=this.$t("pc.library.createFolder");break;case 2:this.editFolderDialog.visible=!0,this.editFolderDialog.name=t.name,this.editFolderDialog.title=this.$t("pc.library.nameFolder"),this.treeData=t,this.ifedit=!0}},ifCanMove:function(e,t){var r=t.parent.childNodes;if(!r.length||!t.data.folder_id)return!1;var a=r.findIndex(function(e){return e.data.folder_id===t.data.folder_id});if(e>0)if(a>=r.length-1)return!1;else return!0;return 0!=a&&!0},setParentData:function(e,t){this.$emit("setData",e,t)}}},function(){var e=this,t=e._self._c;return t("div",{staticClass:"problem-folder"},[t("div",{staticClass:"exercises"},[t("p",{staticClass:"item",class:{active:0==this.isActive},on:{click:function(t){return t.stopPropagation(),e.showAll()}}},[t("span",{staticClass:"item-text"},[e._v(e._s(e.$t("pc.library.allExercise")))]),e._v(" "),t("span",{staticClass:"item-count"},[e._v(e._s(e.root_problems.total_problems_count))])]),e._v(" "),t("p",{staticClass:"item pl16",class:{active:1==this.isActive},on:{click:function(t){return t.stopPropagation(),e.getUnclassifiedProblem(2)}}},[t("span",{staticClass:"item-text"},[t("svg",{staticClass:"icon svg-icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":"#icon-wenjianjialan"}})]),e._v(e._s(e.$t("pc.library.unclassifiedExercise"))+"\n      ")]),e._v(" "),t("span",{staticClass:"item-count"},[e._v(e._s(e.root_problems.root_problem_count))])]),e._v(" "),e.fromCourseResource?e._e():t("p",{staticClass:"item pl16",on:{click:function(t){return e.showDialog(1,{},e.$refs.tree.root)}}},[t("span",{staticClass:"item-text"},[t("svg",{staticClass:"icon svg-icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":"#icon-wenjianjiaxinjian1",fill:"#FFB02C"}})]),e._v(" "),e._v(e._s(e.$t("pc.library.newfolder"))+"\n      ")])])]),e._v(" "),t("el-tree",{ref:"tree",staticClass:"folder-tree",attrs:{data:e.root_folders,props:e.defaultProps,"highlight-current":"","default-expand-all":"","node-key":"folder_id","expand-on-click-node":!1},on:{"node-click":e.handleNodeClick}
1,scopedSlots:e._u([{key:"default",fn:function(r){var a=r.node,i=r.data;return t("span",{staticClass:"custom-tree-node",class:{"custom-child-tree":2==a.level}},[t("span",{staticClass:"custom-tree-icon",on:{click:function(t){return e.toogleChild(a)}}},[t("svg",{staticClass:"icon svg-icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":i.problems_count?a.expanded&&a.childNodes&&a.childNodes.length?"#icon-wenjianjiahuang-kai":"#icon-wenjianjiahuang":"#icon-wenjianjia",fill:"#FFB02C"}})])]),e._v(" "),t("el-tooltip",{attrs:{placement:"top-start",trigger:"hover",disabled:i.showp,enterable:!1,"popper-class":"titlespanitem",content:i.name}},[t("span",{staticClass:"tree_text",on:{mouseover:function(t){return e.setSL(t,i)}}},[e._v(e._s(i.name))])]),e._v(" "),t("span",{staticClass:"tree_num"},[e._v(e._s(i.problems_count))]),e._v(" "),e.fromCourseResource?e._e():t("span",{staticClass:"tree_btn"},[t("el-dropdown",{on:{command:e.rightBtn}},[t("span",{staticClass:"el-dropdown-link",on:{click:function(e){return e.stopPropagation(),(function(){}).apply(null,arguments)}}},[t("span",{staticClass:"iconfont",class:e.is_graph_library?"icon-gengduo-shu":"icon-gengduo"})]),e._v(" "),t("el-dropdown-menu",{staticClass:"folder-dropdown__menu",attrs:{slot:"dropdown"},slot:"dropdown"},[e.ifCanMove(-1,a)?t("el-dropdown-item",{attrs:{command:{type:1,node:a}}},[e._v(e._s(e.$t("pc.library.up")))]):e._e(),e._v(" "),e.ifCanMove(1,a)?t("el-dropdown-item",{attrs:{command:{type:2,node:a}}},[e._v(e._s(e.$t("pc.library.down")))]):e._e(),e._v(" "),2==a.level?t("el-dropdown-item",{attrs:{command:{type:6,node:a,data:i}}},[e._v(e._s(e.$t("pc.library.move")))]):e._e(),e._v(" "),t("el-dropdown-item",{attrs:{command:{type:3,node:i}}},[e._v(e._s(e.$t("pc.library.rename")))]),e._v(" "),1==a.level?t("el-dropdown-item",{attrs:{command:{type:4,node:a,data:i}}},[e._v(e._s(e.$t("pc.library.createSonFolder")))]):e._e(),e._v(" "),t("el-dropdown-item",{attrs:{command:{type:5,node:a}}},[e._v(e._s(e.$t("pc.library.delFolder")))])],1)],1)],1)],1)}}])}),e._v(" "),e.editFolderDialog.visible?t("addOrEditFolderDialog",{attrs:{editFolderDialog:e.editFolderDialog},on:{close:e.closeFolderDialog,submitForm:e.submitForm}}):e._e(),e._v(" "),e.moveFolderDialog.visible?t("moveFolderDialog",{attrs:{moveFolderDialog:e.moveFolderDialog,root_folders:e.root_folders},on:{close:function(t){e.moveFolderDialog.visible=!1},confirm:e.rightBtn}}):e._e(),e._v(" "),t("el-dialog",{attrs:{title:e.$t("pc.library.selectlist"),visible:e.showFolderListAllDialog,"custom-class":"move_floderDialog"},on:{"update:visible":function(t){e.showFolderListAllDialog=t},close:function(t){return e.setParentData("showPLYDDialog",!1)}}},[t("el-tree",{ref:"treeDialogAll",staticClass:"folder-tree",attrs:{props:e.defaultProps,data:e.root_folders,"highlight-current":"","filter-node-method":e.filterNodeFirst,"default-expand-all":"","expand-on-click-node":!1},scopedSlots:e._u([{key:"default",fn:function(r){var a=r.node,i=r.data;return t("span",{staticClass:"custom-tree-node",class:{"custom-child-tree":2==a.level}},[t("span",{staticClass:"custom-tree-icon",on:{click:function(t){return e.toogleChild(a)}}},[t("svg",{staticClass:"icon svg-icon",attrs:{"aria-hidden":"true"}},[t("use",{attrs:{"xlink:href":i.problems_count?a.expanded&&a.childNodes&&a.childNodes.length?"#icon-wenjianjiahuang-kai":"#icon-wenjianjiahuang":"#icon-wenjianjia",fill:"#FFB02C"}})])]),e._v(" "),t("el-tooltip",{attrs:{placement:"top-start",trigger:"hover",disabled:i.showp,enterable:!1,"popper-class":"titlespanitem",content:i.name}},[t("span",{staticClass:"tree_text",on:{mouseover:function(t){return e.setSL(t,i)}}},[e._v(e._s(i.name))])]),e._v(" "),t("i",{staticClass:"tree_status iconfont icon-cu-xuanzhong"})],1)}}])}),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer",center:"false"},slot:"footer"},[t("el-button",{on:{click:function(t){e.setParentData("showPLYDDialog",!1),e.showFolderListAllDialog=!1}}},[e._v(e._s(e.$t("pc.common.cancel")))]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.rightBtn({type:8})}}}
1,[e._v(e._s(e.$t("pc.library.move")))])],1)],1)],1)},[],!1,null,"36e7c05c",null).exports,h=r(79816);function _(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(a,i){var n=e.apply(t,r);function o(e){_(n,a,i,o,l,"next",e)}function l(e){_(n,a,i,o,l,"throw",e)}o(void 0)})}}function g(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}r(52042),r(35621);var b=(0,s.Z)({__name:"problemK12KnowledgeGraphTree",props:{currentTab:{type:Number,default:1},initSelected:{type:null}},emits:["selected"],setup:function(e,t){var r=t.expose,a=t.emit,n=(0,i.ref)(null),o=(0,i.ref)(null),l=(0,i.ref)(!0),s=(0,i.ref)(!0),c=(0,i.ref)({1:[],2:[]}),u={stage_id:0,subject_id:0,version_id:0,textbook_id:0,knowledge_graph_id:0,knowledge_node_id:0,catalog_graph_id:0,catalog_node_id:0},d=(0,i.ref)({1:{tree:[],selectedTop:[],selectedDown:{id:0},graphId:0,graphCid:0},2:{tree:[],selectedTop:[],selectedDown:{id:0},graphId:0,graphCid:0}}),p=(0,i.ref)({1:{cascade:{},tree:{}},2:{cascade:{},tree:{}}});function f(e,t){var r=e.join("_");return p.value[t].cascade[r]}var h=!1;function _(e,t){return m(function(){var r;return g(this,function(a){switch(a.label){case 0:return[4,request.get("/c27/external/xueke/k12/knowledge_graph_map/textbooks/",{stage_id:Number(e[0]),subject_id:Number(e[1])})];case 1:return v(r=a.sent().data,{childrenKeys:["textbook_data"],labelKeys:["version_name","volume"],valueKeys:["version_id","id"],leafValue:!0,map:t,initPid:e.map(function(e){return Number(e)})}),[2,r]}})})()}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return m(function(){return g(this,function(r){switch(r.label){case 0:return[4,request.get("/c27/external/xueke/k12/knowledge_graphs/".concat(e,"/nodes/"),{child_node_id:t||void 0})];case 1:return[2,r.sent().data.nodes[0].children]}})})()}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.level,a=void 0===r?0:r,i=t.childrenKeys,n=void 0===i?["subject_data"]:i,o=t.labelKeys,l=void 0===o?["name","subject_name"]:o,s=t.valueKeys,c=void 0===s?["id","subject_id"]:s,u=t.leafKeys,d=void 0===u?["leaf"]:u,p=t.leafValue,f=t.map,h=t.initPid,_=void 0===h?[]:h,m=t.pid,g=void 0===m?[]:m;e.forEach(function(e){var t=a<l.length?l[a]:l[l.length-1],r=a<c.length?c[a]:c[c.length-1],i=a<n.length?n[a]:n[n.length-1],o=a<d.length?d[a]:d[d.length-1];e.label=e[t];var s=Number(e[r]);0===a&&(g=_.map(function(e){return Number(e)})),e.pid=g.map(function(e){return Number(e)}),e.key="".concat(s),e.pid.length&&(e.key="".concat(e.pid.join("_"),"_").concat(s)),f[e.key]=e,e.value=s;var u=e[i];e.children=null,u&&u.length>0?(e.children=u,g.push(s),v(u,{level:a+1,childrenKeys:n,labelKeys:l,valueKeys:c,leafKeys:d,leafValue:p,map:f,pid:g})):e[o]=p})}function y(){return m(function(){var t,r,i,n;return g(this,function(o){switch(o.label){case 0:return t=function(t){var n,o,l,s,h,m;return g(this,function(g){switch(g.label){case 0:if(n=JSON.parse(JSON.stringify(r)),o=[u.stage_id,u.subject_id],l=u.knowledge_graph_id,s=u.knowledge_node_id,v(n,{map:p.value[t].cascade}),2!==t)return[3,2];return h=f(o,t),o.push(u.version_id,u.textbook_id),l=u.catalog_graph_id,s=u.catalog_node_id,[4,_(o,p.value[t].cascade)];case 1:h.children=g.sent(),g.label=2;case 2:return m=d.value[t],c.value[t]=n,m.selectedTop=o,m.graphId=l,m.graphCid=s,b(l,s).then(function(e){1===t?d.value[t].tree=[{id:0,name:"无知识点"},{id:s,name:"全部知识点",children:e}]:d.value[t].tree=[{id:0,name:"无章节"},{id:s,name:"全部章节",children:e}]}),a("selected",{selected:d.value,refresh:i,currentTab:e.currentTab,mapNodes:p.value,defaultSelected:u}),[2]}})},[4,request.get("/c27/external/xueke/k12/knowledge_graph_map/knowledge/")];case 1:if(r=o.sent().data,i=!1,!(e.initSelected&&e.initSelected.stage_id))return[3,2];return Object.assign(u,e.initSelected),[3,4];case 2:return[4,request.get("/c27/external/xueke/knowledge_graph_record/")];case 3:Object.assign(u,o.sent().data),i=!0,o.label=4;case 4:d.value[1].selectedDown.id=u.knowledge_node_id,d.value[2].selectedDown.id=u.catalog_node_id,n=1,o.label=5;case 5:if(!(n<3))return[3,8];return[5,function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],a=0;if(r)return r.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t(n))];case 6:o.sent(),o.label=7;case 7:return n++,[3,5];case 8:return[2]}})})()}var w=(0,i.computed)(function(){return d.value[e.currentTab]&&d.value[e.currentTab].selectedDown.id?[d.value[e.currentTab].selectedDown.id]:d.value[e.currentTab]&&d.value[e.currentTab].tree[1]?[d.value[e.currentTab].tree[1].id]:void 0}),k=(0,i.computed)(function(){return d.value[e.currentTab]?d.value[e.currentTab].selectedDown.id:void 0});function x(){if(o.value){var t=d.value[e.currentTab].selectedDown.id;o.value.setCheckedKeys(t?[t]:[])}}return(0,i.watch)(function(){return e.currentTab},function(){return m(function(){var t;return g(this,function(r){switch(r.label){case 0:if(!(e.currentTab<3))return[3,4];if(l.value=!1,s.value=!1,2!==e.currentTab)return[3,2];return t=f(d.value[2].selectedTop.slice(0,2),2),[4,_(d.value[e.currentTab].selectedTop,p.value[2].cascade)];case 1:t.children=r.sent(),r.label=2;case 2:return a("selected",{selected:d.value,refresh:!0,currentTab:e.currentTab,mapNodes:p.value}),[4,(0,i.nextTick)()];case 3:r.sent(),l.value=!0,s.value=!0,r.label=4;case 4:return[2]}})})()}),(0,i.onBeforeMount)(function(){e.currentTab<3&&y()}),r({setCheckedKeys:x}),{__sfc:!0,emit:a,props:e,cascadeComp:n,treeComp:o,cascadeVisible:l,treeVisible:s,options:c,defaultSelected:u,compData:d,mapNodes:p,getNodeDataByIds:f,cascadeChange:h,cascadeHandleChange:function(){return m(function(){var t,r,n,o,l,c,v,y,w;return g(this,function(k){switch(k.label){case 0:if(h=!0,n=f(r=[(t={stage_id:d.value[e.currentTab].selectedTop[0],subject_id:d.value[e.currentTab].selectedTop[1],version_id:d.value[2].selectedTop[2],textbook_id:d.value[2].selectedTop[3]}).stage_id,t.subject_id],1),d.value[1].graphId=n.knowledge_graph_id,d.value[1].graphCid=n.knowledge_node_id,o=f(r,2),!(l=f([t.stage_id,t.subject_id,t.version_id,t.textbook_id],2)))return[3,1];return c=p.value[2].cascade[l.pid.join("_")],d.value[2].graphId=c.knowledge_graph_id,d.value[2].graphCid=l.knowledge_node_id,[3,3];case 1:return[4,_(r,p.value[2].cascade)];case 2:v=k.sent(),o.children=v,w=(y=v[0]).textbook_data[0],t.version_id=y.version_id,t.textbook_id=w.id,d.value[2].graphId=y.knowledge_graph_id,d.value[2].graphCid=w.knowledge_node_id,k.label=3;case 3:return d.value[1].selectedTop=r,d.value[2].selectedTop=[t.stage_id,t.subject_id,t.version_id,t.textbook_id],request.post("/c27/external/xueke/knowledge_graph_record/",t),Object.assign(u,t),d.value[1].selectedDown={id:d.value[1].graphCid},d.value[2].selectedDown={id:d.value[2].graphCid},b(d.value[1].graphId,d.value[1].graphCid).then(function(t){return m(function(){return g(this,function(r){switch(r.label){case 0:if(d.value[1].tree=[{id:0,name:"无知识点"},{id:d.value[1].graphCid,name:"全部知识点",children:t}],1!==e.currentTab)return[3,2];return s.value=!1,[4,(0,i.nextTick)()];case 1:r.sent(),s.value=!0,r.label=2;case 2:return[2]}})})()}),b(d.value[2].graphId,d.value[2].graphCid).then(function(t){return m(function(){return g(this,function(r){switch(r.label){case 0:if(d.value[2].tree=[{id:0,name:"无章节"},{id:d.value[2].graphCid,name:"全部章节",children:t}],2!==e.currentTab)return[3,2];return s.value=!1,[4,(0,i.nextTick)()];case 1:r.sent(),s.value=!0,r.label=2;case 2:return[2]}})})()}),a("selected",{selected:d.value,refresh:!0,currentTab:e.currentTab,mapNodes:p.value,defaultSelected:u}),[2]}})})()},cascadePopperVisibleChange:function(t){return m(function(){var r,a;return g(this,function(n){switch(n.label){case 0:if(t)return[3,3];return[4,(0,i.nextTick)()];case 1:if(n.sent(),h)return[3,3];return r=e.currentTab,a=d.value[r].selectedTop.slice(),d.value[r].selectedTop=[],[4,(0,i.nextTick)()];case 2:n.sent(),d.value[r].selectedTop=a,n.label=3;case 3:return h=!1,[2]}})})()},handleNodeClick:function(t,r){d.value[e.currentTab].selectedDown=t,a("selected",{selected:d.value,refresh:!0,currentTab:e.currentTab,mapNodes:p.value})},getVersionVolume:_,getTreeData:b,recursiveTree:v,init:y,cascadeLazyLoad:function(e,t){return m(function(){var r;return g(this,function(a){switch(a.label){case 0:if(!(!(Array.isArray((r=e.data).children)&&r.children.length)&&!0!==r.leaf))return[3,2];return[4,_(r.key.split("_"),p.value[2].cascade)];case 1:return t(a.sent()),[3,3];case 2:t(r),a.label=3;case 3:return[2]}})})()},defaultExpandedKeys:w,currentNodeKey:k,setCheckedKeys:x}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.compData[r.props.currentTab]?t("div",{staticClass:"personal-library-problem-k12-tree"},[r.cascadeVisible?t("el-cascader",{ref:"cascadeComp",attrs:{options:r.options[e.currentTab],props:{expandTrigger:"hover",lazy:2===e.currentTab,lazyLoad:r.cascadeLazyLoad},separator:"\xb7","popper-class":"personal-library-problem-k12-tree-popper"},on:{change:r.cascadeHandleChange,"visible-change":r.cascadePopperVisibleChange},model:{value:r.compData[e.currentTab].selectedTop,callback:function(t){e.$set(r.compData[e.currentTab],"selectedTop",t)},expression:"compData[currentTab].selectedTop"}}
1):e._e(),e._v(" "),r.treeVisible&&r.compData[r.props.currentTab].tree.length?t("el-tree",{ref:"treeComp",staticClass:"personal-library-problem-k12-el-tree",attrs:{data:r.compData[r.props.currentTab].tree,props:{children:"children",label:"name"},"node-key":"id","default-expanded-keys":r.defaultExpandedKeys,"default-expand-all":!1,"expand-on-click-node":!1,"highlight-current":!0,"current-node-key":r.currentNodeKey,"icon-class":"none",indent:16},on:{"node-click":r.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(r){var a=r.node,i=r.data;return t("span",{class:["custom-tree-node",{"custom-leaf-node":!(i.children&&i.children.length)}],attrs:{title:i.name}},[i.children&&i.children.length?t("i",{class:["iconfont","icon-xialajiantou-xiangyou text-base text-gray-003",{rotate:a.expanded}],on:{click:function(e){a.expanded=!a.expanded}}}):e._e(),e._v(" "),t("span",{staticClass:"content flex items-center text-gray-002"},[t("span",{staticClass:"text-lg"},[e._v(e._s(i.name))])])])}}],null,!1,0xac97d2c4)}):e._e()],1):e._e()},[],!1,null,"0c3ae397",null).exports,v=r(20815);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function w(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}function k(e){return function(){var t=this,r=arguments;return new Promise(function(a,i){var n=e.apply(t,r);function o(e){w(n,a,i,o,l,"next",e)}function l(e){w(n,a,i,o,l,"throw",e)}o(void 0)})}}function x(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var D=(0,s.Z)({__name:"workspaceGraphTree",props:{currentTab:{type:Number,default:4},library_id:{type:Number,default:0},initSelected:{type:Object,default:function(){return{relate_kg:0,node_ids:0,graph_id:0}}}},emits:["selected"],setup:function(e,t){var r=t.expose,a=t.emit;(0,i.watch)([function(){return e.currentTab},function(){return e.initSelected}],function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,a,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(n.push(r.value),n.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw a}}return n}}(e,2)||function(e,t){if(e){if("string"==typeof e)return y(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],i=t[1];4===r&&null!=i.relate_kg&&null!=i.node_ids&&null!=i.graph_id&&a("selected",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}({},i))},{immediate:!0});var n=(0,i.ref)([]),o=(0,i.ref)(0),l=(0,i.ref)(null),s=(0,i.computed)(function(){return n.value.length?[n.value[1].id]:void 0}),c=(0,i.computed)(function(){return e.initSelected.node_ids?e.initSelected.node_ids:n.value.length?n.value[1].id:void 0});function u(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return k(function(){var r,a,n,o;return x(this,function(s){switch(s.label){case 0:return[4,(0,i.nextTick)()];case 1:if(s.sent(),n=null==(a=l.value)?void 0:a.getNode(e),!(!a||!n))return[3,3];if(!t)return[2,!1];return[4,h(!1)];case 2:return s.sent(),[2,u(e,!1)];case 3:for(o=n.parent;null==o?void 0:o.level;)o.expanded=!0,o=o.parent;return a.setCurrentKey(e),[4,(0,i.nextTick)()];case 4:return s.sent(),null==(r=a.$el.querySelector(".el-tree-node.is-current"))||r.scrollIntoView({block:"nearest"}),[2,!0]}})})()}function d(){return k(function(){var e;return x(this,function(t){switch(t.label){case 0:if(n.value[1])return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,h(!1)];case 2:return t.sent(),[3,4];case 3:return t.sent(),[2,null];case 4:return[2,(e=n.value[1])?{rootNode:e,graphId:o.value}:null]}})})()}var p=(0,i.ref)(!1);function f(){return k(function(){var t,r;return x(this,function(a){switch(a.label){case 0:return t=API.pc.exercise.get_library_knowledge_tree,r={library_id:e.library_id},[4,request.get(t,r)];case 1:return[2,a.sent().data]}})})()}function h(){var t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return k(function(){var r,s;return x(this,function(u){switch(u.label){case 0:p.value=!0,u.label=1;case 1:return u.trys.push([1,,4,5]),[4,f()];case 2:return n.value=[{id:0,name:"无知识点"},{id:(s=u.sent()).id,name:s.name,children:s.children}],o.value=s.graph_id,t&&a("selected",{relate_kg:e.initSelected.relate_kg||1,node_ids:e.initSelected.node_ids||s.id,graph_id:e.initSelected.graph_id||s.graph_id}),[4,(0,i.nextTick)()];case 3:return u.sent(),null==(r=l.value)||r.setCurrentKey(c.value),[3,5];case 4:return p.value=!1,[7];case 5:return[2]}})})()}return(0,i.onBeforeMount)(function(){4===e.currentTab&&h()}),r({getTree:d,init:h,locateNode:u}),{__sfc:!0,emit:a,props:e,treeData:n,graph_id:o,treeCompRef:l,defaultExpandedKeys:s,currentNodeKey:c,handleNodeClick:function(e){a("selected",{relate_kg:+!!e.id,node_ids:e.id,graph_id:o.value})},locateNode:u,getTree:d,is_loading:p,getTreeData:f,init:h,loading:v.Z}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"personal-library-problem-workspace-tree-popper"},[r.is_loading?t(r.loading):r.treeData.length?t("div",{staticClass:"personal-library-problem-workspace-tree"},[t("el-tree",{ref:"treeCompRef",staticClass:"personal-library-problem-workspace-el-tree",attrs:{data:r.treeData,props:{children:"children",label:"name"},"node-key":"id","default-expanded-keys":r.defaultExpandedKeys,"current-node-key":r.currentNodeKey,"default-expand-all":!1,"expand-on-click-node":!1,"highlight-current":!0,"icon-class":"none",indent:16},on:{"node-click":r.handleNodeClick}
1,scopedSlots:e._u([{key:"default",fn:function(r){var a=r.node,i=r.data;return t("span",{class:["custom-tree-node",{"custom-leaf-node":!(i.children&&i.children.length)}]},[i.children&&i.children.length?t("i",{class:["iconfont","icon-xialajiantou-xiangyou text-base text-gray-003",{rotate:a.expanded}],on:{click:function(e){a.expanded=!a.expanded}}}):e._e(),e._v(" "),t("span",{staticClass:"content flex items-center text-gray-002"},[t("span",{staticClass:"text-lg"},[e._v(e._s(i.name))])])])}}])})],1):t("div",{staticClass:"personal-library-problem-workspace-tree-empty"},[t("div",{staticClass:"text-gray-002 text-lg"},[e._v("无知识点")])])],1)},[],!1,null,"4d714bc9",null).exports,C=(0,s.Z)({__name:"knowledgeDialog",emits:["confirm"],setup:function(e,t){var r=t.expose,a=t.emit,n=(0,i.ref)(!1),o=(0,i.ref)(!1),l=(0,i.ref)([]),s=(0,i.ref)(0),c=(0,i.ref)(null),u=(0,i.computed)(function(){return l.value.length?[l.value[0].id]:[]});function d(e){var t=e.rootNode,r=e.graphId;c.value=null,l.value=t?[t]:[],s.value=r||0,n.value=!0}function p(e){o.value=e}function f(){n.value=!1,o.value=!1,c.value=null,l.value=[]}return r({close:f,open:d,setSubmitting:p}),{__sfc:!0,emit:a,visible:n,submitting:o,treeData:l,graphId:s,selectedNodeId:c,treeProps:{children:"children",label:"name"},defaultExpandedKeys:u,open:d,handleNodeClick:function(e,t){1!==t.level&&(c.value=e.id)},handleConfirm:function(){c.value&&!o.value&&a("confirm",{nodeId:c.value,graphId:s.value})},setSubmitting:p,close:f}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"tiku-select-dialog tiku-select-knowledge-dialog",attrs:{title:e.$t("pc.library.selectKnowledgePoint")||"选择知识点",visible:r.visible,width:"616px","append-to-body":"","close-on-click-modal":!1},on:{"update:visible":function(e){r.visible=e}},scopedSlots:e._u([{key:"footer",fn:function(){return[t("div",{staticClass:"dialog-footer"},[t("p",{staticClass:"tips",class:{"tips-en":"en"===e.$i18n.locale}},[e._v("\n        "+e._s(e.$t("pc.library.attachKnowledgeTip")||"已有知识点的题目,选择后会新增知识点")+"\n      ")]),e._v(" "),t("div",{staticClass:"footer-actions"},[t("el-button",{on:{click:r.close}},[e._v(e._s(e.$t("pc.common.cancel")||"取消"))]),e._v(" "),t("el-button",{attrs:{type:"primary",loading:r.submitting,disabled:!r.selectedNodeId},on:{click:r.handleConfirm}},[e._v("\n          "+e._s(e.$t("pc.common.confirm")||"确定")+"\n        ")])],1)])]},proxy:!0}])},[r.treeData.length?t("el-tree",{attrs:{data:r.treeData,props:r.treeProps,"node-key":"id","default-expanded-keys":r.defaultExpandedKeys,"default-expand-all":!1,"highlight-current":"","expand-on-click-node":!1},on:{"node-click":r.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(a){var i=a.node,n=a.data;return t("div",{class:["custom-tree-node",{"custom-leaf-node":!(n.children&&n.children.length),"is-disabled":1===i.level,"is-current":n.id===r.selectedNodeId}]},[t("span",{staticClass:"content"},[t("i",{staticClass:"iconfont icon-zhishidian1"}),e._v(" "),t("span",{staticClass:"tree-text"},[e._v(e._s(n.name))])]),e._v(" "),t("span",{directives:[{name:"show",rawName:"v-show",value:n.id===r.selectedNodeId,expression:"data.id === selectedNodeId"}],staticClass:"right-icon"},[t("i",{staticClass:"iconfont icon-cu-xuanzhong"})])])}}],null,!1,0xa6f72e0b)}):e._e()],1)},[],!1,null,"765d849f",null).exports,S=[{name:"1级",value:1},{name:"2级",value:2},{name:"3级",value:3},{name:"4级",value:4},{name:"5级",value:5}],F=[{name:i18n.t("pc.common.singlechoice")||"单选题",type:"SingleChoice",value:1},{name:i18n.t("pc.common.multiplechoice")||"多选题",type:"MultipleChoice",value:2},{name:i18n.t("pc.common.judgement")||"判断题",type:"Judgement",value:6},{name:i18n.t("pc.common.polling")||"投票题",type:"Polling",value:3},{name:i18n.t("pc.common.fillblank")||"填空题",type:"FillBlank",value:4},{name:i18n.t("pc.common.shortanswer")||"主观题",type:"ShortAnswer",value:5},{name:i18n.t("feProblemLibrary.Material")||"材料题",type:"Material",value:10}],A=[{name:"作业、考试均引用",value:"1"},{name:"仅作业引用",value:"2"},{name:"仅考试引用",value:"3"},{name:"自测题引用",value:"4"}
1,{name:"未引用",value:"0"}];function P(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}r(57518);var I=(0,s.Z)({__name:"filterSearchK12KnowledgeGraph",props:{filterData:{type:null},collapseTags:{type:Boolean,default:!0},defaultSelected:{type:null}},emits:["selected"],setup:function(e,t){var r=t.emit,a=(0,i.computed)(function(){return e.filterData&&e.filterData.currentTab}),n=(0,i.ref)(null),o={1:{selectedNodes:[],selectedNames:[],selectedIds:[]},2:{selectedNodes:[],selectedNames:[],selectedIds:[]}},l=(0,i.reactive)({selectedData:T({},o),treeData:{1:[],2:[]},defaultProps:{children:"children",label:"name"}}),s={1:{},2:{}};function c(e,t){e.forEach(function(e){s[t][e.id]=e;var r=e.children;r&&r.length>0&&c(r,t)})}return(0,i.watch)(function(){return e.filterData&&e.filterData.selected&&e.filterData.selected[1].tree.length&&e.filterData.selected[2].tree.length&&e.filterData.selected[1].tree[1].children.length&&e.filterData.selected[2].tree[1].children.length},function(){var t;return(t=function(){var t,r,a;return function(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(i){if(e.filterData&&e.filterData.selected&&e.filterData.selected[1].tree.length&&e.filterData.selected[2].tree.length)for(r=1,t=e.filterData.selected;r<3;r++)a=t[r].tree[1],l.treeData[r]=a.children,c(a.children,r);return[2]})},function(){var e=this,r=arguments;return new Promise(function(a,i){var n=t.apply(e,r);function o(e){P(n,a,i,o,l,"next",e)}function l(e){P(n,a,i,o,l,"throw",e)}o(void 0)})})()},{immediate:!0}),(0,i.watch)(function(){return e.defaultSelected},function(){e.defaultSelected?l.selectedData=e.defaultSelected:l.selectedData=T({},o)},{immediate:!0}),{__sfc:!0,emit:r,props:e,currentTab:a,treeComps:n,selectedData:o,compData:l,mapNodes:s,recursiveTree:c,treeCheck:function(e,t){l.selectedData[t].selectedNodes=e,l.selectedData[t].selectedIds=e.map(function(e){return e.id}),l.selectedData[t].selectedNames=e.map(function(e){return e.name}),r("selected",l.selectedData)},treeRemoveTag:function(e,t){var a=l.selectedData[t].selectedNodes.findIndex(function(t){return t.name===e});l.selectedData[t].selectedIds.splice(a,1),l.selectedData[t].selectedNodes.splice(a,1),n.value[t]&&n.value[t].setCheckedKeys(l.selectedData[t].selectedIds),r("selected",l.selectedData)}}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"question-bank-filter-search-k12-item"},[e._l([{title:"知识点",key:1},{title:"章节目录",key:2}],function(a){return[r.currentTab&&a.key!==r.currentTab?t("div",{key:"k12-".concat(a.key),staticClass:"problem-filter__item"},[t("span",{staticClass:"item-label"},[e._v(e._s("".concat(a.title,":")))]),e._v(" "),t("el-select",{staticClass:"question-bank-filter-search-k12-item-select",attrs:{placeholder:"请选择","popper-class":"question-bank-filter-search-k12-item-select-popper",multiple:"","collapse-tags":e.collapseTags},on:{"remove-tag":function(e){return r.treeRemoveTag(e,a.key)}},scopedSlots:e._u([{key:"empty",fn:function(){return[0===r.compData.treeData[a.key].length?t("div",{staticClass:"center"},[e._v("\n            加载中...\n          ")]):t("el-tree",{ref:function(e){r.treeComps||(r.tree
1Comps={}),r.treeComps[a.key]=e},refInFor:!0,staticClass:"question-bank-filter-search-k12-item-tree",attrs:{data:r.compData.treeData[a.key],"default-checked-keys":r.compData.selectedData[a.key].selectedIds,props:r.compData.defaultProps,"node-key":"id","highlight-current":!0,"show-checkbox":"","check-strictly":!0},on:{check:function(e,t){return r.treeCheck(t.checkedNodes,a.key)}}})]},proxy:!0}],null,!0),model:{value:r.compData.selectedData[a.key].selectedNames,callback:function(t){e.$set(r.compData.selectedData[a.key],"selectedNames",t)},expression:"compData.selectedData[item.key].selectedNames"}})],1):e._e()]})],2)},[],!1,null,"0d4e1828",null).exports;function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}function O(e){return function(e){if(Array.isArray(e))return $(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 $(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $(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 N=(0,s.Z)({__name:"filterSearch",props:{hasCited:{type:Boolean},k12KnowledgeGraphFilterData:{type:null},is_graph_library:{type:Boolean,default:!1},noMaterial:{type:Boolean,default:!1}},emits:["search"],setup:function(e,t){var r=t.expose,a=t.emit,n=(0,i.ref)(null),o=(0,i.ref)(null),l=(0,i.ref)({problem_type:[],difficulty:[],cited_type_list:[],k12KnowledgeGraphSelectedNodes:[]}),s=(0,i.ref)([]),c=(0,i.ref)(!1),u=(0,i.ref)(null),d=(0,i.computed)(function(){return F.filter(function(t){return!e.noMaterial||"Material"!==t.type})});(0,i.onMounted)(function(){u.value=JSON.parse(JSON.stringify(l.value)),o.value=JSON.parse(JSON.stringify(n.value))});var p=function(){l.value={problem_type:[],difficulty:[],cited_type_list:[],k12KnowledgeGraphSelectedNodes:[]}},f=function(e){e&&(s.value=[],p(),u.value=K({},l.value),n.value=null,o.value=null),c.value=!1};function h(){if(n.value){var t=e.k12KnowledgeGraphFilterData&&e.k12KnowledgeGraphFilterData.currentTab;if(t){var r=1===t?2:1;if(n.value[r])return n.value[r].selectedNodes}}return[]}return r({handleClear:p,handleClose:f,showFilter:c}),{__sfc:!0,emit:a,props:e,k12KnowledgeGraphSelected:n,k12KnowledgeGraphDefaultSelected:o,filterForm:l,selectList:s,showFilter:c,defaultFilterForm:u,availableProblemTypes:d,handleClear:p,handleConfirm:function(){s.value=O(l.value.problem_type).concat(O(l.value.difficulty),O(l.value.cited_type_list),O(l.value.k12KnowledgeGraphSelectedNodes));var e={problem_type:[],difficulty:[],cited_type_list:[],k12KnowledgeGraphSelectedNodes:[]};l.value.problem_type.length&&l.value.problem_type.forEach(function(t){d.value.forEach(function(r){t==r.name&&e.problem_type.push(r.value)})}),l.value.difficulty.length&&l.value.difficulty.forEach(function(t){S.forEach(function(r){t==r.name&&e.difficulty.push(r.value)})}),l.value.cited_type_list.length&&l.value.cited_type_list.forEach(function(t){A.forEach(function(r){t==r.name&&e.cited_type_list.push(r.value)})}),u.value=JSON.parse(JSON.stringify(l.value)),h().forEach(function(t){e.k12KnowledgeGraphSelectedNodes.push(t.id)}),o.value=JSON.parse(JSON.stringify(n.value)),a("search",e,s.value.length>0),c.value=!1},toogleOpen:function(){c.value=!c.value,l.value=K({},u.value)},handleClose:f,k12KnowledgeGraphFilterSelectedCurrentTab:h,k12KnowledgeGraphFilterSelected:function(e){n.value=e,l.value.k12KnowledgeGraphSelectedNodes=h().map(function(e){return e.name})},difficulties:S,citedGroup:A,filterSearchK12KnowledgeGraph:I}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"problem-filter"},[t("span",{staticClass:"problem-filter__text"},[t("i",{staticClass:"iconfont icon-shaixuan"}),e._v(" "),e._v(e._s(e.$t("pc.library.filter")))]),e._v(" "),t("div",{staticClass:"problem-filter__content",on:{click:r.toogleOpen}},[r.selectList.length?t("ul",{staticClass:"selected-list"},e._l(r.selectList,function(r,a){return t("li",{key:a},[e._v("\n        "+e._s(r)+"\n      ")])}),0):t("span",[e._v(e._s(e.$t("pc.library.all")))]),e._v(" "),e.is_graph_library?t("i",{staticClass:"iconfont",class:r.showFilter?"icon-jiantoudan-xiangshang":"icon-jiantoudan-xiangxia "}):t("i",{staticClass:"iconfont",class:r.showFilter?"icon--danjiantouxiangshang":"icon--danjiantouxiangxia"})]),e._v(" "),r.showFilter?t("div",{staticClass:"problem-filter__list"},[t("div",{staticClass:"problem-filter__item"},[t("span",{staticClass:"item-label"},[e._v(e._s(e.$t("pc.library.type"))+":")]),e._v(" "),t("el-checkbox-group",{model:{value:r.filterForm.problem_type,callback:function(t){e.$set(r.filterForm,"problem_type",t)},expression:"filterForm.problem_type"}},e._l(r.availableProblemTypes,function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.name}},[e._v(e._s(r.name)+"\n        ")])}),1)],1),e._v(" "),t("div",{staticClass:"problem-filter__item"},[t("span",{staticClass:"item-label"},[e._v("难度:")]),e._v(" "),t("el-checkbox-group",{model:{value:r.filterForm.difficulty,callback:function(t){e.$set(r.filterForm,"difficulty",t)},expression:"filterForm.difficulty"}},e._l(r.difficulties,function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.name}},[e._v(e._s(r.name))])}),1)],1),e._v(" "),e.is_graph_library?t("div",{staticClass:"problem-filter__item"},[t("span",{staticClass:"item-label"},[e._v("引用:")]),e._v(" "),t("el-checkbox-group",{model:{value:r.filterForm.cited_type_list,callback:function(t){e.$set(r.filterForm,"cited_type_list",t)},expression:"filterForm.cited_type_list"}},e._l(r.citedGroup,function(r,a){return t("el-checkbox",{key:a,attrs:{label:r.name}},[e._v(e._s(r.name)+"\n        ")])}
1),1)],1):e._e(),e._v(" "),e.k12KnowledgeGraphFilterData?t(r.filterSearchK12KnowledgeGraph,{attrs:{"filter-data":e.k12KnowledgeGraphFilterData,"default-selected":r.k12KnowledgeGraphDefaultSelected},on:{selected:r.k12KnowledgeGraphFilterSelected}}):e._e(),e._v(" "),t("div",{staticClass:"problem-filter__footer"},[t("el-button",{on:{click:function(e){return r.handleClear()}}},[e._v(e._s(e.$t("pc.library.reset")))]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:r.handleConfirm}},[e._v(e._s(e.$t("common.confirm"))+"\n      ")])],1)],1):e._e()])},[],!1,null,"623ff8fc",null).exports,j=(0,s.Z)({__name:"deleteQuoteDialog",props:["dialog_deleteQuote"],emits:["close"],setup:function(e,t){return{__sfc:!0,props:e,emit:t.emit}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{attrs:{width:"416","custom-class":"del-library__dialog",title:e.$t("pc.library.prompt"),visible:e.dialog_deleteQuote.visible,"append-to-body":""},on:{"update:visible":function(t){return e.$set(e.dialog_deleteQuote,"visible",t)}}},[t("div",{staticClass:"del-body"},[t("p",[e._v(e._s(e.$t("pc.library.delExerciseTips")))]),e._v(" "),t("div",{staticClass:"del-body__content"},[t("div",{staticClass:"del-body__header"},[t("span",[e._v(e._s(e.$t("pc.library.delExerciseTitle")))])]),e._v(" "),e.dialog_deleteQuote.list.length?t("ul",{staticClass:"del-body__list"},e._l(e.dialog_deleteQuote.list,function(r,a){return t("li",{key:a},[t("i",{staticClass:"icon--kaoshi1 iconfont"}),e._v(e._s(r.paper_title))])}),0):e._e()])]),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:function(e){return r.emit("close")}}},[e._v(e._s(e.$t("pc.library.close")))])],1)])},[],!1,null,null,null).exports,L=(0,s.Z)({__name:"deleteExerciseDialog",props:["massDeleteDialog"],emits:["close"],setup:function(e,t){return{__sfc:!0,props:e,emit:t.emit}}},function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{attrs:{"custom-class":"del-exercise__dialog",width:"416",visible:e.massDeleteDialog.visible,"show-close":!1},on:{"update:visible":function(t){return e.$set(e.massDeleteDialog,"visible",t)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[e.massDeleteDialog.data.icon?t("i",{class:["iconfont",e.massDeleteDialog.data.icon,"success"==e.massDeleteDialog.data.iconstatus?"success":"fail"]}):e._e(),e._v(" "),t("span",{staticClass:"title"},[e._v(e._s(e.massDeleteDialog.data.title))])]),e._v(" "),e.massDeleteDialog.data.body?t("div",{staticClass:"body-text",domProps:{innerHTML:e._s(e.massDeleteDialog.data.body)}}):e._e(),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:function(e){return r.emit("close")}}},[e._v("我知道了")])],1)])},[],!1,null,null,null).exports,E=r(29473);function G(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}function B(e){return function(){var t=this,r=arguments;return new Promise(function(a,i){var n=e.apply(t,r);function o(e){G(n,a,i,o,l,"next",e)}function l(e){G(n,a,i,o,l,"throw",e)}o(void 0)})}}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a})}return e}function Q(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r.push.apply(r,a)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function q(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var U=(0,r(58725).G)(),M=U.ProblemEditDialog,z=U.ProblemPreview,H={name:"ProblemList",components:{problemFolder:f,problemK12KnowledgeGraphTree:b,workspaceGraphTree:D,knowledgeDialog:C,importExcel:h.Z,filterSearch:N,deleteQuoteDialog:j,deleteExerciseDialog:L,loading:v.Z,importResultDialog:E.Z,ProblemEditDialog:M,ProblemPreview:z},filters:{formatTime:function(e){return new Date(e).format("yyyy.MM.dd hh:mm")}},props:{classroom_corresponding_library:{default:null},fromCourseResource:{default:!1},problemsTmpID:{default:function(){return[]}},sourceId:{default:null},is_personal_library:{default:!0},k12KnowledgeGraphTreeVisible:{default:!1},is_graph_library:{default:!1},notFromLibrary:{type:Boolean,default:!1}},data:function(){return{searchForm:{},problemList:[],offset:0,page:1,lastSuccessfulPage:1,page_size:10,page_sizes:[10,20,50],total:0,problemListDisplayLimit:1e4,showPLYDDialog:!1,multipleSelection:[],exerciseEdit:!1,listEditData:{item:null},currentPreview:-1,isPreview:!1,previewData:{item:null,index:0,total:0},multipleSelectionAllKey:[],batchImport:!1,library_name:"",fromfolder:!1,folder_id:0,massDeleteDialog:{visible:!1,data:{}},editFromResource:!1,dialog_homeworkProblemConfig:{visible:!1,title:this.$t("pc.library.addProblem")||"添加习题",actionType:"put",data:{}},library_id:null,is_search:!1,isUploadDialogShow:!1,dialog_updateSelectConfig:{title:"更新选择",visible:!1,data:{}},showResult:!1,listRefreshing:!1,exportUrl:"",delDialogVisible:!1,delList:[],dialog_deleteQuote:{visible:!1,list:[]},resultDialog:{visible:!1,data:{}},filter_search:!1,tabList:[{name:"文件夹",value:3}],currentTab:3,k12KnowledgeGraphTreeInitData:{stage_id:0,subject_id:0,version_id:0,textbook_id:0,knowledge_graph_id:0,knowledge_node_id:0,catalog_graph_id:0,catalog_node_id:0},k12KnowledgeGraphFilterData:null,k12KnowledgeGraphQueryData:{knowledge_node_ids:"",catalog_node_ids:"",is_related_knowledge_node:1,is_related_catalog_node:1},k12KnowledgeGraphBatch:{knowledge_node_ids:[],catalog_node_ids:[]},workspaceKnowledgeGraphTreeInitData:{relate_kg:null,node_ids:null},workspaceKnowledgeGraphTreeQueryData:{relate_kg:null,node_ids:null,graph_id:null},sourceList:[{name:"全部",value:""},{name:"AI知识库",value:"ai_knowledge_graph"}],modifyKnowledgePointUrl:"",exportHasIdUrl:"",uploadModifyData:{folder_id:this.folder_id||0,library_id:this.library_id||this.classroom_corresponding_library.library_id||0,error_type:0}}},created:function(){return B(function(){return q(this,function(e){return 13===this.currentPlatform&&this.k12KnowledgeGraphTreeVisible&&(this.tabList=[{name:"知识点",value:1,active:!0},{name:"章节目录",value:2,active:!1},{name:"文件夹",value:3,active:!1}],this.currentTab=1),this.is_graph_library&&(this.tabList=[{name:"知识点",value:4,active:!0},{name:"文件夹",value:3,active:!1}],this.currentTab=4),[2]})}).call(this)},mounted:function(){this.classroom_corresponding_library.library_id&&(this.library_id=this.classroom_corresponding_library.library_id,this.exportUrl=API.pc.exercise.export_problems+"?library_id="+this.library_id,this.getProblemList(),this.is_graph_library&&(this.searchForm.source="",this.exportHasIdUrl=API.pc.exercise.export_problems_id+"?library_id="+this.library_id,this.modifyKnowledgePointUrl=API.pc.exercise.batch_modify_problem_knowledge)),document.addEventListener("click",this.filterClickOut)},computed:Q(R({},(0,a.Se)(["currentRole"]),(0,a.rn)(["agentInfo"])),{TypeText:function(){return{1:this.$t("pc.common.singlechoice"),2:this.$t("pc.common.multiplechoice"),3:this.$t("pc.common.polling"),4:this.$t("pc.common.fillblank"),5:this.$t("pc.common.shortanswer"),6:this.$t("pc.common.judgement"),10:this.$t("feProblemLibrary.Material")}},currentPlatform:function(){var e=location.search.match(/&platform=(\d+)/);return e&&e[1]&&parseInt(e[1])?parseInt(e[1]):Number(sessionStorage.getItem("justIframePlatform"))||Number(this.$route.query.platform)},noMaterial:function(){var e;return this.notFromLibrary||this.is_personal_library||(null==(e=this.classroom_corresponding_library)?void 0:e.no_material)}}),watch:{"classroom_corresponding_library.library_id":function(e,t){e&&e!=t&&(this.offset=0,this.page=1,this.total=0,this.library_id=e,this.exportUrl=API.pc.exercise.export_problems+"?library_id="+e,this.getProblemList())},$route:function(e){if(e.query){var t=e.query;this.searchForm.template_id=t.template_id,t.isPreview&&(this.isPreview=t.isPreview)}this.fromfolder=!1,this.getProblemList(4)},problemList:function(e){var t=this;this.$nextTick(function(){t.multipleSelectionAllKey&&t.multipleSelectionAllKey.length&&(e&&e.length?e.forEach(function(e){t.$refs.multipleTable.toggleRowSelection(e,t.multipleSelectionAllKey.indexOf(e.problem_id)>-1)}):t.$refs.multipleTable&&t.$refs.multipleTable.clearSelection())})}},methods:{handleProblemListRequestError:function(e){this.page=this.lastSuccessfulPage,this.offset=(this.lastSuccessfulPage-1)*this.page_size,this.$message({message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||((null==e?void 0:e.error_code)===20012?"操作太过频繁,请稍后再试。":"操作失败,请稍后再试。"),customClass:"toastMessage",iconClass:"icon-gantanhao iconfont"})},openKnowledgeDialog:function(){return B(function(){var e,t;return q(this,function(r){switch(r.label){case 0:return[4,null==(e=this.$refs.workspaceGraphTree)?void 0:e.getTree()];case 1:if(!(t=r.sent()))return this.$message({message:this.$t("pc.library.loadKnowledgeFailed")||"知识点加载失败",type:"error"}),[2];return this.$refs.knowledgeDialog.open(t),[2]}})}).call(this)},attachKnowledge:function(e){return B(function(e){var t,r,a,i,n,o,l;return q(this,function(s){switch(s.label){case 0:t=e.nodeId,r=e.graphId,(a=this.$refs.knowledgeDialog).setSubmitting(!0),s.label=1;case 1:return s.trys.push([1,6,7,8]),[4,request.post(API.pc.exercise.batch_update_templates_node,{library_id:this.library_id,template_ids:this.multipleSelectionAllKey,node_ids:[t]})];case 2:if(!(n=s.sent()).success)throw n;return o=n.data.node_ids[0]||t,this.$message({message:n.data.missing_template_ids.length?this.$t("pc.library.attachKnowledgeParti
1al",{success:n.data.success_template_ids.length,missing:n.data.missing_template_ids.length}):this.$t("pc.library.attachKnowledgeSuccess")||"知识点标注成功",type:"success"}),a.close(),this.currentTab=4,this.handleKnowledgeSelect({relate_kg:1,node_ids:o,graph_id:r},!1,!1),this.listRefreshing=!0,[4,null==(i=this.$refs.workspaceGraphTree)?void 0:i.locateNode(o)];case 3:return s.sent(),[4,new Promise(function(e){return setTimeout(e,1e3)})];case 4:return s.sent(),[4,this.getProblemList(2,null,!1)];case 5:return s.sent(),[3,8];case 6:return l=s.sent(),this.$message({message:(null==l?void 0:l.msg)||this.$t("pc.library.attachKnowledgeFailed")||"知识点标注失败",type:"error"}),[3,8];case 7:return this.listRefreshing=!1,a.setSubmitting(!1),[7];case 8:return[2]}})}).apply(this,arguments)},filterClickOut:function(e){var t=this.$refs.filterSearch;t&&!t.$el.contains(e.target)&&t.showFilter&&this.$refs.filterSearch&&this.$refs.filterSearch.handleClose()},getSearchForm:function(e,t){this.searchForm=R({},this.searchForm,e),this.filter_search=t,this.search(2,!1)},initFactor:function(){this.searchForm={},this.page=1,this.$refs.filterSearch&&this.$refs.filterSearch.handleClose(!0),this.is_search=!1,this.filter_search=!1,this.is_graph_library&&(this.searchForm.source="")},selectable:function(e){if(!this.fromCourseResource)return!0;var t,r,a=Number(null!=(r=null==e||null==(t=e.content)?void 0:t.ProblemType)?r:null==e?void 0:e.problem_type);return(!this.noMaterial||10!==a)&&!(this.problemsTmpID.indexOf(e.problem_id)>-1)},moveToFolder:function(e,t){1==e?this.showPLYDDialog=1:2==e&&(this.multipleSelection=[t],this.showPLYDDialog=2)},tableRowClassName:function(e){return this.currentPreview==e.rowIndex?"current-row":e.rowIndex%2==1?"odd-row":"even-row"},getProblemList:function(e,t){var r=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.fromfolder&&2!=e&&3===this.currentTab)this.folder_id?this.$refs.problemFolder&&this.$refs.problemFolder.handleNodeClick({folder_id:this.folder_id},null,e,t):this.$refs.problemFolder&&this.$refs.problemFolder.getUnclassifiedProblem(e,t);else{var i={library_id:this.library_id,page:this.page,size:this.page_size},n=this.searchForm,o=n.problem_type,l=void 0===o?[]:o,s=n.difficulty,c=void 0===s?[]:s,u=n.content,d=void 0===u?"":u,f=n.cited_type_list,h=void 0===f?[]:f,_=n.k12KnowledgeGraphSelectedNodes,m=void 0===_?[]:_,g=n.template_id,b=void 0===g?"":g,v=n.source,y=void 0===v?"":v;l.length&&(i.problem_type=l),c.length&&(i.difficulty=c),d&&(i.content=d),h.length&&(i.cited_type_list=h),y&&(i.source=y),this.fromfolder&&!b&&3===this.currentTab&&(i.folder_id=this.folder_id),b&&(i.template_id=b),1===this.currentTab?(i.knowledge_node_ids=this.k12KnowledgeGraphQueryData.knowledge_node_ids,i.is_related_knowledge_node=this.k12KnowledgeGraphQueryData.is_related_knowledge_node,m.length&&(i.catalog_node_ids=m.join(","))):2===this.currentTab?(i.catalog_node_ids=this.k12KnowledgeGraphQueryData.catalog_node_ids,i.is_related_catalog_node=this.k12KnowledgeGraphQueryData.is_related_catalog_node,m.length&&(i.knowledge_node_ids=m.join(","))):4===this.currentTab&&null!=this.workspaceKnowledgeGraphTreeQueryData.relate_kg&&(i.relate_kg=this.workspaceKnowledgeGraphTreeQueryData.relate_kg,1==i.relate_kg?i.node_ids=this.workspaceKnowledgeGraphTreeQueryData.node_ids:i.graph_id=this.workspaceKnowledgeGraphTreeQueryData.graph_id),this.searchForm.template_id&&(i={library_id:this.library_id,page:this.page,size:this.page_size,template_id:this.searchForm.template_id});var w=API.pc.exercise.all_problems_list;return request.get(w,i).then(function(n){if(n.success){var o="string"==typeof n.data?(0,p.o)(n.data):n.data;if(!o){r.problemList=[],r.total=0,r.showResult=!1;return}r.lastSuccessfulPage=i.page;var l=o.problems_list,s=o.total_count,c=l.length;c>=0&&(r.offset+=c,r.total=s),r.problemList=l,0==r.problemList.length&&(r.isPreview=!1),r.showResult=!0,!r.fromfolder&&3==e&&r.$refs.problemFolder&&r.$refs.problemFolder.changeumFromParent(0,0,t),(1==e||2==e)&&(2!=e||a)||(r.multipleSelectionAllKey=[],r.multipleSelection=[]),r.is_search=!!r.filter_search||!!r.searchForm.content,r.$nextTick(function(){"MathJax"in window&&window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub])})}else r.showResult=!1}).catch(this.handleProblemListRequestError)}},getExportUrl:function(){var e,t,r="".concat(API.pc.exercise.export_problems,"?library_id=").concat(this.library_id);if(this.multipleSelectionAllKey.length){var a=this.multipleSelectionAllKey.join(",");r+="&template_id=".concat(a)}var i=this.searchForm,n=i.problem_type,o=void 0===n?[]:n,l=i.difficulty,s=void 0===l?[]:l,c=i.content,u=void 0===c?"":c,d=i.cited_type_list,p=void 0===d?[]:d,f=i.k12KnowledgeGraphSelectedNodes,h=i.source,_=void 0===h?"":h;o.length&&(r+="&problem_type=".concat(o)),s.length&&(r+="&difficulty=".concat(s)),u&&(r+="&content=".concat(u)),p.length&&(r+="&cited_type_list=".concat(p)),this.fromfolder&&3===this.currentTab&&(r+="&folder_id=".concat(this.folder_id)),_&&(r+="&source=".concat(_)),(null==(e=this.agentInfo)?void 0:e.university_id)&&(r+="&uv_id=".concat(null==(t=this.agentInfo)?void 0:t.university_id)),1===this.currentTab?(r+="&knowledge_node_ids=".concat(this.k12KnowledgeGraphQueryData.knowledge_node_ids),r+="&is_related_knowledge_node=".concat(this.k12KnowledgeGraphQueryData.is_related_knowledge_node),f.length&&(r+="&catalog_node_ids=".concat(f.join(",")))):2===this.currentTab?(r+="&catalog_node_ids=".concat(this.k12KnowledgeGraphQueryData.catalog_node_ids),r+="&is_related_catalog_node=".concat(this.k12KnowledgeGraphQueryData.is_related_catalog_node),f.length&&(r+="&knowledge_node_ids=".concat(f.join(",")))):4===this.currentTab&&(0==this.workspaceKnowledgeGraphTreeQueryData.relate_kg?(r+="&relate_kg=".concat(this.workspaceKnowledgeGraphTreeQueryData.relate_kg),r+="&graph_id=".concat(this.workspaceKnowledgeGraphTreeQueryData.graph_id)):(r+="&relate_kg=".concat(this.workspaceKnowledgeGraphTreeQueryData.relate_kg),r+="&node_ids=".concat(this.workspaceKnowledgeGraphTreeQueryData.node_ids))),this.exportUrl=r},getExporHasIdtUrl:function(){var e,t,r="".concat(API.pc.exercise.export_problems_id,"?library_id=").concat(this.library_id);if(this.multipleSelectionAllKey.length){var a=this.multipleSelectionAllKey.join(",");r+="&template_id=".concat(a)}var i=this.searchForm,n=i.problem_type,o=void 0===n?[]:n,l=i.difficulty,s=void 0===l?[]:l,c=i.content,u=void 0===c?"":c,d=i.cited_type_list,p=void 0===d?[]:d,f=i.k12KnowledgeGraphSelectedNodes,h=i.source,_=void 0===h?"":h;o.length&&(r+="&problem_type=".concat(o)),s.length&&(r+="&difficulty=".concat(s)),u&&(r+="&content=".concat(u)),p.length&&(r+="&cited_type_list=".concat(p)),this.fromfolder&&3===this.currentTab&&(r+="&folder_id=".concat(this.folder_id)),_&&(r+="&source=".concat(_)),(null==(e=this.agentInfo)?void 0:e.university_id)&&(r+="&uv_id=".concat(null==(t=this.agentInfo)?void 0:t.university_id)),1===this.currentTab?(r+="&knowledge_node_ids=".concat(this.k12KnowledgeGraphQueryData.knowledge_node_ids),r+="&is_related_knowledge_node=".concat(this.k12KnowledgeGraphQueryData.is_related_knowledge_node),f.length&&(r+="&catalog_node_ids=".concat(f.join(",")))):2===this.currentTab?(r+="&catalog_node_ids=".concat(this.k12KnowledgeGraphQueryData.catalog_node_ids),r+="&is_related_catalog_node=".concat(this.k12KnowledgeGraphQueryData.is_related_catalog_node),f.length&&(r+="&knowledge_node_ids=".concat(f.join(",")))):4===this.currentTab&&(0==this.workspaceKnowledgeGraphTreeQueryData.relate_kg?(r+="&relate_kg=".concat(this.workspaceKnowledgeGraphTreeQueryData.relate_kg),r+="&graph_id=".concat(this.workspaceKnowledgeGraphTreeQueryData.graph_id)):(r+="&relate_kg=".concat(this.workspaceKnowledgeGraphTreeQueryData.relate_kg),r+="&node_ids=".concat(this.workspaceKnowledgeGraphTreeQueryData.node_ids))),this.exportHasIdUrl=r},close:function(e){this.$refs[e].resetFields(),"questionBankForm"===e&&(this.questionBankForm={},this.Is_createQuestionBank=!1)},closePreview:function(){this.searchForm.template_id&&(this.searchForm.template_id="",this.getProblemList()),this.isPreview=!1,this.currentPreview=-1},search:function(e,t){"boolean"==typeof t?this.page=1:this.page=t||1,this.offset=0,2!=e&&(this.fromfolder=!1,this.$refs.problemFolder&&this.$refs.problemFolder.initTreeSelect(null)),this.searchForm.template_id&&(this.searchForm.template_id=""),this.getProblemList(e,null,!!t)},handleClear:function(){this.searchForm=Q(R({},this.searchForm),{content:""}),this.search(2)},handleSizeChange:function(){var e=this;this.page=1,this.offset=0,this.problemList=[],this.$nextTick(function(){e.is_search&&e.fromfolder?e.search(2,!0):e.getProblemList(1)})},handleCurrentChange:function(e){this.page=e,this.offset=(e-1)*this.page_size,this.is_search&&this.fromfolder?this.search(2,e):this.getProblemList(1),this.isPreview&&(this.currentPreview=0,this.previewItem(this.problemList[0],0))},setData:function(e,t){this[e]=t},exerciseEditFn:function(e){this.searchForm.template_id&&(this.searchForm.template_id=""),Object.assign(this.dialog_homeworkProblemConfig,{allData:JSON.parse(JSON.stringify(e)),data:JSON.parse(JSON.stringify(e.content)),title:this.$t("pc.library.editProblem")||"编辑习题",visible:!0,actionType:"edit"})},massDelete:function(){var e=this;this.searchForm.template_id&&(this.searchForm.template_id="");var t=[];this.multipleSelection.forEach(function(e){t.push(e.problem_id)});var r={library_id:this.library_id,template_ids:t},a=this.$t("pc.library.delExerciseTips1")||"删除习题后不可恢复,确定要删除吗ï¼
1Ÿ";this.$confirm(a,this.$t("pc.library.delExerciseTips2",{num:t.length})||"删除 ".concat(t.length," 道习题"),{confirmButtonText:this.$t("pc.library.delete")||"删除",cancelButtonText:this.$t("pc.library.cancel")||"取消",showClose:!1,customClass:"library-commondel__messagebox"}).then(function(){request.post(API.pc.exercise.batch_delete_problem_template,r).then(function(r){if(r.success){var a=r.data.deleted_count,i=e.multipleSelection.length-a;if(e.is_personal_library&&1==t.length&&0==a){e.dialog_deleteQuote.visible=!0,e.dialog_deleteQuote.list=r.data.deleted_failed_list&&r.data.deleted_failed_list[0]&&r.data.deleted_failed_list[0].paper_list;return}var n={title:"",body:"",icon:""};i&&a?(n.title=e.$t("pc.library.deleteMessage1",{_deleted_count:a})||"成功删除".concat(a,"道习题"),n.body=e.$t("pc.library.deleteMessage11",{_no_delete_count:i})||"* 其中".concat(i,"道习题已被引用,不支持删除~")):0==a?(n.title=e.$t("pc.library.deleteFail")||"删除失败",n.body=e.$t("pc.library.deleteMessage2",{_no_delete_count:i})||"选中的".concat(i,"道习题均已被引用,不支持删除~"),n.icon="icon-weidu-mianzhuang",n.iconstatus="fail"):0==i&&(n.title=e.$t("pc.library.deleteMessage1",{_deleted_count:a})||"成功删除".concat(a,"道习题"),n.icon="icon-yuanquangou-mianzhuang",n.iconstatus="success",e.multipleSelection=[]),e.$set(e.massDeleteDialog,"data",n),e.massDeleteDialog.visible=!0,a==e.problemList.length&&e.isPreview&&e.closePreview(),a>0&&(e.fromfolder?e.$refs.problemFolder&&e.$refs.problemFolder.changeumFromParent(e.fromfolder,e.folder_id,-1*a):e.$refs.problemFolder&&e.$refs.problemFolder.init()),e.getProblemList(),e.isPreview&&(e.currentPreview=0,e.previewItem(e.problemList[0],0))}}).catch(function(e){console.log(e)})}).catch(function(){})},previewItem:function(e,t){this.isPreview=!0,this.previewData={item:e,index:t},this.currentPreview=t},handleSelectionSelect:function(e,t){var r=this.multipleSelectionAllKey.indexOf(t.problem_id);r>-1?(this.multipleSelectionAllKey.splice(r,1),this.multipleSelection.splice(r,1)):(this.multipleSelectionAllKey.push(t.problem_id),this.multipleSelection.push(t))},handleSelectionSelectAll:function(e){var t=this;e.length>0?e.forEach(function(e){-1===t.multipleSelectionAllKey.indexOf(e.problem_id)&&(t.multipleSelectionAllKey.push(e.problem_id),t.multipleSelection.push(e))}):this.problemList.forEach(function(e){var r=t.multipleSelectionAllKey.indexOf(e.problem_id);r>-1&&(t.multipleSelectionAllKey.splice(r,1),t.multipleSelection.splice(r,1))})},bindFloder:function(e){var t=this.problemList.findIndex(function(t){return t.problem_id==e.problem_id});this.previewItem(e,t)},clearSelection:function(){this.$refs.multipleTable.clearSelection()},initmultipleSelection:function(){this.multipleSelectionAllKey=[]},replaceTxt:function(e){return e=(e=(e=e.replace(/<img.*?class="(kfformula)".*?\/?>/g,"[公式]").replace(/<img(.*?)>/g,"[图片]")).replace(/<video.*?>(\n|.)*<\/video>/g,"[视频]")).replace(/<audio.*?>(\n|.)*<\/audio>/g,"[音频]")},changeTab:function(e){this.initFactor(),this.currentTab=e,3===e&&this.getProblemList()},handleK12KnowledgeGraphTreeSelected:function(e){return B(function(){var t,r,a;return q(this,function(i){switch(i.label){case 0:if(this.k12KnowledgeGraphFilterData=e,this.k12KnowledgeGraphFilterData.defaultSelected&&Object.assign(this.k12KnowledgeGraphTreeInitData,this.k12KnowledgeGraphFilterData.defaultSelected),r=(t=this.k12KnowledgeGraphFilterData.selected)[1].selectedDown.id,a=t[2].selectedDown.id,1===this.currentTab?r?(this.k12KnowledgeGraphQueryData.knowledge_node_ids=r+"",this.k12KnowledgeGraphQueryData.catalog_node_ids="",this.k12KnowledgeGraphQueryData.is_related_knowledge_node=1,r!==this.k12KnowledgeGraphTreeInitData.knowledge_node_id&&(this.k12KnowledgeGraphBatch.knowledge_node_ids=[r],this.k12KnowledgeGraphBatch.catalog_node_ids=[])):(this.k12KnowledgeGraphQueryData.knowledge_node_ids="",this.k12KnowledgeGraphQueryData.is_related_knowledge_node=0):a?(this.k12KnowledgeGraphQueryData.catalog_node_ids=a+"",this.k12KnowledgeGraphQueryData.knowledge_node_ids="",this.k12KnowledgeGraphQueryData.is_related_catalog_node=1,a!==this.k12KnowledgeGraphTreeInitData.catalog_node_id&&(this.k12KnowledgeGraphBatch.catalog_node_ids=[a],this.k12KnowledgeGraphBatch.knowledge_node_ids=[])):(this.k12KnowledgeGraphQueryData.catalog_node_ids="",this.k12KnowledgeGraphQueryData.is_related_catalog_node=0),!e.refresh)return[3,2];return[4,this.getProblemList()];case 1:i.sent(),i.label=2;case 2:return[2]}})}).call(this)},handleOpenToResource:function(){var e=this;request.get(API.knowledge_graph.redirect_ai_learn_space).then(function(t){if(t.success){var r="".concat(t.data.host,"/edu_admin/cms_sso/?code=").concat(t.data.code,"&path=/pro/coursedev/exercisecourse/").concat(e.classroom_corresponding_library.instance_id);window.open(r,"_blank")}}).catch(function(t){console.log(t),e.$message({message:t.msg,customClass:"toastMessage",iconClass:"icon-gantanhao iconfont"})})},handleKnowledgeSelect:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(this.initFactor(),this.workspaceKnowledgeGraphTreeQueryData=e,Object.assign(this.workspaceKnowledgeGraphTreeInitData,e),r)return this.getProblemList(2,null,t)},handleModifyFileChange:function(e){var t=this,r=e.raw,a=API.pc.exercise.batch_modify_problem_knowledge,i=new FormData;i.append("problems",r),i.append("library_id",this.library_id),i.append("folder_id",this.folder_id||0),i.append("error_type",0),i.append("agent_id",this.$route.params.course_id);var n='<p><img src="https://qn-sfe.yuketang.cn/o_1e7515smc9cc1crg11nd4vd1rvj9.gif" width="60px" height="60px" /></p>\n        <p class="import-text">'.concat(this.$t("pc.paper.beimporting"),'</p>\n        <p class="import-tips">').concat(this.$t("pc.paper.notclosetip"),"</p>");this.$msgbox({title:"",message:n,dangerouslyUseHTMLString:!0,customClass:"importing-toast-message",showClose:!1,showCancelButton:!1,showConfirmButton:!1,closeOnClickModal:!1,closeOnPressEscape:!1,beforeClose:function(e,r,a){t.resultDialog.visible&&a()}}),request.post(a,i,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){var r=e.data;t.getProblemList(),t.getResultDialogData(r),t.$nextTick(function(){t.$msgbox.close()}),t.resultDialog.visible=!0}
1).catch(function(e){console.log(e),t.getResultDialogData(),t.$nextTick(function(){t.$msgbox.close()}),t.resultDialog.visible=!0})},getResultDialogData:function(e){if(e)if(0==e.error_count&&0==e.duplicate_count)this.resultDialog.data={title:this.$t("pc.paper.successnum",{count:e.success_count})||"导入成功".concat(e.success_count,"题"),icon:"icon-yuanquangou-mianzhuang",iconstatus:"success",body:this.$t("pc.paper.reimport")||"* 建议您再次核对导入的习题内容"};else{var t="<span>".concat(this.$t("pc.paper.successnum",{count:e.success_count}),"</span>")||"<span>导入成功".concat(e.success_count,"题</span>");t+=e.duplicate_count?'<span class="shuxian">|</span> <span>'.concat(this.$t("pc.paper.problemrepeat",{count:e.duplicate_count}),"</span>"):"",t+=e.error_count?'<span class="shuxian">|</span> <span>'.concat(this.$t("pc.paper.importfail",{count:e.error_count}),"</span>"):"",this.resultDialog.data={title:t,icon:"",iconstatus:"",type:"excel",body:this.$t("pc.paper.reimport")||"* 建议您再次核对导入的习题内容",error_list:e.error_list||[],failure_count:e.failure_count||0,knowledge_error_count:e.knowledge_error_count||0}}else this.resultDialog.data={title:this.$t("pc.paper.importfail2")||"习题导入失败",icon:"icon-weidu-mianzhuang",iconstatus:"fail",body:this.$t("pc.paper.failtip")||"请参照模板修改文件内容并重新上传文件",failure_count:e.failure_count||0,knowledge_error_count:e.knowledge_error_count||0}},handleSetSelfTest:function(e){var t=this,r=API.pc.exercise.set_self_test,a={library_id:this.library_id,template_ids:this.multipleSelection.map(function(e){return e.problem_id}),hide:e};request.post(r,a).then(function(e){e.success?(t.$message({message:"设置成功",type:"success",customClass:"toastMessage",iconClass:"iconfont icon-yuanquangou-mianzhuang"}),t.$nextTick(function(){t.multipleSelection=[],t.multipleSelectionAllKey=[],t.$refs.multipleTable&&t.$refs.multipleTable.clearSelection()})):t.$message({message:e.msg,type:"error",customClass:"toastMessage",iconClass:"icon-gantanhao iconfont"})}).catch(function(e){t.$message({message:e.msg,type:"error",customClass:"toastMessage",iconClass:"icon-gantanhao iconfont"})})}},mixins:[{data:function(){return{checkedState:!1}},methods:{addExercises:function(e,t,r){var a=this;if(e){this.searchForm.template_id=e,this.getProblemList(2);var i=this.problemList.findIndex(function(t){return t.problem_id==e});this.previewItem(t,i);return}setTimeout(function(){a.refreshCurrentProblemList()},1500),t&&!r&&this.$refs.problemFolder.changeumFromParent(!0,t.folder_id,1)},refreshCurrentProblemList:function(){if(this.is_search&&this.fromfolder)return void this.search(2,this.page);this.getProblemList()},dialogUpdateSelectSetting:function(e){var t=this,r=API.pc.exercise.get_problem_sync_list,a={template_id:e.content.TemplateID||e.content.template_id,library_id:e.content.LibraryID};request.get(r,a).then(function(r){r.success&&r.data.data.length&&(t.dialog_updateSelectConfig.problem_data=e,t.dialog_updateSelectConfig.problem_sync_list=r.data.data,t.dialog_updateSelectConfig.visible=!0)})},deepClone:function(e,t){var r,a=t||{};for(var i in e)"object"==((r=e[i])&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)?e[i].constructor===Date?a[i]=e[i]:(a[i]=e[i].constructor===Array?[]:{},this.deepClone(e[i],a[i])):a[i]=e[i];return a},addExercisesFn:function(){this.searchForm.template_id&&(this.searchForm.template_id=""),Object.assign(this.dialog_homeworkProblemConfig,{data:{},title:this.$t("pc.library.addProblem")||"添加习题",visible:!0,actionType:"put"})}}}]},Y=(0,s.Z)(H,function(){var e=this,t=e._self._c;return t("div",{staticClass:"app-container",class:{noborderpd:e.fromCourseResource,"question-container-ispreview":e.isPreview,fromdialog:e.fromCourseResource},attrs:{id:"questionContainer"}},[e.showResult?t("div",{staticClass:"problem-card",class:{noborderpd:e.fromCourseResource}},[t("el-container",{class:{small:e.fromCourseResource}},[t("el-aside",{staticClass:"left-area",class:{folder0:e.isPreview}},[t("div",{staticClass:"title"},[t("img",{attrs:{src:"https://qn-sfe.yuketang.cn/o_1hfbf661k188alhhej239boo09.png",alt:""}}),e._v(" "),e.is_graph_library?t("span",{staticClass:"flex items-center space-x-4 pointer"},[t("span",{staticClass:"text-gray-002",on:{click:e.handleOpenToResource}},[e._v(e._s(e.classroom_corresponding_library.library_name))]),e._v(" "),t("el-tooltip",{staticClass:"item",attrs:{content:"习题来源为对应AI课程的资源包。",placement:"top"}}
1,[t("i",{staticClass:"icon-gray-002 f12 iconfont icon-wenorshuoming"})])],1):t("span",[e._v(e._s(e.classroom_corresponding_library.library_name))])]),e._v(" "),e.tabList.length>1?t("div",{staticClass:"nav-tab"},e._l(e.tabList,function(r){return t("span",{key:r.value,class:{"tab-item":!0,active:e.currentTab===r.value},on:{click:function(t){return e.changeTab(r.value)}}},[e._v(e._s(r.name))])}),0):e._e(),e._v(" "),t("div",{staticClass:"nav-content"},[t("problemFolder",{directives:[{name:"show",rawName:"v-show",value:3===e.currentTab,expression:"currentTab === 3"}],ref:"problemFolder",attrs:{"show-folder-list-all":e.showPLYDDialog,page:e.page,"problem-list":e.multipleSelection,size:e.page_size,"from-course-resource":e.fromCourseResource,library_id:e.library_id,"is-search":e.is_search,is_graph_library:e.is_graph_library,"search-form":e.searchForm},on:{setData:e.setData,"problem-list-error":e.handleProblemListRequestError,refresh:e.getProblemList,showAll:function(t){return e.search()},initFactor:e.initFactor}}),e._v(" "),t("workspaceGraphTree",{directives:[{name:"show",rawName:"v-show",value:e.tabList.length>1&&4===e.currentTab,expression:"tabList.length > 1 && currentTab === 4"}],ref:"workspaceGraphTree",attrs:{"current-tab":e.currentTab,library_id:e.library_id,"init-selected":e.workspaceKnowledgeGraphTreeInitData},on:{selected:e.handleKnowledgeSelect}}),e._v(" "),e.tabList.length>1?[t("problemK12KnowledgeGraphTree",{directives:[{name:"show",rawName:"v-show",value:3!==e.currentTab&&4!==e.currentTab,expression:"currentTab !== 3 && currentTab !== 4"}],attrs:{"current-tab":e.currentTab,"init-selected":e.k12KnowledgeGraphTreeInitData},on:{selected:e.handleK12KnowledgeGraphTreeSelected}})]:e._e()],2)]),e._v(" "),t("el-main",{staticClass:"problem-container",class:e.isPreview?"for-preview":""},[t("div",{staticClass:"problem-container__search",class:{"workspace-search":e.is_graph_library}},[e.is_graph_library?t("div",{staticClass:"source-search flex items-center space-x-4"},[t("span",{staticClass:"source-search__title"},[e._v("来源")]),e._v(" "),t("el-select",{attrs:{placeholder:"请选择来源"},on:{change:function(t){return e.search(2,!1)}},model:{value:e.searchForm.source,callback:function(t){e.$set(e.searchForm,"source",t)},expression:"searchForm.source"}},e._l(e.sourceList,function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})}),1)],1):e._e(),e._v(" "),t("el-input",{staticClass:"text-input",attrs:{placeholder:e.is_graph_library?"习题内容/别名/分类搜索":e.$t("pc.library.inputExerciseContent")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(2,!1)}},model:{value:e.searchForm.content,callback:function(t){e.$set(e.searchForm,"content",t)},expression:"searchForm.content"}},[t("i",{staticClass:"iconfont",class:e.is_graph_library?"icon-sousuo":"icon--sousuo",attrs:{slot:"prefix"},slot:"prefix"}),e._v(" "),e.searchForm.content?t("i",{staticClass:"iconfont icon-yuanquancha-mianzhuang",attrs:{slot:"suffix"},on:{click:function(t){return t.stopPropagation(),e.handleClear.apply(null,arguments)}},slot:"suffix"}):e._e(),e._v(" "),t("span",{attrs:{slot:"append"},on:{click:function(t){return e.search(2,!1)}},slot:"append"},[e._v(e._s(e.$t("pc.library.exerciseSearch")))])]),e._v(" "),t("filter-search",{ref:"filterSearch",attrs:{is_graph_library:e.is_graph_library,"no-material":e.noMaterial,"k12-knowledge-graph-filter-data":e.k12KnowledgeGraphFilterData},on:{search:e.getSearchForm}})],1),e._v(" "),t("div",{staticClass:"problem-container__operate"},[t("span",{staticClass:"total-tips"},[e.multipleSelection.length?t("span",{staticClass:"selected-tips"},[e._v("已选"+e._s(e.multipleSelection.length)+"道题")]):e._e(),e._v("\n            "+e._s(e.is_search?e.$t("pc.library.totalFindNum",{total:e.total}):e.$t("pc.library.totalNum",{total:e.total})))]),e._v(" "),e.fromCourseResource?e._e():t("div",{staticClass:"btn-groups"},[t("a",{staticClass:"el-button el-button--primary",attrs:{href:e.exportUrl},on:{click:function(t){return e.getExportUrl()}}},[t("i",{staticClass:"iconfont icon-daochupiliang"}),e._v("\n              "+e._s(e.$t("pc.library.batchExport"))+"\n            ")]),e._v(" "),t("el-button",{attrs:{type:"primary",disabled:!e.multipleSelection.length},on:{click:function(t){return e.massDelete()}}},[t("i",{staticClass:"iconfont icon-shanchu4"}),e._v("\n              "+e._s(e.$t("pc.library.delete"))+"\n            ")]),e._v(" "),e.fromCourseResource?e._e():t("el-button",{attrs:{type:"primary",disabled:!e.multipleSelection.length||3!==e.currentTab&&4!==e.currentTab},on:{click:function(t){4===e.currentTab?e.openKnowledgeDialog():e.moveToFolder(1)}}},[t("i",{staticClass:"iconfont icon-xuanzeyidong"}),e._v(e._s(4===e.currentTab?e.$t("pc.library.selectKnowledgePoint")||"选知识点":e.$t("pc.library.move"))+"\n            ")]),e._v(" "),e.is_graph_library?t("el-button",{attrs:{type:"primary",disabled:!e.multipleSelection.length},on:{click:function(t){return e.handleSetSelfTest(0)}}}
1,[e._v("设为自测\n            ")]):e._e(),e._v(" "),e.is_graph_library?t("el-button",{attrs:{disabled:!e.multipleSelection.length},on:{click:function(t){return e.handleSetSelfTest(1)}}},[e._v("关闭自测\n            ")]):e._e(),e._v(" "),t("el-button",{on:{click:function(t){return t.preventDefault(),e.addExercisesFn(null,0)}}},[t("i",{staticClass:"iconfont icon-tianjia1"}),e._v("\n              "+e._s(e.$t("pc.library.addProblem"))+"\n            ")]),e._v(" "),e.is_graph_library?e._e():t("el-button",{on:{click:function(t){t.preventDefault(),e.isUploadDialogShow=!0}}},[t("i",{staticClass:"iconfont icon-daoru"}),e._v(e._s(e.$t("pc.library.batchImport"))+"\n            ")]),e._v(" "),e.is_graph_library?t("el-dropdown",[t("div",{staticClass:"flex items-center el-button space-x-4"},[t("i",{staticClass:"iconfont icon-daoru"}),e._v(" "),t("span",[e._v("批量更新")]),e._v(" "),t("i",{staticClass:"iconfont icon-jiantoudan-xiangxia"})]),e._v(" "),t("el-dropdown-menu",{staticClass:"ykt-dropdown-menu mt4",attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",[t("span",{staticClass:"block",on:{click:function(t){t.preventDefault(),e.isUploadDialogShow=!0}}},[e._v(e._s(e.$t("pc.library.batchImport"))+"\n                  ")])]),e._v(" "),t("el-dropdown-item",[t("a",{staticClass:"text-gray-002 block",attrs:{href:e.exportHasIdUrl},on:{click:function(t){return e.getExporHasIdtUrl()}}},[e._v("带ID导出\n                  ")])]),e._v(" "),t("el-dropdown-item",[t("el-upload",{ref:"upload",attrs:{data:e.uploadModifyData,action:"",accept:".xlsx, .xls","auto-upload":!1,"show-file-list":!1,"on-change":e.handleModifyFileChange}},[t("span",{staticClass:"block",attrs:{slot:"trigger"},slot:"trigger"},[e._v("批量修改知识点")])])],1)],1)],1):e._e()],1)]),e._v(" "),t("div",{staticClass:"problem-info",class:{"from-resource":e.fromCourseResource}},[!e.showResult||e.listRefreshing?t("loading"):t("div",{staticClass:"h100"},[e.problemList.length?t("div",{staticClass:"h100"},[t("el-table",{ref:"multipleTable",staticClass:"problem-container__table",attrs:{data:e.problemList,"row-class-name":e.tableRowClassName},on:{select:e.handleSelectionSelect,"select-all":e.handleSelectionSelectAll}},[t("el-table-column",{attrs:{type:"selection",width:e.fromCourseResource?32:54,selectable:e.selectable,fixed:!!e.fromCourseResource,align:"right","header-align":"right"}}),e._v(" "),t("el-table-column",{attrs:{width:e.fromCourseResource?44:54,label:e.$t("pc.library.sort"),fixed:!!e.fromCourseResource,type:"index",align:"center","header-align":"center"}}),e._v(" "),t("el-table-column",{attrs:{prop:"problem_type",label:e.$t("pc.library.type"),align:"center","header-align":"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("div",[e._v(e._s(e.TypeText[r.row.content.ProblemType]))])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"content","class-name":"item-content",label:e.$t("pc.library.exerciseContent"),align:"left","header-align":"center","min-width":e.fromCourseResource?280:""},scopedSlots:e._u([{key:"default",fn:function(r){return[r.row.content.TypeRenameText?t("span",{staticClass:"rename-mark",on:{click:function(t){return e.bindFloder(r.row)}}},[e._v("【"+e._s(r.row.content.TypeRenameText)+"】")]):e._e(),e._v(" "),t("el-tooltip",{attrs:{placement:"top","popper-class":"content-area-tooltip","open-delay":1e3}},[t("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.replaceTxt(r.row.content.Body))},slot:"content"}),e._v(" "),t("div",{staticClass:"content-area",domProps:{innerHTML:e._s(e.replaceTxt(r.row.content.Body))},on:{click:function(t){return e.bindFloder(r.row)}}})])]}}])}),e._v(" "),e.is_graph_library?t("el-table-column",{attrs:{prop:"node_list",label:"知识点",width:"100",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(r){return[r.row.node_list&&r.row.node_list.length>0?t("el-tooltip",{attrs:{placement:"top-start","popper-class":"content-area-tooltip","open-delay":100}},[t("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(r.row.node_names||r.row.node_list[0].node_name)},slot:"content"}),e._v(" "),t("span",{staticClass:"node-name",class:{"ai-mark":1==r.row.mark_type}},[e._v(e._s(r.row.node_list[0].node_name))])]):t("span",[e._v("-")])]}}],null,!1,0x336d2450)}
1):e._e(),e._v(" "),t("el-table-column",{attrs:{prop:"difficulty",label:"难度",width:"100",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(r){return[t("span",{class:"item-difficulty-"+r.row.content.difficulty},[e._v(e._s(r.row.content.difficulty)+"级")])]}}])}),e._v(" "),t("el-table-column",{attrs:{prop:"updated_by",label:e.$t("pc.library.lastModify"),width:"168",align:"center","header-align":"center"},scopedSlots:e._u([{key:"default",fn:function(r){return[r.row.last_modifier.modify_time?t("div",[e._v("\n                      "+e._s(e._f("formatTime")(r.row.last_modifier.modify_time))+"\n                    ")]):e._e()]}}])})],1),e._v(" "),t("div",{staticClass:"problem-container__pagination"},[e.total>e.problemListDisplayLimit?t("p",{staticClass:"problem-container__limit-tip"},[e._v("\n                  "+e._s(e.$t("pc.library.listLimitTip"))+"\n                ")]):e._e(),e._v(" "),t("el-pagination",{class:{"graph-pagination":e.is_graph_library},attrs:{layout:"prev, pager, next",background:"","current-page":e.page,"page-size":e.page_size,total:Math.min(e.total,e.problemListDisplayLimit)},on:{"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.handleCurrentChange,"prev-click":e.handleCurrentChange,"next-click":e.handleCurrentChange}}),e._v(" "),t("span",{staticClass:"page-set"},[t("el-popover",{ref:"popoverPageSize",attrs:{placement:"top","popper-class":"library-pagination_popover",trigger:"hover"}},[t("div",{staticClass:"page-setting"},[t("p",[e._v(e._s(e.$t("pc.library.pageshow")))]),e._v(" "),t("el-radio-group",{attrs:{size:"small"},on:{change:function(t){return e.handleSizeChange()}},model:{value:e.page_size,callback:function(t){e.page_size=t},expression:"page_size"}},e._l(e.page_sizes,function(e,r){return t("el-radio-button",{key:r,attrs:{label:e}})}),1)],1),e._v(" "),t("i",{staticClass:"iconfont icon-shezhi2",attrs:{slot:"reference"},slot:"reference"})])],1)],1)],1):t("div",[e.is_search?t("div",{staticClass:"no_problem_img"},[t("p",[t("img",{attrs:{src:"https://qn-sfe.yuketang.cn/o_1hfdh3gp31nc0119h1lqh13s31pb09.png",height:"160",width:"280",alt:""}})]),e._v(" "),t("p",[e._v("\n                  "+e._s(e.$t("pc.library.noResult"))+"\n                ")])]):t("div",{staticClass:"no_problem_img"},[t("p",[t("img",{attrs:{src:"https://qn-sfe.yuketang.cn/o_1hfdh3gp31nc0119h1lqh13s31pb09.png",height:"160",width:"280",alt:""}})]),e._v(" "),t("p",[e._v("\n                  "+e._s(e.$t("pc.library.noProblem"))+"\n                ")]),e._v(" "),t("p",[e.fromCourseResource?e._e():t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addExercisesFn(null,0)}}},[t("i",{staticClass:"iconfont icon-tianjia1"}),e._v(" "),e._v("\n                    "+e._s(e.$t("pc.library.addProblem"))+"\n                  ")])],1)])])])],1)]),e._v(" "),t("ProblemPreview",{directives:[{name:"show",rawName:"v-show",value:e.isPreview&&e.problemList.length,expression:"isPreview && problemList.length"}],attrs:{info:e.previewData,"problem-list":e.problemList,"source-id":e.sourceId,"is-graph-library":e.is_graph_library,"from-course-resource":e.fromCourseResource},on:{close:function(t){return e.closePreview()},exerciseEditFn:e.exerciseEditFn}})],1),e._v(" "),t("importExcel",{attrs:{islibrary:!0,"folder-id":e.folder_id,libraryid:e.library_id,is_graph_library:e.is_graph_library,isUploadDialogShow:e.isUploadDialogShow},on:{"update:isUploadDialogShow":function(t){e.isUploadDialogShow=t},"update:is-upload-dialog-show":function(t){e.isUploadDialogShow=t},updateList:e.getProblemList}}),e._v(" "),e.dialog_homeworkProblemConfig.visible?t("ProblemEditDialog",{attrs:{"problem-dialog-config":e.dialog_homeworkProblemConfig,"library-id":e.classroom_corresponding_library.library_id,"library-name":e.classroom_corresponding_library.library_name,"folder-id":e.folder_id,"is-library":!0,"template-id-list":e.problemsTmpID,"is-graph-library":e.is_graph_library,"wait-filter-data":3!==e.currentTab,"k12-knowledge-graph-filter-data":e.k12KnowledgeGraphFilterData,"no-material":e.noMaterial},on:{"update:problemDialogConfig":function(t){e.dialog_homeworkProblemConfig=t},"update:problem-dialog-config":function(t){e.dialog_homeworkProblemConfig=t},newexercise:e.addExercises}}
1):e._e()],1):t("loading"),e._v(" "),t("delete-exercise-dialog",{attrs:{"mass-delete-dialog":e.massDeleteDialog},on:{close:function(t){e.massDeleteDialog.visible=!1}}}),e._v(" "),t("delete-quote-dialog",{attrs:{dialog_deleteQuote:e.dialog_deleteQuote},on:{close:function(t){e.dialog_deleteQuote.visible=!1}}}),e._v(" "),t("import-result-dialog",{attrs:{"result-dialog":e.resultDialog},on:{close:function(t){e.resultDialog.visible=!1}}}),e._v(" "),t("knowledge-dialog",{ref:"knowledgeDialog",on:{confirm:e.attachKnowledge}})],1)},[],!1,null,"93105c9c",null).exports},38665:function(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABcCAYAAADqBHIiAAAAAXNSR0IArs4c6QAAA5BJREFUeAHt3b+KE1EYBXAnKYKViFgIgfx7A1/A2k5W7NRGFmUb30CbBRuxWEVB1sYXEKwsdAUrsbKzkCQkhWARRNxGEhLPKLMk4ySZZO65801yAsOdv2e++fGRpNibDU4V4NVut88EQfAQpe5MJpNjrB80Go1HGCfWyw+sF9jr9c6ORqO3qPPidK3AfQHkXevIpoHn4UbQRUA2C7wMtyjIJoHT4hYB2RzwqrjWkU0Br4trGdkMcFZcq8gmgF3hWkTOHdg1rjXkXIFZuJaQcwNm41pBzgXYF64FZO/AvnHzRvYKnBdunsjegPPGzQvZC7AV3DyQ6cDWcH0jU4Gt4vpEpgFbx/WFTAEuCq4PZOfARcNlIzsFLiouE9kZcNFxWchOgDcFl4GcGXjTcF0jZwLeVFyXyGsDbzquK+S1gLcF1wXyysDbhpsVeSXgbcXNgpwaeNtx10VOBSzciPffuMpfdS4FFu4sbrSVFnkhsHAjzuQxDfJcYOEmo8b3LkNOBBZunHHx9iLk/4CFuxhz3tF5yDPAwp3Hl25/EvIJsHDTIS47K478F1i4y9hWOz6NHIST/HD5EZaZeWirRersuACQD5vN5m7Q6XQOMXvyVvwEbTsRuF5CzI6TKIUkCVwthXN/k45oX3YBvE0chx38NHuUEuICwB2XSqVnATo46Ha7ezjhBtYvxE9cZxvh55F1ep1r87oGNf9Azb+y3h854S8AfAXug3q9fnTyPThr8PT1+GbyCttXpvdZXwfIXczeP3BdZ/gWoRdRQMBE3DBawAImC5Dj1cECJguQ49XBAiYLkOPVwQImC5Dj1cECJguQ49XBAiYLkOPVwQImC5Dj1cECJguQ49XBAiYLkOPVwQImC5Dj1cECJguQ49XBAiYLkOPVwQImC5Dj1cECJguQ49XBAiYLkOPVwQImC5Dj1cFFBMZEkMyTScjPnRRPqZnSwZit8y3pCYzvo9RMAS6Xyx+MY8bLG47H44/xnS62KcC1Wu0d3iYGLgr0kYFa37RarZ+Me1GAUfBvLPuMgl1nos4Jlnuuc6M8CnAYjlmOTzC8j25keNzHBMTPrPpowOiKUaVSuYbxE6v4rLmo7Tlw72fNWXQ9DTi8abVaHeAhLmF5jM3hokJ8HkM9A0ydvYMfzLiNdep/F6fMVU7C6vf7reFweBMPdBlf4xoYz2H0df8RavqOe37B+Br3fcn6UIs/+x8cAtYMPLCotAAAAABJRU5ErkJggg=="},73155:function(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAC4CAYAAABD5GYzAAAAAXNSR0IArs4c6QAACTtJREFUeAHt2k9oXFUUx/HMpFpLjUgqCl35L4IEiSVN0oVKd4ILBXciKAgiiitBaUG3bnSpK0VUcKMIiqKULkQ3NrFYiwZ3VRT8S0GwobY2Hc+T3DI5yXTmvXl/7u++b2G8c15m3jv3dz59jhM7E/wpNYGTJ0/uPnv27CE76UF7zHU6nT9s/drWVxYXF7+w5/wpMYFOiedq/amOHz9+1/r6+lu9Xu9mH4YB7tmxV6anp5+dmZk5539OXSwBABfLbcu7lpeX7zW4H9gPrtryw80HPtmzZ8+DIN4cStEKwEWT63tfDrzhXSAOSYy5AnjMAAvgDVcEcUhijBXAY4Q3Bt5wVRCHJAquAC4YXAl4w5VBHJIosAK4QGgl4g1XB3FIIucK4JyBVYA3dADikESOFcA5wqoQb+gCxCGJEVcAjxhUDXhDJyAOSYywAniEkGrEG7oBcUhiyArgIQE1gDd0BOKQxGVWAF8mnAbxhq5AHJIYsAJ4QDAR4A2dgTgksc0K4G1CiQhv6A7EIQm3AtgFEiHe0CGIQxJ9K4D7wogYb+gSxCGJjRXAG0EI4A2jA3FIwlYAWwhCeMPoQLyRROsBC+IFcUjA1lYDFsYbRtj6O3FrASeAF8RtvQMnhLf1iFt3B04Qb6sRtwpwwnhbi7g1gFuAt5WIWwG4RXhbhzh5wC3E2yrESQNuMd7WIE4WMHiD4Ymkf9mRJGDwXsIbniSLODnA4A1mt6xJIk4KMHi3oPUHkkOcDGDweqsD66QQJwEYvAOxDvpBMojlAYN3kNGhx5NALA0YvEORDnuBPGJZwOAdZnPkn0sjlgQM3pFxjvpCWcRygME7qsncr5NELAUYvLlR5n2DHGIZwODNa7Hw66UQSwAGb2GMRd8ogzh6wOAtanDs90kgjhoweMdGOO4JokccLWDwjmuvtPdHjThKwOAtDV9ZJ4oWcXSAwVuWudLPEyXiqACDt3R0ZZ8wOsTRAAZv2dYqO19UiKMADN7KsFV14mgQNw4YvFUZq/y8USBuFDB4K0dW9QUaR9wYYPBWbau28zeKuBHA4K0NV10Xagxx7YDBW5ep2q/TCOJaAYO3dlR1X7B2xLUBBm/dlhq7Xq2IawEM3sYwNXXh2hBXDhi8TRlq/Lq1IK4UMHgbR9R0A5UjrgwweJu2E831K0VcCWDwRoMnlkYqQ1w6YPDGYia6PipBXCpg8EaHJraGSkdcGmDwxmYl2n5KRVwKYPBGiyXWxkpDPDZg8MZqJPq+SkE8FmDwRo8k9gbHRlwYMHhjtyHT31iICwEGrwwOlUYLI84NGLwqJuT6LIQ4F2DwyqFQazg34pEBg1fNgmy/uRCPBBi8shhUGx8Z8VDA4FU1IN/3SIgvCxi88gjUNzAU8UDA4FWffTL9XxbxtoDBm8zwU9nIQMRbAIM3lZknt49tEW8CDN7khp7ahrYgvgQYvKnNOtn9bELczbZpeO/u9Xof2NOrkt02G0slgftOnz79rnn9/+bbXV1dvdqKt8GbynxbsY/7V1ZWnsh22j1z5sxhW2/MCv6QgEoCdtN96cSJE9dmHyEOqjRNnyTQl8DVFy5c2J8BvrPvIE9JQCYBuwvPde0f6zId0ygJ9CVgdv/sdjqdlb5jPCUBmQQmJydPZB8hXpLpmEZJYCMBu/F+Pj8//113aWnpiB17jWRIQCUBw7vW7XYfs7WX3YEnpqamnrbiRXvK52GVKba3z28N790LCwunsggu/So5K+w3cnO2PGIfjm+3dSo7Fssf+wt2vfV1Wyz9JNzHP7a34zHtz2Z/3mafwf1q9+7d783Ozp4P/W0CHA7GuNpfrkdtE2/G2FtKPRmWU/ax8haVPf3/EUKlWfokAZ8AgH0i1FIJAFhqXDTrEwCwT4RaKgEAS42LZn0CAPaJUEslAGCpcdGsTwDAPhFqqQQALDUumvUJANgnQi2VAIClxkWzPgEA+0SopRIAsNS4aNYnAGCfCLVUAgCWGhfN+gQA7BOhlkoAwFLjolmfAIB9ItRSCQBYalw06xMAsE+EWioBAEuNi2Z9AgD2iVBLJQBgqXHRrE8AwD4RaqkEACw1Lpr1CQDYJ0ItlQCApcZFsz4BAPtEqKUSALDUuGjWJwBgnwi1VAIAlhoXzfoEAOwToZZKAMBS46JZnwCAfSLUUgkAWGpcNOsTALBPhFoqAQBLjYtmfQIA9olQSyUAYKlx0axPAMA+EWqpBAAsNS6a9QkA2CdCLZUAgKXGRbM+AQD7RKilEgCw1Lho1icAYJ8ItVQCAJYaF836BADsE6GWSgDAUuOiWZ8AgH0i1FIJAFhqXDTrEwCwT4RaKgEAS42LZn0CAPaJUEslAGCpcdGsTwDAPhFqqQQALDUumvUJANgnQi2VAIClxkWzPgEA+0SopRIAsNS4aNYnAGCfCLVUAgCWGhfN+gQA7BOhlkoAwFLjolmfAIB9ItRSCQBYalw06xMAsE+EWioBAEuNi2Z9AgD2iVBLJQBgqXHRrE9ABnCn0/nbN09dSQJSOcsAvnjx4i+VjIuTbkqg1+tJ5SwDeMeOHVLBblIhVNi/6aRylgG8a9eu38zBBSELqq3+rNS4DODZ2dnzdnf4XClcxV4t46NKfcsA3gj1Q6VwBXv9fWFh4ZhS31KAJycnAVyhLrv7fmSPixVeovRTSwHev3//TxYwiEtnMDFhufbs8WoFp670lFKAsyTs24jDtqxXmkoLT25fn72zuLj4jdrW5QDPz89/byG/oRZ0zP3anffczp07X4i5x0G9yQHONmKBH7bHqUGb4ni+BCzL5/bt2/djvnfF8epOHG3k72JlZWXWfjv3pb1zKv+7eUdIwPC+vrS09Hio1VbJO3AWsn1eW7XwH7LHv2qhx9KvZfeZfbPzVCz9FOlD9g4cNmt34nvsP0Det8d14Rjr8AQM71vT09NPzMzMnBv+6nhfIQ84i3Z5efkmA5x9vXZHvFFH01n2Dc6hAwcOvBxNR2M0kgTgbP+rq6tXrq2tPWmQn+duvL0Iu+t+bI9D2cev7V+hdzQ
1ZwCH6Y8eOXWNDesYQP2zHbg3HW7z+Y3kctcfLBveL1HJIDnD/gLJvKgzyA3Zswda9NsS99vwGe35F/+tSeW77+8v2kv3vkL/a4werP7Xvd4/Mzc2tpbJHv4//ACOYvUcLR9RqAAAAAElFTkSuQmCC"},26048:function(e,t,r){r(63064),r(63649),r(13794),r(87481),r(86067),r(42463),r(35286),r(20573),r(16446),r(13054),r(88761),r(60668),t.Z=function(e){var t=e.url,r=void 0===t?"":t,a=e.type,i=void 0===a?"get":a,n=e.async,o=void 0===n||n,l=e.data,s=void 0===l?{}:l;return new Promise(function(e,t){var a=new XMLHttpRequest;a.onreadystatechange=function(){var r=a.responseText;4===a.readyState&&(200===a.status?e(JSON.parse(r).data):t(JSON.parse(r)))},a.onerror=function(){console.log(a)};var n=function(e,t,r){if("get"===e.toLowerCase()){var a=function(e){for(var t=Object.keys(e),r="",a=0;a<t.length;)r+="&".concat(t[a],"=").concat(e[t[a]]),a++;return r.replace(/^\&/,"")}(r),i=t.indexOf("?")>-1?"&".concat(a):"?".concat(a);return(t+i).replace(/\?$/,"")}return t}(i=i.toLowerCase(),r,s);a.open(i,n,o),"get"===i?a.send():a.send(JSON.stringify(s))})}},45287:function(e,t,r){r.d(t,{B:function(){return c}}),r(80287),r(35621),r(87481),r(63649),r(81080);var a=r(26048),i=r(51705);function n(e,t,r,a,i,n,o){try{var l=e[n](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,i)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(a,i){var o=e.apply(t,r);function l(e){n(o,a,i,l,s,"next",e)}function s(e){n(o,a,i,l,s,"throw",e)}l(void 0)})}}function l(e,t){var r,a,i,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(r=1,a&&(i=2&c[0]?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!(i=(i=n.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){n=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(6===c[0]&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],a=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var s=r(67612),c=function(){var e;function t(){var e=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.getToken().then(function(t){var r=t.token,a=t.domain;e.token=r,e.domain=a}),this.subscription=null,this.ext=""}return e=[{key:"trigger",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.mimeType,i=e.name,n=new Date().getTime();this.ext=e.name.split(".").pop();var o={file:e,name:"".concat(n,".").concat(i),next:this.processHandle({type:0},t),error:this.processHandle({type:1},t),complete:this.processHandle({type:2},t),mimeType:void 0===a?null:a};this.subscription=this.createUpload(o)}},{key:"cancelUpload",value:function(){return o(function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,this.subscription];case 1:e=t.sent();try{return e&&"function"==typeof e.unsubscribe&&(e.unsubscribe(),this.subscription=null),[2,!0]}catch(e){return[2,e]}}})}).call(this)}},{key:"processHandle",value:function(e,t){var r=this,a=this.domain,n=e.type,o=0;return function(e){switch(n){case 0:var l=e.total,s=l.percent;o=l.size,t({loaded:(0,i.ap)(l.loaded),percent:l.percent.toFixed(2),total:(0,i.ap)(l.size),percentage:s,percentageStr:"".concat(s,"%"),status:2,store_service:"qiniu",size:o,ext:r.ext});break;case 1:t({isErr:!0,msg:this.$t("pc.cloud.shangchuanchongshi"),status:4,store_service:"qiniu"});break;case 2:t({percent:100,status:0,url:"".concat(a,"/").concat(e.key),store_service:"qiniu",ext:r.ext}),r.subscription=null}}}},{key:"createUpload",value:function(e){return o(function(e){var t,r,a,i,n,o,c,u,d,p;return l(this,function(l){switch(l.label){case 0:if(t=e.file,r=e.name,a=e.next,i=e.error,n=e.complete,c=void 0===(o=e.mimeType)?null:o,this.token)return[3,2];return[4,this.getToken()];case 1:d=(u=l.sent()).token,p=u.domain,this.token=d,this.domain=p,l.label=2;case 2:return[2,s.upload(t,r,this.token,{mimeType:c},{useCdnDomain:!1,uphost:"upload.qiniup.com"}).subscribe({next:a,error:i,complete:n})]}})}).apply(this,arguments)}},{key:"getToken",value:function(){return o(function(){var e;return l(this,function(t){switch(t.label){case 0:return e={url:"/api/open/yunpan/qiniu/auth_token",type:"get",params:{}},[4,(0,a.Z)(e)];case 1:return[2,t.sent()]}})})()}}],function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(t.prototype,e),t}()},51705:function(e,t,r){function a(e){if(!e)return"0k";
1for(var t=0;e>=1024&&t<4;)e/=1024,t++;var r=e.toFixed(2).replace(/(\.00)$/,"");return"".concat(r).concat(["b","k","M","G","T"][t])}function i(e){var t=e/60;if(t<1)return Math.floor(e)+"秒";if(t>=1&&t<60)return Math.floor(t)+"分钟"+Math.floor(e-60*Math.floor(t))+"秒";var r=t/60;return Math.floor(r)+"小时"+(Math.floor(t)-60*Math.floor(r))+"分钟"+Math.floor(e-60*Math.floor(t))+"秒"}function n(e){var t=["wmv","mp4","flv","avi","mov","rmvb","mkv"].indexOf(e=e.toLowerCase())>-1,r=["cda","wav","mp3","aiff","au","wma","ogg"].indexOf(e)>-1;return t?1:r?2:3}function o(){var e=Math.floor(1e5*Math.random()),t=new Date().getTime();return"".concat(e,"-").concat(t)}function l(e){return e.replace(/^http:\/\//,"https://")}r.d(t,{JB:function(){return n},QW:function(){return l},W0:function(){return i},ap:function(){return a},zL:function(){return o}}),r(81080),r(13794),r(87481),r(63649)},51787:function(e,t,r){r.d(t,{o:function(){return n}}),r(47761),r(52042),r(63064),r(42463),r(42682);var a=r(46803),i=r.n(a);function n(e){var t=function(e,t){try{var r=function(e){var t="RainClassroom";if(e.length>=43)return e.substring(0,43);var r=43-e.length;return e+t[r%t.length].repeat(r)}(t),a=i().enc.Base64.parse(r+"=");console.log("decodeedKey",a);var n=i().lib.WordArray.create(a.words.slice(0,4)),o=i().AES.decrypt(e,a,{iv:n,mode:i().mode.CBC,padding:i().pad.NoPadding}),l=i().enc.Utf8.stringify(o),s=l.charCodeAt(l.length-1);s>=1&&s<=32&&(l=l.substring(0,l.length-s));var c=JSON.parse(i().enc.Base64.parse(l).toString(i().enc.Utf8));return{success:!0,data:c}}catch(e){return{success:!1,data:null,error:e.toString()}}}(e,"xuetangX2014");if(t.success)return t.data}},57518:function(e,t,r){r(72775),r(42463)},76556:function(e,t,r){var a=r(39409),i=r(22826).find,n=r(11788),o="find",l=!0;o in[]&&[,][o](function(){l=!1}),a({target:"Array",proto:!0,forced:l},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(o)},47482:function(e,t,r){var a=r(39409),i=r(75711),n=r(4537),o=r(95460),l=r(8984),s=r(12404),c=r(14716),u=r(53304),d=r(3481),p=r(51932),f=r(11691)("splice"),h=Math.max,_=Math.min;a({target:"Array",proto:!0,forced:!f},{splice:function(e,t){var r,a,f,m,g,b,v=i(this),y=l(v),w=n(e,y),k=arguments.length;for(0===k?r=a=0:1===k?(r=0,a=y-w):(r=k-2,a=_(h(o(t),0),y-w)),c(y+r-a),f=u(v,a),m=0;m<a;m++)(g=w+m)in v&&d(f,m,v[g]);if(s(f,a),r<a){for(m=w;m<y-a;m++)g=m+a,b=m+r,g in v?v[b]=v[g]:p(v,b);for(m=y;m>y-a+r;m--)p(v,m-1)}else if(r>a)for(m=y-a;m>w;m--)g=m+a-1,b=m+r-1,g in v?v[b]=v[g]:p(v,b);for(m=0;m<r;m++)v[m+w]=arguments[m+2];return s(v,y-a+r),f}})},47761:function(e,t,r){r(39409)({target:"String",proto:!0},{repeat:r(60241)})}}]);

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.