1 |
- var z=Object.defineProperty,M=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var L=(r,l,n)=>l in r?z(r,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[l]=n,w=(r,l)=>{for(var n in l||(l={}))V.call(l,n)&&L(r,n,l[n]);if(P)for(var n of P(l))A.call(l,n)&&L(r,n,l[n]);return r},D=(r,l)=>M(r,W(l));var h=(r,l,n)=>new Promise((o,g)=>{var i=d=>{try{c(n.next(d))}catch(u){g(u)}},p=d=>{try{c(n.throw(d))}catch(u){g(u)}},c=d=>d.done?o(d.value):Promise.resolve(d.value).then(i,p);c((n=n.apply(r,l)).next())});import{d as x,e as R,a as C,u as S,r as b,B as I,i as t,q as G,l as T,_ as X,ce as U,a9 as k,p as y,k as m,cg as K,c as $,ai as H,aa as O,aj as Y}from"./index.6bfa570d.js";import{P as F}from"./index.d38cf90b.js";import{c as q,d as Z}from"./filters.0e1cdfd6.js";import{W as J,X as Q,Y as ee,Z as N}from"./api.b20da898.js";import{o as ae,c as te}from"./searchArray.617a5610.js";import{k as oe}from"./knowledgeTypeData.3b15dd0b.js";import{u as se}from"./tabsView.a2c8f242.js";import{T as ne}from"./index.5f21211c.js";import{N as le}from"./PageHeader.9e62c42a.js";import"./searchs.b637f0d6.js";import"./constant.b4bfe346.js";const ie="_wrap_57wdo_1",re="_searchWrap_57wdo_4",_={wrap:ie,searchWrap:re},ce=x({name:"add-plan",props:{list:{type:Object,default:()=>{}}},emits:["getList","close"],setup(r,{emit:l}){const n=R(),o=C({loading:!1,dataList:[],pagination:{page:1,rows:10,pageTotal:0}}),g=S(),i=C({keyword:"",orchestraType:null,lessonPlanId:n.query.id,courseTypeCode:null}),p=b([]),c=e=>{p.value=e},d=()=>[{type:"selection",disabled(e){return e.checked}},{title:"\u7F16\u53F7",key:"id"},{title:"\u8BFE\u4EF6\u540D\u79F0",key:"name"},{title:"\u4E50\u56E2\u7C7B\u578B",key:"orchestraType",render:e=>t("div",null,[q(e.orchestraType)])},{title:"\u8BFE\u7A0B\u7C7B\u578B",key:"courseType",render:e=>t("div",null,[Z(e.courseType)])}];I(()=>{u()});const u=()=>h(this,null,function*(){o.loading=!0;try{o.loading=!1;const{data:e}=yield J(w(w({},i),o.pagination));o.dataList=e.rows||[],o.pagination.pageTotal=Number(e.total)}catch(e){o.loading=!1,console.log(e)}}),s=()=>h(this,null,function*(){console.log(p.value),o.loading=!0;try{const{data:e}=yield Q({lessonPlanId:i.lessonPlanId,lessonCoursewareIds:p.value});g.success("\u65B0\u589E\u6210\u529F"),l("getList"),o.loading=!1}catch(e){o.loading=!1,console.log(e)}}),f=()=>{o.pagination.page=1,u()},v=()=>{i.keyword="",i.orchestraType=null,i.lessonPlanId=n.query.id,i.courseTypeCode=null,f()};return()=>t("div",{class:_.addSubject},[t("div",{class:_.searchWrap},[t(G,{"label-width":"120","label-placement":"left"},{default:()=>[t(T,{label:"\u8BFE\u4EF6\u540D\u79F0/\u7F16\u53F7"},{default:()=>[t(X,{value:i.keyword,"onUpdate:value":e=>i.keyword=e,placeholder:"\u8BFE\u4EF6\u540D\u79F0/\u7F16\u53F7"},null)]}),t(T,{label:"\u4E50\u56E2\u7C7B\u578B"},{default:()=>[t(U,{placeholder:"\u8BF7\u9009\u62E9\u4E50\u56E2\u7C7B\u578B",options:ae,clearable:!0,value:i.orchestraType,"onUpdate:value":e=>i.orchestraType=e},null)]}),t(T,{label:"\u8BFE\u7A0B\u7C7B\u578B"},{default:()=>[t(U,{placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u7C7B\u578B",options:te,clearable:!0,value:i.courseTypeCode,"onUpdate:value":e=>i.courseTypeCode=e},null)]}),t(T,null,{default:()=>[t(k,{style:{paddingTop:"12px"},justify:"end"},{default:()=>[t(y,{type:"success",onClick:f},{default:()=>[m("\u641C\u7D22")]}),t(y,{onClick:v},{default:()=>[m("\u91CD\u7F6E")]})]})]})]})]),t(K,{columns:d(),data:o.dataList,rowKey:e=>e.id,checkedRowKeys:p.value,"onUpdate:checkedRowKeys":e=>p.value=e,"onUpdate:checked-row-keys":c},null),t(F,{page:o.pagination.page,"onUpdate:page":e=>o.pagination.page=e,pageSize:o.pagination.rows,"onUpdate:pageSize":e=>o.pagination.rows=e,pageTotal:o.pagination.pageTotal,"onUpdate:pageTotal":e=>o.pagination.pageTotal=e,onList:u},null),t(k,{style:{paddingTop:"12px"},justify:"end"},{default:()=>[t(y,{onClick:()=>l("close")},{default:()=>[m("\u53D6\u6D88")]}),t(y,{type:"success",disabled:!p.value.length||o.loading,onClick:s},{default:()=>[m("\u4FDD\u5B58")]})]})])}}),Ce=x({name:"group-detail",setup(r,{emit:l}){const n=$(),o=R(),g=S(),i=H(),p=b(o.query.name||"\u8BA1\u5212\u8BE6\u60C5"),c=b([]),d=a=>{console.log("\u{1F680} ~ rowKeys",a),c.value=a},u=se(),s=C({loading:!1,id:o.query.id,pagination:{page:1,rows:10,pageTotal:0},dataList:[],visiablePlan:!1}),f=()=>[{type:"selection"},{title:"\u8BFE\u4EF6\u540D\u79F0",key:"name",render:a=>t(Y,null,[t(ne,{authLink:"coursewareManage1606856890826199041",to:{path:"/coursewareDetail",query:{id:a.lessonCoursewareId}}},{default:()=>[a.name]})])},{title:"\u4E50\u56E2\u7C7B\u578B",key:"orchestraType",render:a=>t("div",null,[q(a.orchestraType)])},{title:"\u8BFE\u7A0B\u7C7B\u578B",key:"courseTypeCode",render(a){return a.courseTypeCode?oe[a.courseTypeCode]:""}},{title:"\u6DFB\u52A0\u65F6\u95F4",key:"createTime"},{title:"\u6DFB\u52A0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(a){return t(k,null,{default:()=>[t(y,{type:"primary",size:"small",text:!0,onClick:()=>B(a)},{default:()=>[m("\u5220\u9664")]})]})}}],v=()=>{n.push({path:"/teachingPlan"}),u.closeCurrentTab(o)},e=()=>h(this,null,function*(){s.loading=!0;try{const{data:a}=yield ee(D(w({},s.pagination),{lessonPlanId:s.id}));s.dataList=a.rows,s.loading=!1,s.pagination.pageTotal=Number(a.total),s.dataList=a.rows||[]}catch(a){s.loading=!1,console.log(a)}}),B=a=>{i.warning({title:"\u8B66\u544A",content:`\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BFE\u4EF6${a.name}?`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>h(this,null,function*(){try{const j=yield N([a.id]);g.success("\u5220\u9664\u6210\u529F"),e()}catch(j){}})})},E=()=>{i.warning({title:"\u8B66\u544A",content:`\u662F\u5426\u786E\u8BA4\u6279\u91CF\u5220\u9664${c.value.length}\u4E2A\u8BFE\u4EF6?`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>h(this,null,function*(){try{const a=yield N(c.value);g.success("\u5220\u9664\u6210\u529F"),c.value=[],e()}catch(a){}})})};return I(()=>{e()}),()=>t("div",{class:"system-menu-container"},[t(le,{"on-back":()=>v(),title:p.value},null),t("div",{class:["section-container",_.wrap]},[t(k,{style:{paddingBottom:"12px"}},{default:()=>[t(y,{type:"primary",onClick:()=>{s.visiablePlan=!0}},{default:()=>[m("\u65B0\u589E\u8BFE\u4EF6")]}),t(y,{type:"error",disabled:c.value.length<1,onClick:()=>{E()}},{default:()=>[m("\u6279\u91CF\u5220\u9664")]})]}),t(K,{rowKey:a=>a.id,checkedRowKeys:c.value,"onUpdate:checkedRowKeys":a=>c.value=a,"onUpdate:checked-row-keys":d,scrollX:1e3,loading:s.loading,columns:f(),data:s.dataList},null),t(F,{page:s.pagination.page,"onUpdate:page":a=>s.pagination.page=a,pageSize:s.pagination.rows,"onUpdate:pageSize":a=>s.pagination.rows=a,pageTotal:s.pagination.pageTotal,"onUpdate:pageTotal":a=>s.pagination.pageTotal=a,onList:e,sync:!0},null)]),t(O,{show:s.visiablePlan,"onUpdate:show":a=>s.visiablePlan=a,preset:"dialog",showIcon:!1,title:"\u65B0\u589E\u8BFE\u4EF6",style:{width:"1000px"}},{default:()=>[t(ce,{onClose:()=>{s.visiablePlan=!1},onGetList:()=>{s.visiablePlan=!1,e()}},null)]})])}});export{Ce as default};
|