zx/public/mer/js/chunk-12848218.86b4d9e3.js

1 line
6.3 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12848218"],{"49ca":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,size:"small","label-width":"60px",inline:!0}},[a("el-form-item",{attrs:{label:"状态:",prop:"status"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[a("el-option",{attrs:{label:"开启",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"关闭",value:"0"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"搜索:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入账号或者描述",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:t.add}},[t._v("添加账号")]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"ID",prop:"id","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{prop:"title",label:"标题","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"access_key",label:"KEY","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"mark",label:"备注","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"添加时间","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"last_time",label:"最后登录时间","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:55,"active-text":"开启","inactive-text":"关闭"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetails(e.row.id)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.reset(e.row.id)}}},[t._v("重置")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDelete(e.row.id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("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),t._v(" "),t.dialogVisible?a("el-dialog",{attrs:{title:"查看",visible:t.dialogVisible,width:"500px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{height:"80px","margin-top":"20px"}},[a("div",{staticClass:"description"},[a("div",{staticClass:"description-term"},[a("span",{staticClass:"title"},[t._v("secretKey")]),t._v(t._s(t.secret_key))]),t._v(" "),a("el-button",{staticClass:"copy copy-data",attrs:{size:"small","data-clipboard-text":t.secret_key,type:"text"}},[t._v("复制")])],1)])]):t._e()],1)},i=[],l=a("b311"),n=a.n(l),o=a("90e7"),r={data:function(){return{dialogVisible:!1,secret_key:{},tableData:{data:[],total:0},listLoading:!0,loading:!0,id:"",tableFrom:{keyword:"",status:"",page:1,limit:20}}},mounted:function(){this.$nextTick((function(){var t=this,e=new n.a(".copy-data");e.on("success",(function(){t.$message.success("复制成功")}))})),this.getList(1)},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getList(1)},add:function(){var t=this;this.$modalForm(Object(o["a"])()).then((function(){return t.getList("")}))},onEdit:function(t){var e=this;this.$modalForm(Object(o["V"])(t)).then((function(){return e.getList("")}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(o["w"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.$message.error(t.message),e.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onDetails:function(t){var e=this;this.id=t,this.dialogVisible=!0,Object(o["l"])(t).then((function(t){e.secret_key=t.data.secret_key,e.loading=!1})).catch((function(t){e.$message.error(t.message),e.loading=!1}))},reset:function(t){var e=this;Object(o["F"])(t).then((function(t){e.dialogVisible=!1,e.$message.success(t.message),e.getList("")})).catch((function(t){e.$message.error(t.message),e.loading=!1}))},onDelete:function(t,e){var a=this;this.$modalSureDelete("确定删除该账户").then((function(){Object(o["v"])(t).then((function(t){var s=t.message;a.$message.success(s),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},onchangeIsShow:function(t){var e=this;Object(o["x"])(t.id,{status:t.status}).then((function(t){var a=t.message;e.$message.success(a),e.getList()})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},c=r,u=(a("da2f"),a("2877")),d=Object(u["a"])(c,s,i,!1,null,"15741ca3",null);e["default"]=d.exports},d925c:function(t,e,a){},da2f:function(t,e,a){"use strict";a("d925c")}}]);