You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
12 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d3db8"],{"5f0a":function(e,t,l){"use strict";l.r(t);var i=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"app-container"},[l("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[l("el-form-item",{attrs:{label:"直播标题",prop:"liveTitle"}},[l("el-input",{attrs:{placeholder:"请输入直播标题",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.liveTitle,callback:function(t){e.$set(e.queryParams,"liveTitle",t)},expression:"queryParams.liveTitle"}})],1),l("el-form-item",{attrs:{label:"发布状态",prop:"liveStatus"}},[l("el-select",{attrs:{placeholder:"请选择发布状态",clearable:""},model:{value:e.queryParams.liveStatus,callback:function(t){e.$set(e.queryParams,"liveStatus",t)},expression:"queryParams.liveStatus"}},e._l(e.dict.type.tcm_pub_status,(function(e){return l("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),l("el-form-item",[l("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),l("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),l("el-row",{staticClass:"mb8",attrs:{gutter:10}},[l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["tcm:live:add"],expression:"['tcm:live:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["tcm:live:edit"],expression:"['tcm:live:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["tcm:live:remove"],expression:"['tcm:live:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),l("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.liveList},on:{"selection-change":e.handleSelectionChange}},[l("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),l("el-table-column",{attrs:{label:"直播标题",align:"center",prop:"liveTitle",width:"300"}}),l("el-table-column",{attrs:{label:"开始时间",align:"center",prop:"liveStartTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("span",[e._v(e._s(e.parseTime(t.row.liveStartTime,"{y}-{m}-{d} {h}:{i}:{s}")))])]}}])}),l("el-table-column",{attrs:{label:"结束时间",align:"center",prop:"liveEndTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("span",[e._v(e._s(e.parseTime(t.row.liveEndTime,"{y}-{m}-{d} {h}:{i}:{s}")))])]}}])}),l("el-table-column",{attrs:{label:"发布状态",align:"center",prop:"liveStatus"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("dict-tag",{attrs:{options:e.dict.type.tcm_pub_status,value:t.row.liveStatus}})]}}])}),l("el-table-column",{attrs:{label:"直播标签",align:"center",prop:"liveTags"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("dict-tag",{attrs:{options:e.dict.type.tcm_cours_tag,value:t.row.liveTags}})]}}])}),l("el-table-column",{attrs:{label:"观看次数",align:"center",prop:"liveHit"}}),l("el-table-column",{attrs:{label:"自定义顺序",align:"center",prop:"liveSort"}}),l("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["tcm:live:edit"],expression:"['tcm:live:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(l){return e.handleUpdate(t.row)}}},[e._v("修改")]),l("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["tcm:live:remove"],expression:"['tcm:live:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(l){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),l("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),l("el-dialog",{attrs:{title:e.title,visible:e.open,width:"70%","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[l("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[l("el-form-item",{attrs:{label:"直播标题",prop:"liveTitle"}},[l("el-input",{attrs:{placeholder:"请输入直播标题"},model:{value:e.form.liveTitle,callback:function(t){e.$set(e.form,"liveTitle",t)},expression:"form.liveTitle"}})],1),l("el-row",{attrs:{gutter:20}},[l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"开始时间",prop:"liveStartTime"}},[l("el-date-picker",{attrs:{clearable:"",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择开始时间"},model:{value:e.form.liveStartTime,callback:function(t){e.$set(e.form,"liveStartTime",t)},expression:"form.liveStartTime"}})],1)],1),l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"结束时间",prop:"liveEndTime"}},[l("el-date-picker",{attrs:{clearable:"",type:"datetime","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择结束时间"},model:{value:e.form.liveEndTime,callback:function(t){e.$set(e.form,"liveEndTime",t)},expression:"form.liveEndTime"}})],1)],1)],1),l("el-row",{attrs:{gutter:20}},[l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"关键字",prop:"liveKeyword"}},[l("el-input",{attrs:{placeholder:"请输入关键字"},model:{value:e.form.liveKeyword,callback:function(t){e.$set(e.form,"liveKeyword",t)},expression:"form.liveKeyword"}})],1)],1),l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"直播简介",prop:"liveDescp"}},[l("el-input",{attrs:{type:"textarea",placeholder:"请输入直播简介"},model:{value:e.form.liveDescp,callback:function(t){e.$set(e.form,"liveDescp",t)},expression:"form.liveDescp"}})],1)],1)],1),l("el-form-item",{attrs:{label:"直播详情",prop:"liveDetail"}},[l("editor",{attrs:{"min-height":192},model:{value:e.form.liveDetail,callback:function(t){e.$set(e.form,"liveDetail",t)},expression:"form.liveDetail"}})],1),l("el-row",{attrs:{gutter:20}},[l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"发布状态",prop:"liveStatus"}},[l("el-select",{attrs:{placeholder:"请选择发布状态"},model:{value:e.form.liveStatus,callback:function(t){e.$set(e.form,"liveStatus",t)},expression:"form.liveStatus"}},e._l(e.dict.type.tcm_pub_status,(function(e){return l("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"自定义顺序",prop:"liveSort"}},[l("el-input",{attrs:{placeholder:"请输入自定义顺序"},model:{value:e.form.liveSort,callback:function(t){e.$set(e.form,"liveSort",t)},expression:"form.liveSort"}})],1)],1)],1),l("el-row",{attrs:{gutter:20}},[l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"直播标签",prop:"liveTags"}},[l("el-select",{attrs:{placeholder:"请选择发布状态"},model:{value:e.form.liveTags,callback:function(t){e.$set(e.form,"liveTags",t)},expression:"form.liveTags"}},e._l(e.dict.type.tcm_cours_tag,(function(e){return l("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),l("el-col",{attrs:{span:12,xs:24}},[l("el-form-item",{attrs:{label:"观看次数",prop:"liveHit"}},[l("el-input",{attrs:{placeholder:"请输入观看次数"},model:{value:e.form.liveHit,callback:function(t){e.$set(e.form,"liveHit",t)},expression:"form.liveHit"}})],1)],1)],1),l("el-form-item",{attrs:{label:"直播缩图",prop:"liveImg"}},[l("image-upload",{model:{value:e.form.liveImg,callback:function(t){e.$set(e.form,"liveImg",t)},expression:"form.liveImg"}})],1),l("el-form-item",{attrs:{label:"直播链接",prop:"liveLink"}},[l("el-input",{attrs:{placeholder:"请输入直播链接"},model:{value:e.form.liveLink,callback:function(t){e.$set(e.form,"liveLink",t)},expression:"form.liveLink"}})],1),l("el-form-item",{attrs:{label:"备注",prop:"remark"}},[l("el-input",{attrs:{type:"textarea",placeholder:"请输入备注"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),l("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),l("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},a=[],r=l("5530"),o=(l("d81d"),l("b775"));function n(e){return Object(o["a"])({url:"/tcm/live/list",method:"get",params:e})}function s(e){return Object(o["a"])({url:"/tcm/live/"+e,method:"get"})}function c(e){return Object(o["a"])({url:"/tcm/live",method:"post",data:e})}function m(e){return Object(o["a"])({url:"/tcm/live",method:"put",data:e})}function u(e){return Object(o["a"])({url:"/tcm/live/"+e,method:"delete"})}var p={name:"Live",dicts:["tcm_pub_status","tcm_cours_tag"],data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,liveList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,liveTitle:null,liveStartTime:null,liveEndTime:null,liveStatus:null},form:{},rules:{liveTitle:[{required:!0,message:"直播标题不能为空",trigger:"blur"}],liveStatus:[{required:!0,message:"发布状态不能为空",trigger:"change"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,n(this.queryParams).then((function(t){e.liveList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={liveId:null,liveTitle:null,liveStartTime:null,liveEndTime:null,liveKeyword:null,liveDescp:null,liveDetail:null,liveStatus:"0",liveSort:0,liveTags:null,liveHit:0,liveImg:null,liveLink:null,remark:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.liveId})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加直播信息"},handleUpdate:function(e){var t=this;this.reset();var l=e.liveId||this.ids;s(l).then((function(e){t.form=e.data,t.open=!0,t.title="修改直播信息"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.liveId?m(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):c(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,l=e.liveId||this.ids;this.$modal.confirm('是否确认删除直播信息编号为"'+l+'"的数据项?').then((function(){return u(l)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("tcm/live/export",Object(r["a"])({},this.queryParams),"live_".concat((new Date).getTime(),".xlsx"))}}},v=p,d=l("2877"),f=Object(d["a"])(v,i,a,!1,null,null,null);t["default"]=f.exports}}]);