| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-be61d466"],{"4ae1":function(t,e,a){"use strict";var i=a("9ab4"),r=a("1b40"),l=a("0a6d");let s=class extends r.e{constructor(){super(...arguments),this.exportData={},this.formData={page_type:0,page_start:1,page_end:200,file_name:""}}handleOpen(){this.getData()}handleConfirm(){const t=this.$loading({lock:!0,text:"正在导出中...",spinner:"el-icon-loading"});this.method({export:2,...this.param,...this.formData,user_id:this.userId,type:this.type,...this.status,page_size:this.pageSize}).then(()=>{this.$refs.dialog.close()}).finally(()=>{t.close()})}getData(){this.method({...this.param,export:1,user_id:this.userId,type:this.type,page_size:this.pageSize,...this.status}).then(t=>{this.exportData=t,this.formData.file_name=t.file_name,this.formData.page_end=t.page_end,this.formData.page_start=t.page_start})}created(){}};Object(i.a)([Object(r.c)()],s.prototype,"method",void 0),Object(i.a)([Object(r.c)()],s.prototype,"param",void 0),Object(i.a)([Object(r.c)()],s.prototype,"status",void 0),Object(i.a)([Object(r.c)()],s.prototype,"userId",void 0),Object(i.a)([Object(r.c)()],s.prototype,"type",void 0),Object(i.a)([Object(r.c)()],s.prototype,"pageSize",void 0),s=Object(i.a)([Object(r.a)({components:{LsDialog:l.a}})],s);var o=s,n=a("2877"),c=Object(n.a)(o,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"export-data inline"},[e("ls-dialog",{ref:"dialog",attrs:{title:"导出设置",width:"500px",top:"35vh","confirm-button-text":"确认导出",async:!0},on:{confirm:t.handleConfirm,open:t.handleOpen}},[e("div",{attrs:{slot:"trigger"},slot:"trigger"},[e("el-button",{attrs:{size:"small"}},[t._v("导出")])],1),e("div",[e("el-form",{ref:"form",attrs:{model:t.formData,"label-width":"120px",size:"small"}},[e("el-form-item",{attrs:{label:"数据量:"}},[t._v(" 预计导出"+t._s(t.exportData.count)+"条数据,共"+t._s(t.exportData.sum_page)+"页,每页"+t._s(t.exportData.page_size)+"条数据 ")]),e("el-form-item",{attrs:{label:"导出限制:"}},[t._v(" 每次导出最大允许"+t._s(t.exportData.max_page)+"页,共"+t._s(t.exportData.all_max_size)+"条数据 ")]),e("el-form-item",{attrs:{label:"导出范围:",required:""}},[e("el-radio-group",{model:{value:t.formData.page_type,callback:function(e){t.$set(t.formData,"page_type",e)},expression:"formData.page_type"}},[e("el-radio",{attrs:{label:0}},[t._v("全部导出")]),e("el-radio",{attrs:{label:1}},[t._v("分页导出")])],1)],1),1==t.formData.page_type?e("el-form-item",{attrs:{label:"分页范围:",required:""}},[e("div",{staticClass:"flex"},[e("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:""},model:{value:t.formData.page_start,callback:function(e){t.$set(t.formData,"page_start",e)},expression:"formData.page_start"}}),e("span",{staticClass:"flex-none m-l-8 m-r-8"},[t._v("页,至")]),e("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:""},model:{value:t.formData.page_end,callback:function(e){t.$set(t.formData,"page_end",e)},expression:"formData.page_end"}})],1)]):t._e(),e("el-form-item",{attrs:{label:"导出文件名称:",prop:"file_name"}},[e("el-input",{attrs:{placeholder:"请输入导出文件名称"},model:{value:t.formData.file_name,callback:function(e){t.$set(t.formData,"file_name",e)},expression:"formData.file_name"}})],1)],1)],1)])],1)}),[],!1,null,null,null);e.a=c.exports},c350:function(t,e,a){"use strict";a.r(e);a("14d9");var i=a("9ab4"),r=a("1b40"),l=a("0a6d"),s=a("3c50"),o=a("4ae1"),n=a("ea4a"),c=a("6ddb"),p=a("4201");let d=class extends r.e{constructor(){super(...arguments),this.pager=new c.a}changeStatus(t,e){Object(n.k)({id:e.id}).then(()=>{this.getArticleList()}).catch(t=>{})}goArticleAdd(){this.$router.push({path:"/article/article_edit",query:{mode:p.g.ADD}})}goArticleEdit(t){this.$router.push({path:"/article/article_edit",query:{id:t.id,mode:p.g.EDIT}})}getArticleList(){this.pager.request({callback:n.l,params:{}}).catch(t=>{})}onArticleDel(t){Object(n.h)({id:t.id}).then(()=>{this.getArticleList()})}created(){this.getArticleList()}};d=Object(i.a)([Object(r.a)({components:{LsDialog:l.a,LsPagination:s.a,ExportData:o.a}})],d);var u=d,f=a("2877"),m=Object(f.a)(u,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"article_lists"},[e("div",{staticClass:"ls-card"},[e("el-alert",{attrs:{title:"温馨提示:*平台发布文章,可在商城新闻资讯栏目查看。",type:"info","show-icon":"",closable:!1}})],1),e("div",{staticClass:"ls-card m-t-24"},[e("div",{staticClass:"add-btn"},[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.goArticleAdd}},[t._v("新增资讯 ")])],1),e("div",{staticClass:"m-t-24"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.pager.loading,expression:"pager.loading"}],staticStyle:{width:"100%"},attrs:{data:t.pager.lists,size:"mini"}},[e("el-table-column",{attrs:{sortable:"",prop:"id",label:"ID","min-width":"70"}}),e("el-table-column",{attrs:{prop:"image",label:"文章封面"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-image",{staticStyle:{width:"80px",height:"80px"},attrs:{src:t.row.image,fit:"cover"}})]}}])}),e("el-table-column",{attrs:{prop:"title",label:"文章标题"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"line-1"},[t._v(t._s(a.row.title))])]}}])}),e("el-table-column",{attrs:{prop:"cid_desc",label:"文章分类"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("div",{staticClass:"line-1"},[t._v(t._s(a.row.cid_desc))])]}}])}),e("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":t.styleConfig.primary,"inactive-color":"#f4f4f5"},on:{change:function(e){return t.changeStatus(e,a.row)}},model:{value:a.row.is_show,callback:function(e){t.$set(a.row,"is_show",e)},expression:"scope.row.is_show"}})]}}])}),e("el-table-column",{attrs:{prop:"visit",label:"浏览量"}}),e("el-table-column",{attrs:{prop:"sort",label:"排序"}}),e("el-table-column",{attrs:{sortable:"",prop:"create_time",label:"创建时间"}}),e("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.goArticleEdit(a.row)}}},[t._v("编辑 ")]),e("ls-dialog",{staticClass:"m-l-10 inline",attrs:{title:"删除公告"},on:{confirm:function(e){return t.onArticleDel(a.row)}}},[e("el-button",{attrs:{slot:"trigger",type:"text",size:"mini"},slot:"trigger"},[t._v("删除 ")])],1)]}}])})],1),e("div",{staticClass:"m-t-24 flex row-right"},[e("ls-pagination",{on:{change:t.getArticleList},model:{value:t.pager,callback:function(e){t.pager=e},expression:"pager"}})],1)],1)])])}),[],!1,null,"1d08c3ad",null);e.default=m.exports},ea4a:function(t,e,a){"use strict";a.d(e,"l",(function(){return r})),a.d(e,"h",(function(){return l})),a.d(e,"i",(function(){return s})),a.d(e,"j",(function(){return o})),a.d(e,"a",(function(){return n})),a.d(e,"k",(function(){return c})),a.d(e,"g",(function(){return p})),a.d(e,"c",(function(){return d})),a.d(e,"d",(function(){return u})),a.d(e,"e",(function(){return f})),a.d(e,"b",(function(){return m})),a.d(e,"f",(function(){return g}));var i=a("f175");const r=t=>i.a.get("/article/lists",{params:t}),l=t=>i.a.post("/article/delete",t),s=t=>i.a.get("/article/detail",{params:t}),o=t=>i.a.post("/article/edit",t),n=t=>i.a.post("/article/add",t),c=t=>i.a.post("/article/isShow",t),p=t=>i.a.get("/article_category/lists",{params:t}),d=t=>i.a.post("/article_category/delete",t),u=t=>i.a.get("/article_category/detail",{params:t}),f=t=>i.a.post("/article_category/edit",t),m=t=>i.a.post("/article_category/add",t),g=t=>i.a.post("/article_category/isShow",t)}}]);
|