SysOauthAppGrantApiList-1.3.10.js 4.1 KB

1
  1. (window["webpackJsonp_direwolf"]=window["webpackJsonp_direwolf"]||[]).push([["SysOauthAppGrantApiList"],{"06c8":function(e,t,a){"use strict";var i=a("4ae4"),r=a.n(i);r.a},"4ae4":function(e,t,a){},"5c1d":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"wrapper-cont"},[a("el-card",{staticClass:"box-card search-content",attrs:{shadow:"never"}},[a("el-form",{attrs:{"label-position":"right",size:"small","label-width":"100px",id:"sysOauthAppSearchForm",model:e.searchParams}},[a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"第三方应用"}},[a("el-select",{attrs:{placeholder:"请选择第三方应用"},on:{change:e.oauthAppIdChange},model:{value:e.searchParams.oauthAppId,callback:function(t){e.$set(e.searchParams,"oauthAppId",t)},expression:"searchParams.oauthAppId"}},e._l(e.oauthAppList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.appName,value:e.appId}})})),1)],1)],1)],1)],1)],1),a("div",{staticStyle:{"margin-top":"5px"}},[a("div",[e._m(0),a("div",{staticClass:"right"},[a("el-row",[a("el-col",{attrs:{span:24}},["service"==e.treeShowType?a("div",[a("s-o-service-list",{attrs:{isView:e.isView}})],1):e._e(),"apiGroup"==e.treeShowType?a("div",[a("s-o-api-group-list",{attrs:{isView:e.isView,serviceCode:e.serviceCode}})],1):e._e(),"api"==e.treeShowType?a("div",[a("s-o-service-api-list-for-tree",{attrs:{isView:e.isView,oauthAppId:e.searchParams.oauthAppId,serviceCode:e.serviceCode,apiCategoryCode:e.apiCategoryCode}})],1):e._e()])],1)],1)])])],1)},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"left"},[a("div",{staticClass:"ibox float-e-margins"},[a("div",{staticClass:"ibox-content",attrs:{id:""}},[a("div",{staticClass:"ml-10",attrs:{id:"div_resTree"}},[a("ul",{staticClass:"ztree",staticStyle:{width:"300px",overflow:"auto"},attrs:{id:"apiGroupTree"}})])])])])}],s=(a("ac6a"),a("cebc")),o=a("0ca0"),p=a("7c01"),c=a("7fc4"),n=a("cbaf"),l=a("e12c"),d=a("31af"),u={oauthAppId:""},h={name:"treeServiceApiList",components:{SOServiceList:c["default"],SOApiGroupList:n["default"],SOServiceApiListForTree:l["a"],SOServiceApiListForTable:d["a"]},data:function(){return{searchParams:Object(s["a"])({},u),oauthAppList:[],isView:!0,radio:"tree",treeShowType:"",serviceCode:"",apiCategoryCode:"",treeShowPage:"服务中心"}},computed:{},methods:{oauthAppIdChange:function(e){this.initApiGroupTree()},initApiGroupTree:function(){var e=this,t={resTree:{setting:{view:{dblClickExpand:!0,showLine:!0,selectedMulti:!1,fontCss:function(e,t){return t.highlight?{color:"#A60000","font-weight":"bold"}:{color:"#333","font-weight":"normal"}}},data:{simpleData:{enable:!0,rootPId:""}},callback:{onClick:function(e,a,i){t.resTree.currentNodeId=i.id,t.resTable.updateTable(i)}}},zTreeOnClick:function(e,a,i){t.resTree.currentNodeId=i.id,t.resTable.updateTable(i.id)},updateTree:function(){e.$$utils.axiosRequest(p["a"]+"/sys/sOServiceApi/getSOServiceApiGroupTree?oauthAppId="+e.searchParams.oauthAppId).then((function(a){var i=a.data;i.forEach((function(e){e.open=!0})),$.fn.zTree.init($("#apiGroupTree"),t.resTree.setting,i);var r=$.fn.zTree.getZTreeObj("apiGroupTree"),s=r.getNodes();s.length>0?(r.selectNode(s[0]),r.setting.callback.onClick(null,r.setting.treeId,s[0]),e.treeShowType="service"):e.$$utils.direwolfCommonTips("error","树加载失败或数据不存在")}))}},resTable:{updateTable:function(t){"0"===t.id?(e.treeShowType="service",e.treeShowPage="服务中心"):"service"===t.type?(e.treeShowType="",e.serviceCode=t.id,e.treeShowPage="服务群",e.$nextTick((function(){e.treeShowType="apiGroup"}))):"apiGroup"===t.type&&(e.treeShowType="",e.serviceCode=t.pId,e.apiCategoryCode=t.groupCode,e.treeShowPage="api接口",e.$nextTick((function(){e.treeShowType="api"})))}}};t.resTree.updateTree()}},created:function(){var e=this;o["a"].getOauthAppListByUser().then((function(t){e.oauthAppList=t.data,e.oauthAppList.length>0&&(e.searchParams.oauthAppId=e.oauthAppList[0].appId),e.initApiGroupTree()}))}},f=h,v=(a("06c8"),a("2877")),w=Object(v["a"])(f,i,r,!1,null,"40fcbb76",null);t["default"]=w.exports}}]);