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
8.1 KiB
1 line
8.1 KiB
9 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c2f3c32"],{"3ab5":function(t,n,e){},"551cb":function(t,n,e){"use strict";e("3ab5")},"981f":function(t,n,e){"use strict";e.r(n);var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"divBox"},[e("el-card",[e("div",{staticClass:"mb20"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加链接")])],1),t._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[e("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"60"}}),t._v(" "),e("el-table-column",{attrs:{prop:"name",label:"页面名称","min-width":"120"}}),t._v(" "),e("el-table-column",{attrs:{prop:"url",label:"页面链接","min-width":"100"}}),t._v(" "),e("el-table-column",{attrs:{prop:"param",label:"参数","min-width":"100"}}),t._v(" "),e("el-table-column",{attrs:{prop:"category.name",label:"分组","min-width":"100"}}),t._v(" "),e("el-table-column",{attrs:{prop:"add_time",label:"添加时间","min-width":"120"}}),t._v(" "),e("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏",width:55},on:{change:function(e){return t.onchangeIsShow(n.row)}},model:{value:n.row.status,callback:function(e){t.$set(n.row,"status",e)},expression:"scope.row.status"}})]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.edit(n.row)}}},[t._v("编辑")]),t._v(" "),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleDelete(n.row,n.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),e("div",{staticClass:"block"},[e("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],a=e("f478"),o={name:"PlantLink",data:function(){return{listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20}}},mounted:function(){this.getList("")},methods:{getList:function(t){var n=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(a["T"])(this.tableFrom).then((function(t){n.tableData.data=t.data.list,n.tableData.total=t.data.count,n.listLoading=!1})).catch((function(t){n.listLoading=!1,n.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onchangeIsShow:function(t){var n=this;Object(a["U"])(t.id,t.status).then((function(t){var e=t.message;n.$message.success(e),n.getList()})).catch((function(t){var e=t.message;n.$message.error(e)}))},onAdd:function(){var t=this;this.$modalForm(Object(a["d"])()).then((function(){return t.getList("")}))},edit:function(t){var n=this;this.$modalForm(Object(a["s"])(t.id)).then((function(){return n.getList("")}))},handleDelete:function(t,n){var e=this;this.$modalSure("删除该链接吗").then((function(){Object(a["j"])(t.id).then((function(t){var r=t.message;e.$message.success(r),e.tableData.data.splice(n,1)})).catch((function(t){var n=t.message;e.$message.error(n)}))}))}}},u=o,c=(e("551cb"),e("2877")),s=Object(c["a"])(u,r,i,!1,null,"079eb670",null);n["default"]=s.exports},f478:function(t,n,e){"use strict";e.d(n,"t",(function(){return i})),e.d(n,"z",(function(){return a})),e.d(n,"o",(function(){return o})),e.d(n,"n",(function(){return u})),e.d(n,"m",(function(){return c})),e.d(n,"l",(function(){return s})),e.d(n,"X",(function(){return d})),e.d(n,"V",(function(){return l})),e.d(n,"e",(function(){return f})),e.d(n,"v",(function(){return g})),e.d(n,"A",(function(){return m})),e.d(n,"x",(function(){return y})),e.d(n,"B",(function(){retur
|