12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6950dd8c"],{"37b8":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"question-bank"},[e("div",{staticClass:"top"},[e("div",{staticClass:"top-right flex-align"},[e("div"),e("div",{staticClass:"flex"},[e("a-select",{staticStyle:{width:"300px","margin-right":"8px"},attrs:{mode:"multiple",placeholder:"选择学科"},on:{change:t.subjectChange}},t._l(t.$store.state.baseInfo.SubjectsGroup,(function(a,i){return e("a-select-opt-group",{key:i},[e("span",{attrs:{slot:"label"},slot:"label"},[t._v(t._s(i))]),t._l(a,(function(a){return e("a-select-option",{key:a.id,attrs:{value:a.id}},[t._v(" "+t._s(a.name)+" ")])}))],2)})),1),e("a-select",{staticStyle:{width:"260px","margin-right":"16px"},attrs:{"default-value":[],placeholder:"选择状态"},on:{change:t.statusChange}},[e("a-select-option",{key:""},[t._v("全部")]),e("a-select-option",{key:0},[t._v("组题中")]),e("a-select-option",{key:1},[t._v("等待生成")]),e("a-select-option",{key:2},[t._v("生成中")]),e("a-select-option",{key:3},[t._v("已生成")]),e("a-select-option",{key:4},[t._v("生成失败")])],1),e("a-input-search",{staticStyle:{width:"300px"},attrs:{placeholder:"搜索试卷","enter-button":""},on:{search:t.onSearch}})],1)])]),e("div",{staticClass:"main"},[e("div",{staticClass:"main-right"},[e("a-table",{attrs:{rowSelection:{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange},columns:t.columns,loading:t.loading,dataSource:t.data,size:"small",rowKey:t=>t.id,pagination:t.pagination},on:{change:t.handleChange},scopedSlots:t._u([{key:"creationTime",fn:function(e){return[t._v(" "+t._s(t._f("sliceTime")(e))+" ")]}},{key:"status",fn:function(a){return[e("myStatus",{attrs:{num:a,strs:t.strs}})]}},{key:"action",fn:function(a,i){return[e("a",{staticClass:"m-r8",on:{click:function(e){return t.toPath(i)}}},[t._v("详情")]),e("a",{staticClass:"m-r8",on:{click:function(e){return t._PaperDelete(i)}}},[t._v("删除")]),4==i.status?e("a",{staticClass:"m-r8",on:{click:function(e){return t.showModal(i)}}},[t._v("重新生成")]):t._e(),e("a",{staticClass:"m-r8",on:{click:function(e){return t._FileReadFileLast(i)}}},[t._v("下载最新")]),e("a",{staticClass:"m-r8",on:{click:function(e){return t._FileReadFile(i)}}},[t._v("下载历史")])]}}])})],1)]),e("PaperProduce",{ref:"PaperProduce"}),e("Down",{ref:"Down"})],1)},s=[],n=(a("14d9"),a("d58c")),o=a("5f70"),r=a("4ec3"),l=a("5622"),c=a("ba62");const d=[{title:"试卷名称",dataIndex:"name",key:"name",scopedSlots:{customRender:"name"},ellipsis:!0,width:280},{title:"学科",dataIndex:"paperDisciplines",key:"paperDisciplines",scopedSlots:{customRender:"paperDisciplines"},width:100,ellipsis:!0},{title:"题量",dataIndex:"paperQuestionCount",key:"paperQuestionCount",scopedSlots:{customRender:"paperQuestionCount"},width:80},{title:"分数",key:"totalScore",dataIndex:"totalScore",scopedSlots:{customRender:"totalScore"},width:80},{title:"创建时间",key:"creationTime",dataIndex:"creationTime",scopedSlots:{customRender:"creationTime"},ellipsis:!0,width:140},{title:"状态",key:"status",dataIndex:"status",scopedSlots:{customRender:"status"},ellipsis:!0,width:100},{title:"操作",key:"action",dataIndex:"action",scopedSlots:{customRender:"action"},width:200}];let u=[{title:"组题中",index:0},{title:"等待生成",index:1},{title:"生成中",index:2},{title:"成功",index:4},{title:"生成失败",index:3}];var h={mixins:[n["a"]],components:{myStatus:o["a"],PaperProduce:l["a"],Down:c["a"]},data(){return{columns:d,strs:u,current:["mail"],loading:!1,selectedRowKeys:[],data:[],Status:null,KeyWord:"",Disciplines:[]}},mounted(){this.$store.dispatch("DisciplineGetList"),this._PaperGetList()},methods:{_FileReadFile(t){this.$router.push({name:"examPaperRecord",query:{testName:t.name,testID:t.id}})},_FileReadFileLast(t){this.loading=!0,Object(r["I"])({id:t.id}).then(t=>{console.log(t,"试卷历史最后一条"),this.loading=!1,this.$refs.Down.showModal(t)}).catch(t=>{this.loading=!1})},showModal(t={}){console.log(t,"record"),this.$refs.PaperProduce.showModal(t.id)},_PaperDelete(t){let e=this;this.$confirm({okText:"确认",cancelText:"取消",mask:!1,title:`您确认要删除"${t.name}"试卷吗?`,onOk(){let a={id:t.id};Object(r["Y"])(a).then(t=>{e.$message.success("删除成功!"),e._PaperGetList()}).catch(t=>{})}})},_PaperGetList(){this.loading=!0;let t={Disciplines:this.Disciplines,Status:this.Status,KeyWord:this.KeyWord,SkipCount:(this.pagination.current-1)*this.pagination.pageSize,MaxResultCount:this.pagination.pageSize};Object(r["ab"])(t).then(t=>{this.data=t.items,this.pagination.total=t.totalCount,this.loading=!1}).catch(t=>{this.loading=!1})},onSearch(t){this.KeyWord=t;const e={...this.pagination};e.current=1,this.pagination=e,this._PaperGetList()},callback(t){console.log(t)},onSelectChange(t){this.selectedRowKeys=t},handleChange(t,e,a){const i={...this.pagination};i.current=t.current,this.pagination=i,this._PaperGetList()},subjectChange(t){console.log(t),this.Disciplines=t;const e={...this.pagination};e.current=1,this.pagination=e,this._PaperGetList()},statusChange(t){console.log(t),this.Status=t;const e={...this.pagination};e.current=1,this.pagination=e,this._PaperGetList()},toPath(t){this.$router.push({name:"examPaperPreview",query:{examId:t.id}})}}},p=h,m=(a("67b9"),a("2877")),f=Object(m["a"])(p,i,s,!1,null,"7385969c",null);e["default"]=f.exports},5622:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{attrs:{visible:t.visible,confirmLoading:t.confirmLoading,width:"900px",maskClosable:!1,destroyOnClose:!0},on:{ok:t.handOK,cancel:t.handCancle}},[e("template",{slot:"title"},[t._v(" 生成试卷 ")]),e("div",{staticClass:"modal-box",staticStyle:{padding:"0"}},[e("a-form",{attrs:{form:t.form,layout:"horizontal"},on:{submit:t.handOK}},[e("a-form-item",{attrs:{label:"纸张大小:","label-col":{span:4},"wrapper-col":{span:20}}},[e("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["paperSize",{rules:[{required:!0,message:"请选择纸张大小!"}]}],expression:"['paperSize',{rules: [{ required: true, message: '请选择纸张大小!' }]\n }]"}]},[e("a-radio",{attrs:{value:0}},[t._v("A4竖向")]),e("a-radio",{attrs:{value:1}},[t._v("A3横向")])],1)],1)],1)],1)],2)],1)},s=[],n=a("4ec3"),o={data(){return{confirmLoading:!1,visible:!1,form:this.$form.createForm(this),examId:""}},mounted(){},methods:{showModal(t){this.examId=t,this.visible=!0},handOK(t){t.preventDefault(),this.form.validateFields((t,e)=>{if(!t){this.confirmLoading=!0,console.log(e,"values");let t={paperId:this.examId};Object(n["cb"])(e,t).then(t=>{this.$message.success("操作成功,可在试卷管理列表中查看!"),this.confirmLoading=!1,this.handCancle()}).catch(t=>{this.confirmLoading=!1})}})},handCancle(){this.visible=!1}}},r=o,l=a("2877"),c=Object(l["a"])(r,i,s,!1,null,"4946fc6e",null);e["a"]=c.exports},"5f70":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"status-box"},[e("div",{staticClass:"box flex-items"},[e("div",{class:"dot"+t.strs[t.num].index}),e("span",[t._v(t._s(t.strs[t.num].title))])])])},s=[],n={props:{num:{type:Number,default:0},strs:{type:Array,default:()=>[{title:"待解析",index:0},{title:"解析中",index:1},{title:"解析成功,待导入",index:2},{title:"解析失败",index:3},{title:"成功",index:4}]}},data(){return{}},computed:{},mounted(){},methods:{}},o=n,r=(a("c60d"),a("2877")),l=Object(r["a"])(o,i,s,!1,null,"4d9680c7",null);e["a"]=l.exports},"67b9":function(t,e,a){"use strict";a("b516")},"6a2e":function(t,e,a){},"877b":function(t,e,a){"use strict";a("fb99")},b516:function(t,e,a){},ba62:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{attrs:{visible:t.visible,confirmLoading:t.confirmLoading,width:"900px",maskClosable:!1,destroyOnClose:!0},on:{ok:t.handOK,cancel:t.handCancle}},[e("template",{slot:"title"},[t._v(" 下载 ")]),e("div",{staticClass:"modal-box",staticStyle:{padding:"0"}},[e("a-form",{attrs:{form:t.form,layout:"horizontal"},on:{submit:t.handOK}},[e("a-form-item",{attrs:{label:"文件类型:","label-col":{span:4},"wrapper-col":{span:20}}},[e("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["id",{rules:[{required:!0,message:"请选择下载的文件类型!"}]}],expression:"['id',{rules: [{ required: true, message: '请选择下载的文件类型!' }]\n }]"}],staticStyle:{display:"flex","flex-direction":"column"}},[t.record.fileId?e("a-radio",{attrs:{value:"fileId"}},[t._v("试卷文件")]):t._e(),t.record.fullPaperFileId?e("a-radio",{attrs:{value:"fullPaperFileId"}},[t._v("试卷包含答案解析文件")]):t._e(),t.record.answerFileId?e("a-radio",{attrs:{value:"answerFileId"}},[t._v("试卷答案解析")]):t._e(),t.record.answerSheetFileId?e("a-radio",{attrs:{value:"answerSheetFileId"}},[t._v("答题卡")]):t._e()],1)],1)],1)],1)],2)],1)},s=[],n=a("4ec3"),o=a("b893"),r={data(){return{confirmLoading:!1,visible:!1,form:this.$form.createForm(this),record:{}}},mounted(){},methods:{showModal(t){this.record=t,this.visible=!0},handOK(t){t.preventDefault(),this.form.validateFields((t,e)=>{if(!t){this.confirmLoading=!0,console.log(e,"values");let t={id:this.record[e.id]};console.log(t,"data"),Object(n["C"])(t).then(t=>{Object(o["c"])(t),this.confirmLoading=!1,this.handCancle()}).catch(t=>{this.confirmLoading=!0})}})},handCancle(){this.visible=!1}}},l=r,c=(a("877b"),a("2877")),d=Object(c["a"])(l,i,s,!1,null,"1ac3c43a",null);e["a"]=d.exports},c60d:function(t,e,a){"use strict";a("6a2e")},d58c:function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));const i={data(){return{pagination:{current:1,total:0,defaultPageSize:15,pageSize:15,showTotal:t=>`共 ${t} 条数据`,showSizeChanger:!0,pageSizeOptions:["15","20","30","50","100"],onShowSizeChange:(t,e)=>{console.log(t,e),this.pagination.pageSize=e,this.pagination.current=t}}}},methods:{TableChange(t){const e={...this.pagination};e.current=t.current,this.pagination=e}}}},fb99:function(t,e,a){}}]);
- //# sourceMappingURL=chunk-6950dd8c.14a53901.js.map
|