(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21b36b8b","chunk-3b67c729"],{"10fc":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"角色名称",prop:"roleName"}},[a("el-input",{attrs:{placeholder:"角色名称"},model:{value:e.dataForm.roleName,callback:function(t){e.$set(e.dataForm,"roleName",t)},expression:"dataForm.roleName"}})],1),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{placeholder:"备注"},model:{value:e.dataForm.remark,callback:function(t){e.$set(e.dataForm,"remark",t)},expression:"dataForm.remark"}})],1),a("el-form-item",{attrs:{size:"mini",label:"授权"}},[a("el-tree",{ref:"menuListTree",attrs:{data:e.menuList,props:e.menuListTreeProps,"node-key":"menuId","show-checkbox":""}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},s=[],i=a("ed08"),n=a("20ca"),o={data(){return{visible:!1,menuList:[],menuListTreeProps:{label:"name",children:"children"},dataForm:{id:0,roleName:"",remark:""},dataRule:{roleName:[{required:!0,message:"角色名称不能为空",trigger:"blur"},{pattern:/\s\S+|S+\s|\S/,message:"请输入正确的角色名称",trigger:"blur"}],remark:[{required:!1,pattern:/\s\S+|S+\s|\S/,message:"输入格式有误",trigger:"blur"}]},tempKey:-666666}},methods:{init(e){this.dataForm.id=e||0,this.$http({url:this.$http.adornUrl("/sys/menu/table"),method:"get",params:this.$http.adornParams()}).then(({data:e})=>{this.menuList=Object(i["e"])(e,"menuId","parentId")}).then(()=>{this.visible=!0,this.$nextTick(()=>{this.$refs["dataForm"].resetFields(),this.$refs.menuListTree.setCheckedKeys([])})}).then(()=>{this.dataForm.id&&this.$http({url:this.$http.adornUrl("/sys/role/info/"+this.dataForm.id),method:"get",params:this.$http.adornParams()}).then(({data:e})=>{this.dataForm.roleName=e.roleName,this.dataForm.remark=e.remark;var t=e.menuIdList.indexOf(this.tempKey);-1!==t&&e.menuIdList.splice(t,e.menuIdList.length-t),this.$refs.menuListTree.setCheckedKeys(e.menuIdList)})})},dataFormSubmit:Object(n["a"])((function(){this.$refs["dataForm"].validate(e=>{e&&this.$http({url:this.$http.adornUrl("/sys/role"),method:this.dataForm.id?"put":"post",data:this.$http.adornData({roleId:this.dataForm.id||void 0,roleName:this.dataForm.roleName,remark:this.dataForm.remark,menuIdList:[].concat(this.$refs.menuListTree.getCheckedKeys(),[this.tempKey],this.$refs.menuListTree.getHalfCheckedKeys())})}).then(({data:e})=>{this.$message({message:"操作成功",type:"success",duration:1500,onClose:()=>{this.visible=!1,this.$emit("refreshDataList")}})})})}))}},l=o,d=a("2877"),m=Object(d["a"])(l,r,s,!1,null,null,null);t["default"]=m.exports},"20ca":function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));const r=(e,t)=>{let a,r=t||300;return function(){let t=arguments;a&&clearTimeout(a);let s=!a;a=setTimeout(()=>{a=null},r),s&&e.apply(this,t)}}},bb14:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mod-transport"},[a("avue-crud",{ref:"crud",attrs:{page:e.page,data:e.dataList,option:e.tableOption},on:{"update:page":function(t){e.page=t},"search-change":e.searchChange,"selection-change":e.selectionChange,"on-load":e.getDataList},scopedSlots:e._u([{key:"menu",fn:function(t){return[e.isAuth("sys:user:update")?a("el-button",{attrs:{type:"primary",icon:"el-icon-edit",size:"small"},on:{click:function(a){return a.stopPropagation(),e.addOrUpdateHandle(t.row.roleId)}}},[e._v("调整")]):e._e()]}}])}),e.addOrUpdateVisible?a("add-or-update",{ref:"addOrUpdate",on:{refreshDataList:e.getDataList}}):e._e()],1)},s=[];const i={searchMenuSpan:6,columnBtn:!1,border:!0,selection:!1,index:!1,indexLabel:"序号",stripe:!0,menuAlign:"center",menuWidth:350,align:"center",refreshBtn:!0,searchSize:"mini",addBtn:!1,editBtn:!1,delBtn:!1,viewBtn:!1,menu:!0,props:{label:"label",value:"value"},column:[{label:"名称",prop:"name"},{label:"代码",prop:"symbol",search:!0},{label:"交易对",prop:"symbol"},{label:"精度(位)",prop:"decimals"},{label:"交易量倍数",prop:"multiple"}]};var n=a("10fc"),o={data(){return{dataList:[],dataListLoading:!1,dataListSelections:[],addOrUpdateVisible:!1,tableOption:i,page:{total:0,currentPage:1,pageSize:10}}},components:{AddOrUpdate:n["default"]},methods:{getDataList(e,t,a){this.pageIndex,this.pageSize;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/normal/adminItemAction!/list"),method:"get",params:this.$http.adornParams(Object.assign({current:null==e?this.page.currentPage:e.currentPage,size:null==e?this.page.pageSize:e.pageSize},t))}).then(({data:e})=>{this.dataList=e.records,this.page.total=e.total,this.dataListLoading=!1,a&&a()})},searchChange(e,t){this.getDataList(this.page,e,t)},selectionChange(e){this.dataListSelections=e},addOrUpdateHandle(e){this.addOrUpdateVisible=!0,this.$nextTick(()=>{this.$refs.addOrUpdate.init(e)})},deleteHandle(e){var t=e?[e]:this.dataListSelections.map(e=>e.roleId);this.$confirm(`确定进行[${e?"删除":"批量删除"}]操作?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$http({url:this.$http.adornUrl("/sys/role"),method:"delete",data:this.$http.adornData(t,!1)}).then(({data:e})=>{this.$message({message:"操作成功",type:"success",duration:1500,onClose:()=>{this.getDataList()}})})}).catch(()=>{})}}},l=o,d=a("2877"),m=Object(d["a"])(l,r,s,!1,null,null,null);t["default"]=m.exports}}]);