fe-drone-ci/static/js/chunk-d4a3865c.ca82901a.js

1 line
4.5 KiB
JavaScript
Raw Normal View History

2020-09-07 13:47:42 +00:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d4a3865c"],{2423:function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return s})),a.d(e,"d",(function(){return l})),a.d(e,"a",(function(){return i})),a.d(e,"e",(function(){return o}));var n=a("b775");function r(t){return Object(n["a"])({url:"/vue-element-admin/article/list",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/vue-element-admin/article/detail",method:"get",params:{id:t}})}function l(t){return Object(n["a"])({url:"/vue-element-admin/article/pv",method:"get",params:{pv:t}})}function i(t){return Object(n["a"])({url:"/vue-element-admin/article/create",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/vue-element-admin/article/update",method:"post",data:t})}},"74b3":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"dragTable",staticStyle:{width:"100%"},attrs:{data:t.list,"row-key":"id",border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{align:"center",label:"ID",width:"65"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(n.id))])]}}])}),a("el-table-column",{attrs:{width:"180px",align:"center",label:"Date"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(t._f("parseTime")(n.timestamp,"{y}-{m}-{d} {h}:{i}")))])]}}])}),a("el-table-column",{attrs:{"min-width":"300px",label:"Title"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(n.title))])]}}])}),a("el-table-column",{attrs:{width:"110px",align:"center",label:"Author"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(n.author))])]}}])}),a("el-table-column",{attrs:{width:"100px",label:"Importance"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return t._l(+n.importance,(function(t){return a("svg-icon",{key:t,staticClass:"icon-star",attrs:{"icon-class":"star"}})}))}}])}),a("el-table-column",{attrs:{align:"center",label:"Readings",width:"95"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(n.pageviews))])]}}])}),a("el-table-column",{attrs:{"class-name":"status-col",label:"Status",width:"110"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-tag",{attrs:{type:t._f("statusFilter")(n.status)}},[t._v(" "+t._s(n.status)+" ")])]}}])}),a("el-table-column",{attrs:{align:"center",label:"Drag",width:"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("svg-icon",{staticClass:"drag-handler",attrs:{"icon-class":"drag"}})]}}])})],1),a("div",{staticClass:"show-d"},[a("el-tag",{staticStyle:{"margin-right":"12px"}},[t._v(t._s(t.$t("table.dragTips1"))+" :")]),t._v(" "+t._s(t.oldList)+" ")],1),a("div",{staticClass:"show-d"},[a("el-tag",[t._v(t._s(t.$t("table.dragTips2"))+" :")]),t._v(" "+t._s(t.newList)+" ")],1)],1)},r=[],s=(a("d81d"),a("fb6a"),a("a434"),a("96cf"),a("1da1")),l=a("2423"),i=a("53fe"),o=a.n(i),u={name:"DragTable",filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{list:null,total:null,listLoading:!0,listQuery:{page:1,limit:10},sortable:null,oldList:[],newList:[]}},created:function(){this.getList()},methods:{getList:function(){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function e(){var a,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.listLoading=!0,e.next=3,Object(l["c"])(t.listQuery);case 3:a=e.sent,n=a.data,t.list=n.items,t.total=n.total,t.listLoading=!1,t.oldList=t.list.map((function(t){return t.id})),t.newList=t.oldList.slice(),t.$nextTick((function(){t.setSort()}));case 11:case"end":return e.stop()}}),e)})))()},setSort:function(){var t=this,e=this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];this.sortabl