| 1 |
- import{d as C,O as V,o as L,w as M,g as e,i as z,I as _,T as P,h as n,F as T,B as S,S as R,X as N,W as j,a as D,f as b,R as X}from"./index-c299c57c.js";import{M as q}from"./index-1e1b8324.js";import{i as W}from"./icon-timer-ac089c62.js";import{i as Q}from"./icon-teacher-default-a5bec550.js";import{i as Y}from"./icon-edit-9f02937c.js";import{R as J,a as K,i as Z,M as $,b as ee,d as te}from"./deep-clone-a7bcc175.js";import{S as ae,b as k,a as d}from"./index-2204b924.js";import{C as B}from"./index-22846030.js";import{C as f}from"./index-77f9a36f.js";import{M as le}from"./index-8c891f16.js";import{M as se}from"./index-b1061cb4.js";import{e as m,p as v,a as oe,c as E}from"./constant-a400d214.js";import{M as ue}from"./index-53b55b81.js";import{c as A}from"./toolsValidate-2f258ec3.js";import{T as w}from"./index-82311ed3.js";import{C as re,a as ie}from"./index-dcc3173d.js";import{L as ne}from"./index-7b688128.js";import{I as F}from"./index-28b2d972.js";import{F as ce}from"./index-ad77dcff.js";import{D as pe,a as de}from"./index-9f3f6502.js";import{T as me,a as G}from"./index-9fe1275e.js";import"./use-tab-status-6de1841d.js";const ve="_searchContainer_1xtf8_14",he="_searchTitle_1xtf8_22",fe="_searchTypeGroup_1xtf8_30",ye="_searchTypeFlex_1xtf8_37",be="_searchTypeItem_1xtf8_40",Te="_success_1xtf8_49",Se="_error_1xtf8_52",ge="_cellGroup_1xtf8_73",xe="_timerCell_1xtf8_76",_e="_iconTimer_1xtf8_82",De="_timer_1xtf8_76",Ee="_eStatus_1xtf8_91",we="_iconFace_1xtf8_99",Ce="_iconEdit_1xtf8_107",Ve="_usernameCell_1xtf8_115",Le="_iconTeacher_1xtf8_121",Pe="_classname_1xtf8_127",ke="_photoList_1xtf8_137",Ae="_photo_1xtf8_137",Fe="_photoMore_1xtf8_160",Ge="_resultCell_1xtf8_175",Ue="_result_1xtf8_175",Ie="_typeGroup_1xtf8_185",Me="_operationCell_1xtf8_219",ze="_operationTitle_1xtf8_222",Be="_questionContent_1xtf8_239",He="_uploadGroup_1xtf8_246",Oe="_btnGroup_1xtf8_254",a={"patrol-evaluation-detail":"_patrol-evaluation-detail_1xtf8_1",searchContainer:ve,searchTitle:he,searchTypeGroup:fe,searchTypeFlex:ye,searchTypeItem:be,success:Te,error:Se,"is-active":"_is-active_1xtf8_68",cellGroup:ge,timerCell:xe,iconTimer:_e,timer:De,eStatus:Ee,iconFace:we,iconEdit:Ce,usernameCell:Ve,iconTeacher:Le,classname:Pe,photoList:ke,photo:Ae,photoMore:Fe,resultCell:Ge,result:Ue,typeGroup:Ie,operationCell:Me,operationTitle:ze,questionContent:Be,uploadGroup:He,btnGroup:Oe},Re="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAACB1BMVEUAAAD9xFL+xVH+xVH/x1D+xlL/zFD/01z/yE3/yEn/2GP+x1X+xlP+xlH/4nD/yE//5Hf/1lr/5Hb/1lr9xFD+x1X/4XP/3mv/5Hb/327/2mH/4nX/5Xb/4W7+yFT9xkz/5Hb/11r/zlP/4W7/6Hz/223/0V3+xlL+xlH/zkz/01b/0E/+xlL+yFb+ylj/2GD/01T/3m//0Ez+xFNpU0L/3Gj/22XwZmn/mKD/137/2F7/2WL/3Wv/327/3mz/1lv/1VrSrVH/1Fn/2GH/z03/zUn/2Xz/4HD/0FD/3nb/0lP/23j/2Hj9xFEwMDD/23v9x1b/nZn/3nn/4nX/3nP/0WDnglz+xk//zEdzWkP/v3f/4nL/3XD/1nD/1mv9uWb/2GX/1GX8lp7/pJH/rIr/tYb9p4b+q37/13X9sXT/2nP/1nP/03D/2W/oZmb31GLlbmLgwV3xlFz9wFnlwliyXVbpo1WuXFWkW1P3vlLApFDutU7+yUy/mEqciUqWhEqTdEaMekWJbERxVER2aEBmXD1fVjpVTjg/PDP+mKD/o5n+n5P/y4XSg4TShIL/0nn/vHLSk3H/x279zGf/zGXZYmLSYWD9yF3/0FrSpFrpl1npllm1XVj9yVbvrVSfWlLvuVH4y1Dxu0zEoEyPWEyNWEzxw0u7kUv5xUmBVkl9YkRyVER+ZEONaSqYAAAAM3RSTlMA/OnZsXkzIiEOBuviuFhX+Pjr693b19fNysnEpJhubGhoWEQhFRDq3tfNxL20s6SkTkZo8FSiAAACTklEQVQ4y3XQ9VvbQBjA8bcKLe6uY+67AUkKjCGlqVGqw1tguLu7zd3d9Y/cvW0Jpb19frjcJd/nuctBqJLC3MzkxMTkzNzCEmCLz3E47PZGyi46HDnxjORYeqtdz0saxdb0y2GJNq9VxERvMolOpyia9LxerLpwAkIcz2rAxORsqKxsoHA06U2utKiQJsNJE3NlmEGzLUaqtFlttGmritA2bEs72DGvih6mgsX1hJwP/lepmecrSlm85AUpBpQxiA0bISRGi3dYxvMjZf9ho1U+jbJHeHMZmlgbO/w6tjZxEMUCROnMvFeHdqyrOsmqdQcf7wilhiIvb67127du63Q4wXHbuo+RDSMVXOzgh1tafIIg7Fk3BMmGdU+orRU6BzoJiYPs9rtNHNf0WBAWd6cPo+ndRTr2cNytPhIDKf23OarpGkMLhzplkPSA83taHamHQ30EkvoDkasmQvVNDg0QSBmi0657j64zvLrfRQ8yJYMz7R0Pu7ubrzI1997pnSIn4ZKvw2g0rrOjdYLOQVFNO42+sKMVglQQZRgyGAyfmpm7LRCkBjjrM9JqhRX9IOgUABQbXHXUJr7d+vZh7u3M3PzXP7jalBGUD9Tplxh9//tr5lm55Pn81u+PBMm1GF2pq6unPo+XHzG+RPwSwE+5XI9+ukMb90KgUUKARmHxLN+gltyjgWLU/Z4EKDQQFB1LlxaLx+OxzL6enHwzKyNBsdEgiVYQJgU2Eo2S1Sg1cFSCPDyRJ0CkgtTQJLUA2NSqOLnMYpHJ41RqCPEP2g4GwjKgkvQAAAAASUVORK5CYII=",Ne=C({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5,6]},isLink:{type:Boolean,default:!0}},setup(r,{slots:l}){const o=V({loading:!1});return L(()=>{o.loading=r.show}),M(()=>r.show,()=>{o.loading=r.show}),()=>e(ae,{loading:o.loading,style:"flex-wrap: wrap"},{template:()=>e("div",{style:{height:"calc(100vh - var(--header-height) - var(--van-tabs-line-height))",overflow:"hidden",width:"100%"}},[r.showCount.map(()=>e(B,{inset:!0,class:a.cellGroup},{default:()=>[e(f,{center:!0,class:a.timerCell,border:!1},{icon:()=>e(k,{class:a.iconTimer},null),title:()=>e("div",{class:a.timer,style:{width:"120px"}},[e(d,null,null)]),value:()=>e("div",{class:a.eStatus},[e(d,{rowWidth:"50%"},null)])}),e(f,{center:!0,class:a.usernameCell},{icon:()=>e(k,{class:a.iconTeacher},null),title:()=>e("div",null,[e("div",{class:a.classname},[e(d,{rowWidth:"50%"},null)]),e("div",{class:a.name,style:{marginTop:"4px"}},[e(d,{rowWidth:"50%"},null)])]),value:()=>e("div",{class:a.photoList},[e(d,{class:a.photo},null),e(d,{class:a.photo},null),e(d,{class:a.photo},null)])})]}))]),default:()=>l.default&&l.default()})}});function U(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!N(r)}const I=C({name:"detail-list",props:{type:{type:String,default:""},evaluateStatus:{type:String,default:""},problemType:{type:String,default:""},courseType:{type:String,default:""}},setup(r){const l=j(),o=V({isClick:!1,imageShow:!1,startPosition:0,imagePreview:[],listState:{dataShow:!0,loading:!0,finished:!1,refreshing:!1},params:{evaluateFlag:r.type==="Evaluated",evaluateStatus:"",problemType:"",courseType:"",startTime:l.query.date||"",endTime:l.query.date||"",page:1,rows:20},changeType:null,questionType:null,evaluateList:[],problemTypeList:[],list:[]}),p=z([]),u=()=>{o.params.page=1,g()},g=async()=>{try{if(o.isClick)return;o.isClick=!0;const{data:t}=await D.post("/api-web/coursePatrolEvaluation/page",{data:o.params}),i=t||{},c=i.rows||[];c.forEach(s=>{const h=s.attachmentUrl?s.attachmentUrl.split(","):[],y=s.problemType?s.problemType.split(","):[];s.problemTypeList=y,s.submitEvaluateStatus=s.evaluateStatus||"",s.submitProblemType=y||[],s.submitProblemDesc=s.problemDesc||"",s.submitVideoList=[],s.submitImgList=[],h.forEach(x=>{A(x,"image")?s.submitImgList.push(x):s.submitVideoList.push(x)}),s.attachmentUrlList=h||[],s.evaluateFlag||(s.isEdit=!0)}),o.listState.refreshing?p.value=c||[]:p.value=p.value.concat(c||[]),o.listState.finished=i.pageNo>=i.totalPage,o.params.page=i.pageNo+1}catch(t){o.listState.finished=!0}finally{o.listState.dataShow=p.value.length>0,o.listState.refreshing=!1,o.listState.loading=!1,o.isClick=!1}},H=async t=>{try{const i=[...t.submitImgList,...t.submitVideoList];if(!t.submitEvaluateStatus){b("请选择评价");return}if(t.submitEvaluateStatus==="UNQUALIFIED"){if(!t.submitProblemType){b("请选择问题类型");return}if(!t.submitProblemDesc){b("请输入问题描述");return}if((t.submitProblemDesc.length<3||t.submitProblemDesc.length<=50)&&i.length<=0){b("请上传附件");return}}const c={id:t.id,evaluateStatus:t.submitEvaluateStatus,problemType:t.submitProblemType.join(","),problemDesc:t.submitProblemDesc,attachmentUrl:i.join(",")};t.evaluateFlag?await D.post("/api-web/coursePatrolEvaluation/update",{hideLoading:!1,data:c}):await D.post("/api-web/coursePatrolEvaluation/save",{hideLoading:!1,data:{...c,courseScheduleId:t.courseScheduleId}}),p.value=[],u()}catch(i){}},O=(t,i)=>{o.imagePreview=te(t),o.imageShow=!0,o.startPosition=i};return L(()=>{for(const t in m)Object.prototype.hasOwnProperty.call(m,t)&&o.evaluateList.push({text:m[t],value:t});for(const t in v)Object.prototype.hasOwnProperty.call(v,t)&&o.problemTypeList.push({text:v[t],value:t});g()}),M(()=>[r.evaluateStatus,r.problemType,r.courseType],()=>{o.params.evaluateStatus=r.evaluateStatus,o.params.problemType=r.problemType,o.params.courseType=r.courseType,p.value=[],u()}),()=>e("div",null,[e(Ne,{show:o.listState.loading,"onUpdate:show":t=>o.listState.loading=t},{default:()=>[e(se,{modelValue:o.listState.refreshing,"onUpdate:modelValue":t=>o.listState.refreshing=t,onRefresh:()=>u(),style:{minHeight:"calc(100vh - var(--header-height) - var(--van-tabs-line-height))"}},{default:()=>[e(ne,{finished:o.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:g,offset:100,immediateCheck:!1},{default:()=>[o.listState.dataShow?p.value.map(t=>{let i,c;return e(B,{inset:!0,class:a.cellGroup},{default:()=>[e(f,{center:!0,class:a.timerCell,border:!1},{icon:()=>e(_,{name:W,class:a.iconTimer},null),title:()=>e("div",{class:a.timer},[P(t.startClassTime).format("YYYY-MM-DD HH:mm"),n("~"),P(t.endClassTime).format("HH:mm")]),value:()=>e("div",{class:a.eStatus,onClick:()=>{t.isEdit=!0}},[t.evaluateFlag?e(T,null,[e(_,{name:Re,class:a.iconFace},null),e("span",{class:[a.sLevel,a.success]},[m[t.evaluateStatus]]),e(_,{name:Y,class:a.iconEdit},null)]):e("span",{class:[a.sLevel,t.courseStatus==="UNDERWAY"?a.success:""]},[oe[t.courseStatus]])])}),e(f,{center:!0,class:a.usernameCell},{icon:()=>e(F,{src:t.teacherAvatar||Q,class:a.iconTeacher,fit:"cover"},null),title:()=>e("div",null,[e("div",{class:a.classname},[t.courseName]),e("div",{class:a.name},[t.teacherName])]),value:()=>e("div",{class:a.photoList},[t.attachmentUrlList.map((s,h)=>h<3&&e("div",{class:a.photo,onClick:y=>{y.stopPropagation(),y.preventDefault(),O(t.attachmentUrlList,h)}},[A(s,"image")?e(F,{src:s+"@base@tag=imgScale&w=120",fit:"cover"},null):e("video",{src:s+"#t=1,4",controls:!1},null),t.attachmentUrlList.length>3&&h===2?e("div",{class:a.photoMore},[n("+"),t.attachmentUrlList.length-3]):""]))])}),(t.submitProblemType.length>0||t.problemDesc)&&!t.isEdit?e(f,{center:!0,class:a.resultCell},{default:()=>[t.problemTypeList.length>0?e("div",{class:a.typeGroup},[t.problemTypeList.map(s=>e(w,{type:"primary",plain:!0},{default:()=>[v[s]]}))]):"",t.problemDesc?e("div",{class:a.result},[t.problemDesc]):""]}):"",t.isEdit&&t.courseStatus!="NOT_START"?e(f,{center:!0,class:a.operationCell},{default:()=>[e(J,{class:a.typeGroup,modelValue:t.submitEvaluateStatus,"onUpdate:modelValue":s=>t.submitEvaluateStatus=s},U(i=o.evaluateList.map(s=>e(w,{type:t.submitEvaluateStatus===s.value?"primary":"default",plain:!0},{default:()=>[e(K,{name:s.value},null),s.text]})))?i:{default:()=>[i]}),t.submitEvaluateStatus==="UNQUALIFIED"?e(T,null,[e("div",{class:a.operationTitle},[n("问题类型")]),e(re,{class:a.typeGroup,modelValue:t.submitProblemType,"onUpdate:modelValue":s=>t.submitProblemType=s},U(c=o.problemTypeList.map(s=>e(w,{type:t.submitProblemType.includes(s.value)?"primary":"default",plain:!0},{default:()=>[e(ie,{name:s.value},null),s.text]})))?c:{default:()=>[c]}),e("div",{class:a.operationTitle},[n("问题描述")]),e(ce,{type:"textarea",rows:2,modelValue:t.submitProblemDesc,"onUpdate:modelValue":s=>t.submitProblemDesc=s,maxlength:50,class:a.questionContent,placeholder:"请输入问题描述",border:!1},null)]):"",e("div",{class:a.operationTitle},[n("上传附件")]),e("div",{class:a.uploadGroup},[e(le,{uploadIcon:Z,maxCount:5,native:!0,modelValue:t.submitImgList,"onUpdate:modelValue":s=>t.submitImgList=s},{default:()=>[e($,{uploadIcon:ee,uploadType:"VIDEO",accept:".mp4",native:!0,maxCount:3,modelValue:t.submitVideoList,"onUpdate:modelValue":s=>t.submitVideoList=s},null)]})]),e("div",{class:a.btnGroup},[t.evaluateFlag?e(S,{type:"default",round:!0,block:!0,onClick:()=>t.isEdit=!1},{default:()=>[n("取消")]}):"",e(S,{type:"primary",round:!0,block:!0,onClick:()=>H(t)},{default:()=>[n("确认")]})])]}):""]})}):e(R,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]}),e(ue,{teleport:"body",show:o.imageShow,"onUpdate:show":t=>o.imageShow=t,images:o.imagePreview,startPosition:o.startPosition},null)])}}),dt=C({name:"patrol-evaluation-detail",setup(){const r=z(),l=V({heightV:0,active:"NotEvaluated",listState:{loading:!0},dropDownValue:{evaluateStatus:"",problemType:"",evaluateStatus1:"",courseType:""},dropDownValueSelect:{evaluateStatus:"",problemType:"",evaluateStatus1:"",courseType:""},eveluationType:[{text:"全部评价",value:""}],questionType:[{text:"全部问题",value:""}],courseType:[{text:"全部类型",value:""}]}),o=u=>{u.value&&u.value.toggle()},p=()=>{l.active==="Evaluated"?(l.dropDownValue.evaluateStatus=l.dropDownValueSelect.evaluateStatus,l.dropDownValue.problemType=l.dropDownValueSelect.problemType):l.active==="NotEvaluated"&&(l.dropDownValue.evaluateStatus1=l.dropDownValueSelect.evaluateStatus1,l.dropDownValue.courseType=l.dropDownValueSelect.courseType),o(r)};return L(()=>{for(const u in m)Object.prototype.hasOwnProperty.call(m,u)&&l.eveluationType.push({text:m[u],value:u});for(const u in v)Object.prototype.hasOwnProperty.call(v,u)&&l.questionType.push({text:v[u],value:u});for(const u in E)Object.prototype.hasOwnProperty.call(E,u)&&l.courseType.push({text:E[u],value:u})}),()=>e("div",{class:a["patrol-evaluation-detail"]},[e(q,{position:"top",onBarHeight:u=>{l.heightV=u}},{default:()=>[e(X,null,{right:()=>e(pe,{class:a.patrolDetailDropDown,closeOnClickOutside:!1},{default:()=>[e(de,{title:"筛选",ref:r,teleport:"body",onOpen:()=>{l.dropDownValueSelect={...l.dropDownValue}}},{default:()=>[e("div",{class:a.searchContainer},[l.active==="Evaluated"?e(T,null,[e("div",{class:a.searchTitle},[n("评价类型")]),e("div",{class:[a.searchTypeGroup,a.searchTypeFlex]},[l.eveluationType.map(u=>e("div",{class:[a.searchTypeItem,l.dropDownValueSelect.evaluateStatus===u.value&&a["is-active"]],onClick:()=>{l.dropDownValueSelect.evaluateStatus=u.value}},[u.text]))]),e("div",{class:a.searchTitle},[n("问题类型")]),e("div",{class:[a.searchTypeGroup,a.searchTypeFlex]},[l.questionType.map(u=>e("div",{class:[a.searchTypeItem,l.dropDownValueSelect.problemType===u.value&&a["is-active"]],onClick:()=>{l.dropDownValueSelect.problemType=u.value}},[u.text]))])]):null,l.active==="NotEvaluated"?e(T,null,[e("div",{class:a.searchTitle},[n("评价类型")]),e("div",{class:[a.searchTypeGroup,a.searchTypeFlex]},[l.eveluationType.map(u=>e("div",{class:[a.searchTypeItem,l.dropDownValueSelect.evaluateStatus1===u.value&&a["is-active"]],onClick:()=>{l.dropDownValueSelect.evaluateStatus1=u.value}},[u.text]))]),e("div",{class:a.searchTitle},[n("课程类型")]),e("div",{class:[a.searchTypeGroup,a.searchTypeFlex]},[l.courseType.map(u=>e("div",{class:[a.searchTypeItem,l.dropDownValueSelect.courseType===u.value&&a["is-active"]],onClick:()=>{l.dropDownValueSelect.courseType=u.value}},[u.text]))])]):null]),e("div",{class:["btnGroupPopup","van-hairline--top"]},[e(S,{round:!0,onClick:()=>o(r)},{default:()=>[n("取消")]}),e(S,{type:"primary",round:!0,onClick:p},{default:()=>[n("确定")]})])]})]})})]}),e(me,{active:l.active,"onUpdate:active":u=>l.active=u,offsetTop:l.heightV,sticky:!0,lazyRender:!0,swipeable:!0},{default:()=>[e(G,{name:"NotEvaluated",title:"未评价"},{default:()=>[e(I,{type:"NotEvaluated",evaluateStatus:l.dropDownValue.evaluateStatus1,courseType:l.dropDownValue.courseType},null)]}),e(G,{name:"Evaluated",title:"已评价"},{default:()=>[e(I,{type:"Evaluated",evaluateStatus:l.dropDownValue.evaluateStatus,problemType:l.dropDownValue.problemType},null)]})]})])}});export{dt as default};
|