2 lines
9.0 KiB
JavaScript
2 lines
9.0 KiB
JavaScript
import{a as T,b as B,c as L}from"./LearningQuery-COiYAMTQ.js";import{_ as M,y as F,b as s,c as f,d as k,e as r,f as e,w as n,F as Y,i as h,t as H,q as N,x as C,D as E,p as G,j as A}from"./index-DjgxJhni.js";import{_ as P,a as V}from"./reset-C9wGeSio.js";import"./request-B06qJ2Sm.js";const W={name:"Userlogin",data(){return{tableData:[],formInline:{StudyName:"",StudyClass:""},drawerform:{RealName:"",StudyTime:"",RecordId:""},InlineForm:{PageIndex:1,PageSize:10},drwerFormPage:{PageIndex:1,PageSize:10},dialogFormVisible:!1,dialogFormCommen:!1,ruleForm:[],formData:{},setRecordId:"",StudyNameset:"",total:"",totalstudy:""}},created(){this.onload()},mounted(){this.tableHeight=window.innerHeight-390,this.screenHeight=window.innerHeight},props:[],methods:{async onload(l,o){const c={StudyName:this.formInline.StudyName,StudyClass:this.formInline.StudyClass,PageIndex:this.InlineForm.PageIndex,Status:"已发布",PageSize:10};await T(c).then(g=>{g.code==null?(this.tableData=[],this.total=0):(this.tableData=g.data.list,this.total=g.data.total)})},drwerSizeChange(l){console.log(`每页 ${l} 条`)},drwerCurrentChange(l){this.drwerFormPage.PageIndex=l,this.StudyNameset=localStorage.getItem("StudyNameset"),this.handleUpdate(localStorage.getItem("key"),localStorage.getItem("StudyNameset"))},handleSizeChange(l){console.log(`每页 ${l} 条`)},handleCurrentChange(l){this.InlineForm.PageIndex=l,this.onload()},handleSet(l){l==1?(this.formInline.StudyName="",this.formInline.StudyClass="",this.onload()):(this.drawerform.RealName="",this.drawerform.StudyTime="",this.StudyNameset=localStorage.getItem("StudyNameset"),this.handleUpdate(localStorage.getItem("key"),localStorage.getItem("StudyNameset")))},handleLook(l){l==1?this.onload():this.handleUpdate(localStorage.getItem("key"),localStorage.getItem("StudyNameset"))},async handleUpdate(l,o){this.dialogFormVisible=!0;const g={StudyId:l,RealName:this.drawerform.RealName,StudyTime:this.drawerform.StudyTime,PageIndex:this.drwerFormPage.PageIndex,PageSize:10};localStorage.setItem("key",l),localStorage.setItem("StudyNameset",o),this.StudyNameset=localStorage.getItem("StudyNameset"),await B(g).then(t=>{t.code==0?(this.ruleForm=t.data.list,this.totalstudy=t.data.total):(this.ruleForm=[],this.totalstudy=0)})},handleComment(l){this.formData.Comment="",this.dialogFormCommen=!0,this.setRecordId=l.RecordId},lookComment(l){this.formData.Comment=l.Comment,this.setRecordId=l.RecordId,this.dialogFormCommen=!0},async saveFormData(){const l=localStorage.getItem("ReviewerId"),o=localStorage.getItem("Reviewer"),c={RecordId:this.setRecordId,Comment:this.formData.Comment,ReviewerId:l,Reviewer:o};await L(c).then(g=>{g.state=="Fail"?F({message:"请填写评语.",type:"warning"}):(F({message:"保存成功.",type:"success"}),this.handleUpdate(localStorage.getItem("key"),localStorage.getItem("StudyNameset")),this.dialogFormCommen=!1)})}}},m=l=>(G("data-v-40ced788"),l=l(),A(),l),j={class:"PageContent"},q={class:"WebToolbar"},J={class:"FormComponent"},K={class:"ButtonAssembly"},O=m(()=>r("img",{src:P,alt:""},null,-1)),Q=m(()=>r("span",null,"查询",-1)),X=m(()=>r("img",{src:V,alt:""},null,-1)),Z=m(()=>r("span",null,"重置",-1)),$={class:"Tabulation"},ee=m(()=>r("div",{class:"actionBar"},[r("h1",null,"学习列表")],-1)),te={class:"ExaminationForm"},le={class:"WebToolbar"},oe={class:"FormComponent"},ae={class:"ButtonAssembly"},ne=m(()=>r("img",{src:P,alt:""},null,-1)),re=m(()=>r("span",null,"查询",-1)),se=m(()=>r("img",{src:V,alt:""},null,-1)),de=m(()=>r("span",null,"重置",-1)),me={class:"titleName"},ie=m(()=>r("p",{style:{float:"right"}},"不低于200字",-1)),ue={key:0,class:"dialog-footer"};function ge(l,o,c,g,t,d){const _=s("el-input"),p=s("el-form-item"),y=s("el-option"),R=s("el-select"),S=s("el-form"),i=s("el-button"),u=s("el-table-column"),I=s("el-table"),b=s("el-pagination"),D=s("el-date-picker"),x=s("el-divider"),w=s("el-dialog"),z=s("el-col"),U=s("el-row");return f(),k(Y,null,[r("div",j,[r("div",q,[r("div",J,[e(S,{inline:!0,model:t.formInline},{default:n(()=>[e(p,{label:"学习名称:",class:"demo-form-city"},{default:n(()=>[e(_,{modelValue:t.formInline.StudyName,"onUpdate:modelValue":o[0]||(o[0]=a=>t.formInline.StudyName=a),placeholder:"请输入学习名称",clearable:""},null,8,["modelValue"])]),_:1}),e(p,{label:"学习分类:"},{default:n(()=>[e(R,{modelValue:t.formInline.StudyClass,"onUpdate:modelValue":o[1]||(o[1]=a=>t.formInline.StudyClass=a),placeholder:"请选择学习分类",clearable:""},{default:n(()=>[e(y,{label:"变压器台架",value:"变压器台架"}),e(y,{label:"杆塔",value:"杆塔"}),e(y,{label:"线档",value:"线档"})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),r("div",K,[e(i,{style:{color:"#fff"},onClick:o[2]||(o[2]=a=>d.handleLook(1))},{default:n(()=>[O,Q]),_:1}),e(i,{style:{color:"#1d2129"},onClick:o[3]||(o[3]=a=>d.handleSet(1))},{default:n(()=>[X,Z]),_:1})])]),r("div",$,[ee,r("div",te,[e(I,{ref:"multipconstableRef",data:t.tableData,height:l.tableHeight,style:{width:"100%"},onSelectionChange:l.handleSelectionChange},{default:n(()=>[e(u,{property:"StudyName",label:"学习名称"}),e(u,{property:"StudyClass",label:"学习分类"}),e(u,{property:"StudySynopsis",label:"文件"}),e(u,{property:"CreateTime",label:"发布时间"}),e(u,{property:"",label:"操作"},{default:n(a=>[e(i,{onClick:v=>d.handleUpdate(a.row.StudyId,a.row.StudyName)},{default:n(()=>[h("学习情况查询")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data","height","onSelectionChange"]),e(b,{"current-page":t.InlineForm.PageIndex,"onUpdate:currentPage":o[4]||(o[4]=a=>t.InlineForm.PageIndex=a),"page-size":t.InlineForm.PageSize,small:l.small,disabled:l.disabled,background:l.background,layout:"total, prev, pager, next",total:t.total,onSizeChange:d.handleSizeChange,onCurrentChange:d.handleCurrentChange},null,8,["current-page","page-size","small","disabled","background","total","onSizeChange","onCurrentChange"])])])]),e(w,{modelValue:t.dialogFormVisible,"onUpdate:modelValue":o[10]||(o[10]=a=>t.dialogFormVisible=a),title:"学习情况查询",width:"950",center:"",style:{"margin-top":"17vh !important"}},{default:n(()=>[r("div",le,[r("div",oe,[e(S,{inline:!0,model:t.drawerform},{default:n(()=>[e(p,{label:"学员姓名:",class:"demo-form-city"},{default:n(()=>[e(_,{modelValue:t.drawerform.RealName,"onUpdate:modelValue":o[5]||(o[5]=a=>t.drawerform.RealName=a),placeholder:"请输入学员姓名",clearable:""},null,8,["modelValue"])]),_:1}),e(p,{label:"学习时间:",prop:"StudyTime"},{default:n(()=>[e(D,{modelValue:t.drawerform.StudyTime,"onUpdate:modelValue":o[6]||(o[6]=a=>t.drawerform.StudyTime=a),type:"date",format:"YYYY/MM/DD","value-format":"YY/MM/DD",placeholder:"请选择日期",size:"default"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),r("div",ae,[e(i,{style:{color:"#fff"},onClick:o[7]||(o[7]=a=>d.handleLook(2))},{default:n(()=>[ne,re]),_:1}),e(i,{style:{color:"#1d2129"},onClick:o[8]||(o[8]=a=>d.handleSet(2))},{default:n(()=>[se,de]),_:1})])]),r("h5",me,H(t.StudyNameset),1),e(x),e(I,{ref:"ruleFormRef",data:t.ruleForm,style:{height:"300px"}},{default:n(()=>[e(u,{property:"RealName",label:"学员姓名"}),e(u,{property:"Schedule",label:"学习进度"}),e(u,{property:"StudyTime",label:"学习时间"}),e(u,{label:"操作"},{default:n(a=>[r("span",null,[a.row.RecordId!=""&&a.row.Comment==""?(f(),N(i,{key:0,onClick:v=>d.handleComment(a.row)},{default:n(()=>[h("添加评语")]),_:2},1032,["onClick"])):C("",!0),a.row.Comment!=""?(f(),N(i,{key:1,onClick:v=>d.lookComment(a.row)},{default:n(()=>[h("查看评语")]),_:2},1032,["onClick"])):C("",!0)])]),_:1})]),_:1},8,["data"]),e(b,{"current-page":t.drwerFormPage.PageIndex,"onUpdate:currentPage":o[9]||(o[9]=a=>t.drwerFormPage.PageIndex=a),"page-size":t.drwerFormPage.PageSize,small:l.small,disabled:l.disabled,background:l.background,layout:"total, prev, pager, next",total:t.totalstudy,onSizeChange:d.drwerSizeChange,onCurrentChange:d.drwerCurrentChange,class:"pageFlex"},null,8,["current-page","page-size","small","disabled","background","total","onSizeChange","onCurrentChange"])]),_:1},8,["modelValue"]),e(w,{modelValue:t.dialogFormCommen,"onUpdate:modelValue":o[14]||(o[14]=a=>t.dialogFormCommen=a),title:t.formData.Comment?"查看评语":"添加评语",width:"600",center:"",style:{"margin-top":"17vh !important"}},{footer:n(()=>[t.formData.Comment==""?(f(),k("div",ue,[e(i,{onClick:o[12]||(o[12]=a=>t.dialogFormCommen=!1)},{default:n(()=>[h("取消")]),_:1}),e(i,{type:"primary",onClick:o[13]||(o[13]=E(a=>d.saveFormData(),["stop"]))},{default:n(()=>[h(" 保存 ")]),_:1})])):C("",!0)]),default:n(()=>[e(S,{style:{height:"400px"},model:t.formData},{default:n(()=>[e(U,null,{default:n(()=>[e(z,null,{default:n(()=>[e(p,{label:"评语",prop:"savinger"},{default:n(()=>[e(_,{type:"textarea",rows:12,placeholder:"请输入评语",modelValue:t.formData.Comment,"onUpdate:modelValue":o[11]||(o[11]=a=>t.formData.Comment=a),disabled:t.formData.Comment!="",maxlength:"500"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),ie]),_:1},8,["modelValue","title"])],64)}const _e=M(W,[["render",ge],["__scopeId","data-v-40ced788"]]);export{_e as default};
|