text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f28bbd64"],{"0532":function(e,t,i){"use strict";i.d(t,"f",(function(){return r})),i.d(t,"e",(function(){return n})),i.d(t,"a",(function(){return a})),i.d(t,"d",(function(){return c})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return u}));var o=i("b775"),l="/admin/file.Group/";function r(e){return Object(o["a"])({url:l+"list",method:"get",params:e})}function n(e){return Object(o["a"])({url:l+"info",method:"get",params:e})}function a(e){return Object(o["a"])({url:l+"add",method:"post",data:e})}function c(e){return Object(o["a"])({url:l+"edit",method:"post",data:e})}function s(e){return Object(o["a"])({url:l+"dele",method:"post",data:e})}function u(e){return Object(o["a"])({url:l+"disable",method:"post",data:e})}},"09f4":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,i,o){return e/=o/2,e<1?i/2*e*e+t:(e--,-i/2*(e*(e-2)-1)+t)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function l(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,i){var n=r(),a=e-n,c=20,s=0;t="undefined"===typeof t?500:t;var u=function e(){s+=c;var r=Math.easeInOutQuad(s,n,a,t);l(r),s<t?o(e):i&&"function"===typeof i&&i()};u()}},"2d67":function(e,t,i){"use strict";i.r(t);var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("el-row",{attrs:{gutter:0}},[i("el-col",{attrs:{xs:24,sm:20}},[i("el-select",{staticClass:"filter-item",staticStyle:{width:"110px"},attrs:{placeholder:""},model:{value:e.query.search_field,callback:function(t){e.$set(e.query,"search_field",t)},expression:"query.search_field"}},[i("el-option",{attrs:{value:"content_id",label:"内容ID"}}),i("el-option",{attrs:{value:"name",label:"名称"}}),i("el-option",{attrs:{value:"is_top",label:"是否置顶"}}),i("el-option",{attrs:{value:"is_hot",label:"是否热门"}}),i("el-option",{attrs:{value:"is_rec",label:"是否推荐"}}),i("el-option",{attrs:{value:"is_hide",label:"是否隐藏"}})],1),i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"搜索内容",clearable:""},model:{value:e.query.search_value,callback:function(t){e.$set(e.query,"search_value",t)},expression:"query.search_value"}}),i("el-cascader",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{options:e.categoryData,props:{checkStrictly:!0,value:"category_id",label:"category_name"},clearable:"",filterable:"",placeholder:"分类"},on:{change:e.categoryPidChangeQuery},model:{value:e.query.category_id,callback:function(t){e.$set(e.query,"category_id",t)},expression:"query.category_id"}}),i("el-select",{staticClass:"filter-item",staticStyle:{width:"110px"},attrs:{placeholder:"时间类型"},model:{value:e.query.date_field,callback:function(t){e.$set(e.query,"date_field",t)},expression:"query.date_field"}},[i("el-option",{attrs:{value:"create_time",label:"添加时间"}}),i("el-option",{attrs:{value:"update_time",label:"修改时间"}})],1),i("el-date-picker",{staticClass:"filter-item",staticStyle:{width:"240px"},attrs:{type:"daterange","range-separator":"-","value-format":"yyyy-MM-dd","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.query.date_value,callback:function(t){e.$set(e.query,"date_value",t)},expression:"query.date_value"}}),i("el-button",{staticClass:"filter-item",attrs:{type:"primary"},on:{click:function(t){return e.search()}}},[e._v("查询")]),i("el-button",{staticClass:"filter-item",on:{click:function(t){return e.refresh()}}},[e._v("刷新")])],1),i("el-col",{staticStyle:{"text-align":"right"},attrs:{xs:24,sm:4}},[i("el-button",{staticClass:"filter-item",on:{click:function(t){return e.recover()}}},[e._v("回收站")]),i("el-button",{staticClass:"filter-item",attrs:{type:"primary"},on:{click:function(t){return e.add()}}},[e._v("添加")])],1)],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.data,height:e.height-50},on:{"sort-change":e.sort,"selection-change":e.select}},[i("el-table-column",{attrs:{type:"selection",width:"40"}}),i("el-table-column",{attrs:{prop:"content_id",label:"内容ID","min-width":"100",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"img_url",label:"图片","min-width":"70",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.img_url?i("el-image",{staticStyle:{width:"40px",height:"40px"},attrs:{src:t.row.img_url,"preview-src-list":[t.row.img_url],title:"点击查看大图"}}):e._e()]}}])}),i("el-table-column",{attrs:{prop:"name",label:"名称","min-width":"230","show-overflow-tooltip":""}}),i("el-table-column",{attrs:{prop:"category_name",label:"分类","min-width":"100","show-overflow-tooltip":""}}),i("el-table-column",{attrs:{prop:"hits",label:"点击量","min-width":"90",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"80",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"is_top",label:"置顶","min-width":"80",sortable:"custom",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(i){return e.istop([t.row])}},model:{value:t.row.is_top,callback:function(i){e.$set(t.row,"is_top",i)},expression:"scope.row.is_top"}})]}}])}),i("el-table-column",{attrs:{prop:"is_hot",label:"热门","min-width":"80",sortable:"custom",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(i){return e.ishot([t.row])}},model:{value:t.row.is_hot,callback:function(i){e.$set(t.row,"is_hot",i)},expression:"scope.row.is_hot"}})]}}])}),i("el-table-column",{attrs:{prop:"is_rec",label:"推荐","min-width":"80",sortable:"custom",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(i){return e.isrec([t.row])}},model:{value:t.row.is_rec,callback:function(i){e.$set(t.row,"is_rec",i)},expression:"scope.row.is_rec"}})]}}])}),i("el-table-column",{attrs:{prop:"is_hide",label:"隐藏","min-width":"80",sortable:"custom",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(i){return e.ishide([t.row])}},model:{value:t.row.is_hide,callback:function(i){e.$set(t.row,"is_hide",i)},expression:"scope.row.is_hide"}})]}}])}),i("el-table-column",{attrs:{prop:"create_time",label:"添加时间","min-width":"155",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"update_time",label:"修改时间","min-width":"155",sortable:"custom"}}),i("el-table-column",{attrs:{label:"操作","min-width":"85",align:"right",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.edit(o)}}},[e._v("修改")]),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.dele([o])}}},[e._v("删除")])]}}])})],1),i("div",{staticStyle:{"margin-top":"20px"}},[i("el-switch",{staticStyle:{"margin-left":"10px"},attrs:{"active-value":1,"inactive-value":0},model:{value:e.is_top,callback:function(t){e.is_top=t},expression:"is_top"}}),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.istop(e.selection,!0)}}},[e._v("置顶")]),i("el-switch",{staticStyle:{"margin-left":"10px"},attrs:{"active-value":1,"inactive-value":0},model:{value:e.is_hot,callback:function(t){e.is_hot=t},expression:"is_hot"}}),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.ishot(e.selection,!0)}}},[e._v("热门")]),i("el-switch",{staticStyle:{"margin-left":"10px"},attrs:{"active-value":1,"inactive-value":0},model:{value:e.is_rec,callback:function(t){e.is_rec=t},expression:"is_rec"}}),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.isrec(e.selection,!0)}}},[e._v("推荐")]),i("el-switch",{staticStyle:{"margin-left":"10px"},attrs:{"active-value":1,"inactive-value":0},model:{value:e.is_hide,callback:function(t){e.is_hide=t},expression:"is_hide"}}),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.ishide(e.selection,!0)}}},[e._v("隐藏")]),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.dele(e.selection)}}},[e._v("删除")])],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.count>0,expression:"count > 0"}],attrs:{total:e.count,page:e.query.page,limit:e.query.limit},on:{"update:page":function(t){return e.$set(e.query,"page",t)},"update:limit":function(t){return e.$set(e.query,"limit",t)},pagination:e.list}}),i("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialog,width:"65%",top:"1vh","before-close":e.cancel},on:{"update:visible":function(t){e.dialog=t},opened:function(t){return e.dialogOpened()},closed:function(t){return e.dialogClosed()},"close-on-click-modal":!1}},[i("el-form",{ref:"ref",staticClass:"dialog-body",style:{height:e.height+"px"},attrs:{rules:e.rules,model:e.model,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"分类",prop:"category_id",clearable:"",placeholder:"请选择"}},[i("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.categoryData,props:{checkStrictly:!0,value:"category_id",label:"category_name"},clearable:"",filterable:"",placeholder:"请选择分类"},on:{change:e.categoryChange},model:{value:e.model.category_id,callback:function(t){e.$set(e.model,"category_id",t)},expression:"model.category_id"}})],1),i("el-form-item",{attrs:{label:"名称",prop:"name"}},[i("el-input",{attrs:{clearable:"",placeholder:"请输入名称"},model:{value:e.model.name,callback:function(t){e.$set(e.model,"name",t)},expression:"model.name"}})],1),i("el-form-item",{attrs:{label:"标题",prop:"title"}},[i("el-input",{attrs:{clearable:"",placeholder:"title"},model:{value:e.model.title,callback:function(t){e.$set(e.model,"title",t)},expression:"model.title"}})],1),i("el-form-item",{attrs:{label:"关键词",prop:"keywords"}},[i("el-input",{attrs:{clearable:"",placeholder:"keywords"},model:{value:e.model.keywords,callback:function(t){e.$set(e.model,"keywords",t)},expression:"model.keywords"}})],1),i("el-form-item",{attrs:{label:"描述",prop:"description"}},[i("el-input",{attrs:{type:"textarea",clearable:"",placeholder:"description"},model:{value:e.model.description,callback:function(t){e.$set(e.model,"description",t)},expression:"model.description"}})],1),i("el-form-item",{attrs:{label:"链接",prop:"url"}},[i("el-input",{attrs:{clearable:"",placeholder:"url"},model:{value:e.model.url,callback:function(t){e.$set(e.model,"url",t)},expression:"model.url"}})],1),i("el-form-item",{attrs:{label:"图片",prop:"imgs"}},[i("el-row",{attrs:{gutter:0}},[i("el-col",{attrs:{span:8}},[i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.fileUpload("image")}}},[e._v("上传图片")])],1),i("el-col",{attrs:{span:16}},[i("div",[e._v("每张图片大小不超过 500 KB，jpg、png格式。")])])],1),i("el-row",{attrs:{gutter:0}},e._l(e.model.imgs,(function(t,o){return i("el-col",{key:o,staticStyle:{border:"1px solid #DCDFE6"},attrs:{span:6}},[i("el-image",{staticStyle:{width:"100%",height:"100px"},attrs:{src:t.file_url,"preview-src-list":[t.file_url],fit:"contain",title:"点击查看大图"}}),i("br",{staticStyle:{"line-height":"0"}}),i("el-link",{staticStyle:{margin:"0 1px"},attrs:{href:t.file_url,underline:!1,download:t.file_url,target:"_blank"}},[e._v(" 下载"),i("span",{staticStyle:{"font-size":"10px"}},[e._v("("+e._s(t.file_size)+")")])]),i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.uploadDele(o)}}},[e._v("删除")])],1)})),1)],1),i("el-form-item",{attrs:{label:"附件",prop:"files"}},[i("el-row",{attrs:{gutter:0}},[i("el-col",{attrs:{span:8}},[i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.fileUpload("word")}}},[e._v("上传附件")])],1),i("el-col",{attrs:{span:16}},[i("div",[e._v("每个附件大小不超过 10 MB。")])])],1),e._l(e.model.files,(function(t,o){return i("el-row",{key:o,attrs:{gutter:0}},[i("el-col",{attrs:{span:16}},[i("el-input",{attrs:{placeholder:"名称",clearable:""},model:{value:t.file_name,callback:function(i){e.$set(t,"file_name",i)},expression:"item.file_name"}})],1),i("el-col",{attrs:{span:4}},[i("el-input",{attrs:{placeholder:"大小",clearable:""},model:{value:t.file_size,callback:function(i){e.$set(t,"file_size",i)},expression:"item.file_size"}})],1),i("el-col",{attrs:{span:4}},[i("el-link",{staticStyle:{margin:"0 10px"},attrs:{href:t.file_url,underline:!1,download:t.file_url,target:"_blank"}},[e._v("下载")]),i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.uploadFileDele(o)}}},[e._v("删除")])],1)],1)}))],2),i("el-form-item",{attrs:{label:"视频",prop:"videos"}},[i("el-row",{attrs:{gutter:0}},[i("el-col",{attrs:{span:4}},[i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.fileUpload("video")}}},[e._v("上传视频")])],1),i("el-col",{attrs:{span:4}},[i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.uploadVideoAdd()}}},[e._v("插入视频")])],1),i("el-col",{attrs:{span:16}},[i("div",[e._v("每个视频大小不超过 50 MB。")])])],1),e._l(e.model.videos,(function(t,o){return i("el-row",{key:o,attrs:{gutter:0}},[i("el-col",{attrs:{span:8}},[i("el-input",{attrs:{placeholder:"名称",clearable:""},model:{value:t.file_name,callback:function(i){e.$set(t,"file_name",i)},expression:"item.file_name"}})],1),i("el-col",{attrs:{span:8}},[i("el-input",{attrs:{placeholder:"网址",clearable:""},model:{value:t.file_path,callback:function(i){e.$set(t,"file_path",i)},expression:"item.file_path"}})],1),i("el-col",{attrs:{span:4}},[i("el-input",{attrs:{placeholder:"大小",clearable:""},model:{value:t.file_size,callback:function(i){e.$set(t,"file_size",i)},expression:"item.file_size"}})],1),i("el-col",{attrs:{span:4}},[i("el-link",{staticStyle:{margin:"0 10px"},attrs:{href:t.file_url,underline:!1,download:t.file_url,target:"_blank"}},[e._v("下载")]),i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.uploadVideoDele(o)}}},[e._v("删除")])],1)],1)}))],2),i("el-form-item",{attrs:{label:"内容",prop:"content"}},[i("div",{attrs:{id:"content"}})]),i("el-form-item",{attrs:{label:"排序",prop:"sort"}},[i("el-input",{attrs:{clearable:"",placeholder:""},model:{value:e.model.sort,callback:function(t){e.$set(e.model,"sort",t)},expression:"model.sort"}})],1),e.model.content_id?i("el-form-item",{attrs:{label:"添加时间",prop:"create_time"}},[i("el-input",{attrs:{disabled:""},model:{value:e.model.create_time,callback:function(t){e.$set(e.model,"create_time",t)},expression:"model.create_time"}})],1):e._e(),e.model.update_time?i("el-form-item",{attrs:{label:"修改时间",prop:"update_time"}},[i("el-input",{attrs:{disabled:""},model:{value:e.model.update_time,callback:function(t){e.$set(e.model,"update_time",t)},expression:"model.update_time"}})],1):e._e(),e.model.delete_time?i("el-form-item",{attrs:{label:"删除时间",prop:"delete_time"}},[i("el-input",{attrs:{disabled:""},model:{value:e.model.delete_time,callback:function(t){e.$set(e.model,"delete_time",t)},expression:"model.delete_time"}})],1):e._e()],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.cancel}},[e._v("取消")]),i("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("提交")])],1)],1),i("el-dialog",{attrs:{title:e.recoverDialogTitle,visible:e.recoverDialog,width:"80%",top:"1vh"},on:{"update:visible":function(t){e.recoverDialog=t}}},[i("div",{staticClass:"filter-container"},[i("el-row",{attrs:{gutter:0}},[i("el-col",{attrs:{xs:24,sm:24}},[i("el-select",{staticClass:"filter-item",staticStyle:{width:"110px"},attrs:{placeholder:""},model:{value:e.recoverQuery.search_field,callback:function(t){e.$set(e.recoverQuery,"search_field",t)},expression:"recoverQuery.search_field"}},[i("el-option",{attrs:{value:"content_id",label:"内容ID"}}),i("el-option",{attrs:{value:"name",label:"名称"}}),i("el-option",{attrs:{value:"is_top",label:"是否置顶"}}),i("el-option",{attrs:{value:"is_hot",label:"是否热门"}}),i("el-option",{attrs:{value:"is_rec",label:"是否推荐"}}),i("el-option",{attrs:{value:"is_hide",label:"是否隐藏"}})],1),i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"搜索内容",clearable:""},model:{value:e.recoverQuery.search_value,callback:function(t){e.$set(e.recoverQuery,"search_value",t)},expression:"recoverQuery.search_value"}}),i("el-cascader",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{options:e.categoryData,props:{checkStrictly:!0,value:"category_id",label:"category_name"},clearable:"",filterable:"",placeholder:"分类"},on:{change:e.recoverCategoryChangeQuery},model:{value:e.recoverQuery.category_id,callback:function(t){e.$set(e.recoverQuery,"category_id",t)},expression:"recoverQuery.category_id"}}),i("el-select",{staticClass:"filter-item",staticStyle:{width:"110px"},attrs:{placeholder:"时间类型"},model:{value:e.recoverQuery.date_field,callback:function(t){e.$set(e.recoverQuery,"date_field",t)},expression:"recoverQuery.date_field"}},[i("el-option",{attrs:{value:"delete_time",label:"删除时间"}}),i("el-option",{attrs:{value:"create_time",label:"添加时间"}})],1),i("el-date-picker",{staticClass:"filter-item",staticStyle:{width:"240px"},attrs:{type:"daterange","range-separator":"-","value-format":"yyyy-MM-dd","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.recoverQuery.date_value,callback:function(t){e.$set(e.recoverQuery,"date_value",t)},expression:"recoverQuery.date_value"}}),i("el-button",{staticClass:"filter-item",attrs:{type:"primary"},on:{click:function(t){return e.recoverSearch()}}},[e._v("查询")]),i("el-button",{staticClass:"filter-item",on:{click:function(t){return e.recoverRefresh()}}},[e._v("刷新")])],1)],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.recoverLoad,expression:"recoverLoad"}],ref:"recoverRef",staticStyle:{width:"100%"},attrs:{data:e.recoverData,height:e.height-60},on:{"sort-change":e.recoverSort,"selection-change":e.recoverSelect}},[i("el-table-column",{attrs:{type:"selection",width:"40"}}),i("el-table-column",{attrs:{prop:"content_id",label:"ID","min-width":"80",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"img_url",label:"图片","min-width":"70",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.img_url?i("el-image",{staticStyle:{height:"40px"},attrs:{src:t.row.img_url,"preview-src-list":[t.row.img_url],title:"点击查看大图"}}):e._e()]}}])}),i("el-table-column",{attrs:{prop:"name",label:"名称","min-width":"230","show-overflow-tooltip":""}}),i("el-table-column",{attrs:{prop:"category_name",label:"分类","min-width":"100","show-overflow-tooltip":""}}),i("el-table-column",{attrs:{prop:"hits",label:"点击量","min-width":"90",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"80",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"create_time",label:"添加时间","min-width":"155",sortable:"custom"}}),i("el-table-column",{attrs:{prop:"delete_time",label:"删除时间","min-width":"155",sortable:"custom"}}),i("el-table-column",{attrs:{label:"操作","min-width":"85",align:"right",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.recoverReco([o])}}},[e._v("恢复")]),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.recoverDele([o])}}},[e._v("删除")])]}}])})],1),i("div",{staticStyle:{"margin-top":"20px"}},[i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.recoverReco(e.recoverSelection)}}},[e._v("恢复")]),i("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){return e.recoverDele(e.recoverSelection)}}},[e._v("删除")])],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.recoverCount>0,expression:"recoverCount > 0"}],attrs:{total:e.recoverCount,page:e.recoverQuery.page,limit:e.recoverQuery.limit},on:{"update:page":function(t){return e.$set(e.recoverQuery,"page",t)},"update:limit":function(t){return e.$set(e.recoverQuery,"limit",t)},pagination:e.recoverList}})],1),i("el-dialog",{attrs:{title:"文件管理",visible:e.fileDialog,width:"80%",top:"1vh"},on:{"update:visible":function(t){e.fileDialog=t}}},[i("file-manage",{attrs:{"file-type":e.fileType},on:{"file-lists":e.fileLists}})],1),i("el-dialog",{attrs:{title:"文件管理",visible:e.editorDialog,width:"80%",top:"1vh"},on:{"update:visible":function(t){e.editorDialog=t}}},[i("file-manage",{attrs:{"file-type":e.editorFileType},on:{"file-lists":e.fileListsEd}})],1)],1)},l=[],r=i("1222"),n=i("a3b6"),a=i("e752"),c=i("51e3"),s=(i("3d83"),i("09f6"),i("9133"),i("98b1")),u=i("333d"),d=i("4381"),f=i("a4f4"),m=i.n(f),p=i("3659"),h=i("b775"),v="/admin/cms.Content/";function g(e){return Object(h["a"])({url:v+"list",method:"get",params:e})}function b(e){return Object(h["a"])({url:v+"category",method:"get",params:e})}function _(e){return Object(h["a"])({url:v+"info",method:"get",params:e})}function y(e){return Object(h["a"])({url:v+"add",method:"post",data:e})}function w(e){return Object(h["a"])({url:v+"edit",method:"post",data:e})}function k(e){return Object(h["a"])({url:v+"dele",method:"post",data:e})}function x(e){return Object(h["a"])({url:v+"istop",method:"post",data:e})}function $(e){return Object(h["a"])({url:v+"ishot",method:"post",data:e})}function S(e){return Object(h["a"])({url:v+"isrec",method:"post",data:e})}function j(e){return Object(h["a"])({url:v+"ishide",method:"post",data:e})}function O(e){return Object(h["a"])({url:v+"recover",method:"get",params:e})}function C(e){return Object(h["a"])({url:v+"recoverReco",method:"post",data:e})}function D(e){return Object(h["a"])({url:v+"recoverDele",method:"post",data:e})}var Q={name:"CmsContent",components:{Pagination:u["a"],FileManage:p["a"]},directives:{permission:d["a"]},data:function(){return{name:"内容",height:680,loading:!1,query:{page:1,limit:12,search_field:"content_id",date_field:"create_time"},data:[],count:0,dialog:!1,dialogTitle:"",model:{content_id:"",category_id:"",name:"",title:"",keywords:"",description:"",url:"",imgs:[],files:[],videos:[],content:"",sort:200},is_top:0,is_hot:0,is_rec:0,is_hide:0,selection:[],fileDialog:!1,fileType:"image",editor:null,editorDialog:!1,editorFileType:"image",rules:{category_id:[{required:!0,message:"请选择分类",trigger:"blur"}],name:[{required:!0,message:"请输入名称",trigger:"blur"}]},categoryData:[],recoverDialog:!1,recoverDialogTitle:"",recoverLoad:!1,recoverData:[],recoverCount:0,recoverQuery:{page:1,limit:10,search_field:"content_id",date_field:"delete_time"},recoverSelection:[]}},created:function(){this.height=Object(s["a"])(),this.list(),this.category()},methods:{list:function(){var e=this;this.loading=!0,g(this.query).then((function(t){e.data=t.data.list,e.count=t.data.count,e.loading=!1})).catch((function(){e.loading=!1}))},select:function(e){this.selection=e},selectAlert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$alert(e||"请选择需要操作的"+this.name,"提示",{confirmButtonText:"确定",callback:function(e){}})},add:function(){this.dialog=!0,this.dialogTitle=this.name+"添加",this.model=this.$options.data().model},edit:function(e){var t=this;this.loading=!0,this.dialog=!0,this.dialogTitle=this.name+"修改："+e.content_id,_({content_id:e.content_id}).then((function(e){t.reset(e.data),t.loading=!1})).catch((function(){t.loading=!1}))},dele:function(e){var t=this;if(0===e.length)this.selectAlert();else{var i="删除"+this.name,o='确定要删除选中的 <span style="color:red">'+e.length+" </span> 条"+this.name+"吗？";1===e.length&&(i=i+"："+e[0].content_id,o="确定要删除"+this.name+' <span style="color:red">'+e[0].name+" </span>吗？"),this.$confirm(o,i,{type:"warning",dangerouslyUseHTMLString:!0}).then((function(){t.loading=!0,k({content:e}).then((function(e){t.list(),t.$message.success(e.msg)})).catch((function(){t.loading=!1}))})).catch((function(){}))}},cancel:function(){this.reset(),this.dialog=!1},submit:function(){var e=this;this.$refs["ref"].validate((function(t){t&&(e.loading=!0,e.model.content_id?w(e.model).then((function(t){e.dialog=!1,e.list(),e.reset(),e.$message.success(t.msg)})).catch((function(){e.loading=!1})):y(e.model).then((function(t){e.dialog=!1,e.list(),e.reset(),e.$message.success(t.msg)})).catch((function(){e.loading=!1})))}))},reset:function(e){e?(this.model=e,0===this.model.category_id&&(this.model.category_id="")):this.model=this.$options.data().model,void 0!==this.$refs["ref"]&&(this.$refs["ref"].resetFields(),this.$refs["ref"].clearValidate())},search:function(){this.query.page=1,this.list()},refresh:function(){this.query=this.$options.data().query,this.category(),this.list()},sort:function(e){this.query.sort_field=e.prop,this.query.sort_value="","ascending"===e.order&&(this.query.sort_value="asc",this.list()),"descending"===e.order&&(this.query.sort_value="desc",this.list())},istop:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===e.length)this.selectAlert();else{this.loading=!0;var o=e[0].is_top;i&&(o=this.is_top),x({content:e,is_top:o}).then((function(e){t.list(),t.$message.success(e.msg)})).catch((function(){t.list(),t.loading=!1}))}},ishot:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===e.length)this.selectAlert();else{this.loading=!0;var o=e[0].is_hot;i&&(o=this.is_hot),$({content:e,is_hot:o}).then((function(e){t.list(),t.$message.success(e.msg)})).catch((function(){t.list(),t.loading=!1}))}},isrec:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===e.length)this.selectAlert();else{this.loading=!0;var o=e[0].is_rec;i&&(o=this.is_rec),S({content:e,is_rec:o}).then((function(e){t.list(),t.$message.success(e.msg)})).catch((function(){t.list(),t.loading=!1}))}},ishide:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(0===e.length)this.selectAlert();else{this.loading=!0;var o=e[0].is_hide;i&&(o=this.is_hide),j({content:e,is_hide:o}).then((function(e){t.list(),t.$message.success(e.msg)})).catch((function(){t.list(),t.loading=!1}))}},category:function(){var e=this;b().then((function(t){e.categoryData=t.data.list})).catch((function(){}))},categoryChange:function(e){e&&(this.model.category_id=e[e.length-1])},categoryPidChangeQuery:function(e){e&&(this.query.category_id=e[e.length-1])},fileUpload:function(e){this.fileType=e,this.fileDialog=!0},fileLists:function(e,t){this.fileDialog=!1;var i=e.length;if(e)for(var o=0;o<i;o++)"video"===t?this.model.videos.push(e[o]):"word"===t?this.model.files.push(e[o]):this.model.imgs.push(e[o])},fileListsEd:function(e,t){this.editorDialog=!1;var i=e.length;if(e)for(var o=0;o<i;o++)"image"===t?this.editor.cmd.do("insertHTML",'<img file-ids="'.concat(e[o]["file_id"],'" src="').concat(e[o]["file_url"],'" style="max-width:50%;"/>')):"word"===t?this.editor.cmd.do("insertHTML",'<a file-ids="'.concat(e[o]["file_id"],'" href="').concat(e[o]["file_url"],'" download="').concat(e[o]["file_url"],'" target="_blank">').concat(e[o]["file_name"],"</el-link>")):this.editor.cmd.do("insertHTML",'<video width="50%" height="50%" controls>\n                <source file-ids="'.concat(e[o]["file_id"],'" src="').concat(e[o]["file_url"],'" type="video/mp4">\n                <object file-ids="').concat(e[o]["file_id"],'" data="').concat(e[o]["file_url"],'" width="50%" height="50%">\n                  <embed file-ids="').concat(e[o]["file_id"],'" src="').concat(e[o]["file_url"],'" width="50%" height="50%">\n                </object>\n              </video>'))},uploadDele:function(e){this.model.imgs.splice(e,1)},uploadFileDele:function(e){this.model.files.splice(e,1)},uploadVideoDele:function(e){this.model.videos.splice(e,1)},uploadVideoAdd:function(){var e={};e.name=e.file_path=e.file_size=e.file_type=e.file_url="",this.model.videos.push(e)},dialogOpened:function(){var e=this,t=m.a.BtnMenu,i=function(t){Object(a["a"])(o,t);var i=Object(c["a"])(o);function o(e){Object(r["a"])(this,o);var t=m.a.$('<div class="w-e-menu" data-title="上传图片"><el-button>图片</el-button></div>');return i.call(this,t,e)}return Object(n["a"])(o,[{key:"clickHandler",value:function(){e.editorFileType="image",e.editorDialog=!0}},{key:"tryChangeActive",value:function(){}}]),o}(t),o=function(t){Object(a["a"])(o,t);var i=Object(c["a"])(o);function o(e){Object(r["a"])(this,o);var t=m.a.$('<div class="w-e-menu" data-title="上传附件"><el-button>附件</el-button></div>');return i.call(this,t,e)}return Object(n["a"])(o,[{key:"clickHandler",value:function(){e.editorFileType="word",e.editorDialog=!0}},{key:"tryChangeActive",value:function(){}}]),o}(t),l=function(t){Object(a["a"])(o,t);var i=Object(c["a"])(o);function o(e){Object(r["a"])(this,o);var t=m.a.$('<div class="w-e-menu" data-title="上传视频"><el-button>视频</el-button></div>');return i.call(this,t,e)}return Object(n["a"])(o,[{key:"clickHandler",value:function(){e.editorFileType="video",e.editorDialog=!0}},{key:"tryChangeActive",value:function(){}}]),o}(t),s=function(t){Object(a["a"])(o,t);var i=Object(c["a"])(o);function o(e){Object(r["a"])(this,o);var t=m.a.$('<div class="w-e-menu" data-title="清空内容"><el-button>清空</el-button></div>');return i.call(this,t,e)}return Object(n["a"])(o,[{key:"clickHandler",value:function(){e.editor.txt.clear()}},{key:"tryChangeActive",value:function(){}}]),o}(t);e.editor=new m.a("#content"),e.editor.config.excludeMenus=["image","video"],e.editor.menus.extend("upimgKey",i),e.editor.config.menus=e.editor.config.menus.concat("upimgKey"),e.editor.menus.extend("upfileKey",o),e.editor.config.menus=e.editor.config.menus.concat("upfileKey"),e.editor.menus.extend("upvideoKey",l),e.editor.config.menus=e.editor.config.menus.concat("upvideoKey"),e.editor.menus.extend("clearKey",s),e.editor.config.menus=e.editor.config.menus.concat("clearKey"),e.editor.config.height=500,e.editor.config.focus=!1,e.editor.config.placeholder="",e.editor.config.onchange=function(t){e.model.content=t},e.editor.create(),e.editor.txt.html(e.model.content)},dialogClosed:function(){this.editor.destroy(),this.editor=null},recover:function(){this.recoverDialog=!0,this.recoverDialogTitle=this.name+"回收站",this.recoverList()},recoverSearch:function(){this.recoverQuery.page=1,this.recoverList()},recoverRefresh:function(){this.recoverQuery=this.$options.data().recoverQuery,this.recoverList()},recoverList:function(){var e=this;this.recoverLoad=!0,O(this.recoverQuery).then((function(t){e.recoverData=t.data.list,e.recoverCount=t.data.count,e.recoverLoad=!1,e.$nextTick((function(){e.$refs["recoverRef"].doLayout()}))})).catch((function(){e.recoverLoad=!1}))},recoverSort:function(e){this.recoverQuery.sort_field=e.prop,this.recoverQuery.sort_value="","ascending"===e.order&&(this.recoverQuery.sort_value="asc",this.recoverList()),"descending"===e.order&&(this.recoverQuery.sort_value="desc",this.recoverList())},recoverReco:function(e){var t=this;if(0===e.length)this.selectAlert();else{var i="恢复"+this.name,o='确定要恢复选中的 <span style="color:red">'+e.length+" </span> 条"+this.name+"吗？";1===e.length&&(i=i+"："+e[0].content_id,o="确定要恢复"+this.name+' <span style="color:red">'+e[0].name+" </span>吗？"),this.$confirm(o,i,{type:"warning",dangerouslyUseHTMLString:!0}).then((function(){t.recoverLoad=!0,C({content:e}).then((function(e){t.list(),t.recoverList(),t.$message.success(e.msg)})).catch((function(){t.recoverLoad=!1}))})).catch((function(){}))}},recoverDele:function(e){var t=this;if(0===e.length)this.selectAlert();else{var i="彻底删除"+this.name,o='确定要彻底删除选中的 <span style="color:red">'+e.length+" </span> 条"+this.name+"吗？";1===e.length&&(i=i+"："+e[0].content_id,o="确定要彻底删除"+this.name+' <span style="color:red">'+e[0].name+" </span>吗？"),this.$confirm(o,i,{type:"warning",dangerouslyUseHTMLString:!0}).then((function(){t.recoverLoad=!0,D({content:e}).then((function(e){t.recoverList(),t.$message.success(e.msg)})).catch((function(){t.recoverLoad=!1}))})).catch((function(){}))}},recoverSelect:function(e){this.recoverSelection=e},recoverCategoryChangeQuery:function(e){e&&(this.recoverQuery.category_id=e[e.length-1])}}},q=Q,L=i("4ac2"),T=Object(L["a"])(q,o,l,!1,null,null,null);t["default"]=T.exports},4381:function(e,t,i){"use strict";i("666d"),i("a52a");var o=i("4360");function l(e,t){var i=t.value,l=o["a"].getters&&o["a"].getters.roles;if(!(i&&i instanceof Array))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");if(i.length>0){var r=i,n=l.some((function(e){return r.includes(e)}));n||e.parentNode&&e.parentNode.removeChild(e)}}var r={inserted:function(e,t){l(e,t)},update:function(e,t){l(e,t)}},n=function(e){e.directive("permission",r)};window.Vue&&(window["permission"]=r,Vue.use(n)),r.install=n;t["a"]=r},"98b1":function(e,t,i){"use strict";function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:230,t=880,i=document.documentElement.clientHeight||document.body.clientHeight;return i?i-e:t-e}i.d(t,"a",(function(){return o}))},e08b:function(e,t,i){"use strict";i.d(t,"e",(function(){return r})),i.d(t,"h",(function(){return n})),i.d(t,"g",(function(){return a})),i.d(t,"a",(function(){return c})),i.d(t,"d",(function(){return s})),i.d(t,"b",(function(){return u})),i.d(t,"c",(function(){return d})),i.d(t,"f",(function(){return f})),i.d(t,"i",(function(){return m})),i.d(t,"k",(function(){return p})),i.d(t,"j",(function(){return h}));var o=i("b775"),l="/admin/file.File/";function r(e){return Object(o["a"])({url:l+"group",method:"get",params:e})}function n(e){return Object(o["a"])({url:l+"list",method:"get",params:e})}function a(e){return Object(o["a"])({url:l+"info",method:"get",params:e})}function c(){return l+"add"}function s(e){return Object(o["a"])({url:l+"edit",method:"post",data:e})}function u(e){return Object(o["a"])({url:l+"dele",method:"post",data:e})}function d(e){return Object(o["a"])({url:l+"disable",method:"post",data:e})}function f(e){return Object(o["a"])({url:l+"grouping",method:"post",data:e})}function m(e){return Object(o["a"])({url:l+"recover",method:"get",params:e})}function p(e){return Object(o["a"])({url:l+"recoverReco",method:"post",data:e})}function h(e){return Object(o["a"])({url:l+"recoverDele",method:"post",data:e})}},f71e:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var o=i("430a"),l=i("7094"),r=i.n(l);function n(){o["default"].prototype.$message({message:"复制成功",type:"success",duration:1500})}function a(){o["default"].prototype.$message({message:"复制失败",type:"error"})}function c(e,t){var i=new r.a(t.target,{text:function(){return e}});i.on("success",(function(){n(),i.destroy()})),i.on("error",(function(){a(),i.destroy()})),i.onClick(t)}}}]);