chunk-5e661ba6.d27adabe0e4d37fb8b27.js 6.2 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e661ba6"],{"38a0":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("TopTitle",[t._v(" 钱包类型配置 ")]),a("el-button",{staticStyle:{"margin-bottom":"16px"},attrs:{type:"primary"},on:{click:t.showDataCreateForm}},[t._v("新增")]),a("div",[a("DetailBlock",{attrs:{title:"钱包类型列表"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{prop:"wallet_name",label:"钱包类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"title"},[t._v(t._s(e.row.wallet_name))])]}}])}),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"title"},[t._v(t._s(t.timestampToDatetime(e.row.created_at)))])]}}])}),a("el-table-column",{attrs:{prop:"created_at",label:"修改时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"title"},[t._v(t._s(t.timestampToDatetime(e.row.updated_at)))])]}}])}),a("el-table-column",{attrs:{prop:"opt",label:"操作",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"table-operation"},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return t.showDataEditForm(e.row)}}},[t._v(" 编辑 ")]),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return t.deleteListData(e.row)}}},[t._v(" 删除 ")])],1)]}}])})],1)],1)],1),a("div",[a("Paginate",{attrs:{page:t.params.page,total:t.total},on:{currentChange:t.handleCurrentChange,sizeChange:t.handleSizeChange}})],1),a("el-dialog",{staticClass:"info-dialog",attrs:{visible:t.isShowDialog,width:"1200px",title:"新增钱包类型","z-index":"1000"},on:{"update:visible":function(e){t.isShowDialog=e}}},[a("div",[a("el-form",{ref:"createForm",staticClass:"demo-ruleForm",attrs:{model:t.createForm,rules:t.bannerRules,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"钱包类型",prop:"wallet_name"}},[a("el-input",{attrs:{placeholder:"请输入钱包类型",maxlength:"200"},model:{value:t.createForm.wallet_name,callback:function(e){t.$set(t.createForm,"wallet_name","string"===typeof e?e.trim():e)},expression:"createForm.wallet_name"}})],1)],1)],1),a("template",{slot:"footer"},[a("span",{staticClass:"dialog-footer"},[a("el-button",{staticClass:"dialog-cancel-btn",on:{click:function(e){t.isShowDialog=!1}}},[t._v("取 消")]),a("el-button",{staticClass:"dialog-confirm-btn",attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)])],2),a("el-dialog",{staticClass:"info-dialog",attrs:{visible:t.isShowEditDialog,width:"1200px",title:"编辑钱包类型","z-index":"1000"},on:{"update:visible":function(e){t.isShowEditDialog=e}}},[a("div",[a("el-form",{ref:"editForm",staticClass:"ruleForm",attrs:{model:t.editForm,rules:t.bannerRules,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"钱包类型",prop:"wallet_name"}},[a("el-input",{attrs:{placeholder:"请输入钱包类型",maxlength:"200"},model:{value:t.editForm.wallet_name,callback:function(e){t.$set(t.editForm,"wallet_name","string"===typeof e?e.trim():e)},expression:"editForm.wallet_name"}})],1)],1)],1),a("template",{slot:"footer"},[a("span",{staticClass:"dialog-footer"},[a("el-button",{staticClass:"dialog-cancel-btn",on:{click:function(e){t.isShowEditDialog=!1}}},[t._v("取 消")]),a("el-button",{staticClass:"dialog-confirm-btn",attrs:{type:"primary"},on:{click:t.submitEditWalletType}},[t._v("确 定")])],1)])],2)],1)},o=[],n=a("5530"),s=a("0238"),l=a("365c"),r=a("c466"),c=a("b8d9"),m=a("8510"),d=a("9ea4"),u=a("40b2"),p={components:{Paginate:s["a"],DetailBlock:c["a"],TableSet:m["a"],TopTitle:d["a"],Filters:u["a"]},data:function(){return{timeData:[],params:{page:1,page_size:this.$store.state.attr.pageSize},total:0,loading:!1,submitLoading:!1,tableData:[],enumerateData:{},workId:"",isShowDialog:!1,createForm:{wallet_name:""},editForm:{wallet_name:""},bannerRules:{wallet_name:[{required:!0,message:"请输入钱包类型"}]},isShowEditDialog:!1,bannerId:""}},computed:{},mounted:function(){this.getData(this.params)},methods:{getData:function(t){var e=this;this.loading=!0,Object(l["Fb"])(t).then((function(t){200===t.code?(e.tableData=t.data.list,e.total=parseInt(t.data.listTotalCount)):e.$message.error(t.message),e.loading=!1}))},handleCurrentChange:function(t){this.params.page=t,this.getData(this.params)},handleSizeChange:function(t,e){this.params.page_size=t,this.getData(this.params)},timestampToDatetime:function(t){return Object(r["a"])(t,!0)},showDataCreateForm:function(){var t=this;this.isShowDialog=!0,this.$nextTick((function(){t.$refs.createForm.clearValidate()}))},showDataEditForm:function(t){this.editForm={wallet_name:t.wallet_name},this.bannerId=t.id,this.isShowEditDialog=!0},submitEditWalletType:function(){var t=this;this.$refs["editForm"].validate((function(e){if(!e)return console.log("error submit!!"),!1;Object(l["Gb"])({id:t.bannerId},Object(n["a"])(Object(n["a"])({},t.editForm),{},{status:+t.editForm.status})).then((function(e){200===e.code?(t.$message.success("编辑成功"),t.getData(t.params),t.isShowEditDialog=!1):t.$message.error(e.message)}))}))},submit:function(){var t=this;this.$refs["createForm"].validate((function(e){if(!e)return console.log("error submit!!"),!1;var a=JSON.parse(JSON.stringify(t.createForm));Object(l["Db"])(a).then((function(e){200===e.code?(t.$message.success("新增成功"),t.getData(t.params),t.isShowDialog=!1):t.$message.error(e.message)}))}))},editContent:function(t){this.createForm.content=t.content},editContent2:function(t){this.editForm.content=t.content},deleteListData:function(t){var e=this;this.$confirm("确认删除钱包类型吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(l["Eb"])({id:t.id}).then((function(t){200===t.code?(e.$message.success("删除成功"),e.getData(e.params)):e.$message.error(t.message)}))})).catch((function(){}))}}},g=p,f=(a("be7c"),a("2877")),h=Object(f["a"])(g,i,o,!1,null,"019976ec",null);e["default"]=h.exports},be7c:function(t,e,a){"use strict";var i=a("c6a5"),o=a.n(i);o.a},c6a5:function(t,e,a){}}]);