(window["webpackJsonp_direwolf"]=window["webpackJsonp_direwolf"]||[]).push([["sOServiceApiList"],{"1eb0":function(e,t,i){"use strict";var r=i("7842"),a=i.n(r);a.a},6380:function(e,t,i){"use strict";i.r(t);var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wrapper-cont"},[i("el-row",[i("el-col",{staticStyle:{width:"200px"}},[i("el-radio-group",{attrs:{size:"small"},on:{change:e.radioChange},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[i("el-radio-button",{attrs:{label:"tree"}},[e._v("树状查看")]),i("el-radio-button",{attrs:{label:"table"}},[e._v("表格查看")])],1)],1),i("el-col",{staticStyle:{width:"calc(100% - 200px)"}},["tree"==e.radio?i("div",{staticClass:"el-collapse-item__header is-active",staticStyle:{padding:"10px 0"}},[e._v(e._s(e.treeShowPage)+"\n ")]):e._e()])],1),i("div",{staticStyle:{"margin-top":"5px"}},["tree"==e.radio?i("div",[e._m(0),i("div",{staticClass:"right"},[i("el-row",[i("el-col",{attrs:{span:24}},["service"==e.treeShowType?i("div",[i("s-o-service-list")],1):e._e(),"apiGroup"==e.treeShowType?i("div",[i("s-o-api-group-list",{attrs:{serviceCode:e.serviceCode}})],1):e._e(),"api"==e.treeShowType?i("div",[i("s-o-service-api-list-for-tree",{attrs:{serviceCode:e.serviceCode,apiCategoryCode:e.apiCategoryCode}})],1):e._e()])],1)],1)]):i("div",[i("s-o-service-api-list-for-table")],1)])],1)},a=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"left"},[i("div",{staticClass:"ibox float-e-margins"},[i("div",{staticClass:"ibox-content",attrs:{id:""}},[i("div",{staticClass:"ml-10",attrs:{id:"div_resTree"}},[i("ul",{staticClass:"ztree",staticStyle:{width:"300px",overflow:"auto"},attrs:{id:"apiGroupTree"}})])])])])}],o=(i("ac6a"),i("7c01")),s=i("7fc4"),n=i("cbaf"),c=i("e12c"),l=i("31af"),d={name:"treeServiceApiList",components:{SOServiceList:s["default"],SOApiGroupList:n["default"],SOServiceApiListForTree:c["a"],SOServiceApiListForTable:l["a"]},data:function(){return{radio:"tree",treeShowType:"",serviceCode:"",apiCategoryCode:"",treeShowPage:"服务中心"}},computed:{},methods:{radioChange:function(e){var t=this;"tree"===e&&t.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,i,r){t.resTree.currentNodeId=r.id,t.resTable.updateTable(r)}}},zTreeOnClick:function(e,i,r){t.resTree.currentNodeId=r.id,t.resTable.updateTable(r.id)},updateTree:function(){e.$$utils.axiosRequest(o["a"]+"/sys/sOApiGroup/getSOApiGroupTree").then((function(i){var r=i.data;r.forEach((function(e){"0"===e.id&&(e.open=!0)})),$.fn.zTree.init($("#apiGroupTree"),t.resTree.setting,r);var a=$.fn.zTree.getZTreeObj("apiGroupTree"),o=a.getNodes();o.length>0?(a.selectNode(o[0]),a.setting.callback.onClick(null,a.setting.treeId,o[0]),e.treeShowType="service"):e.$$utils.direwolfCommonTips("error","树加载失败或数据不存在")}))}},resTable:{updateTable:function(t){console.log(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;e.radioChange("tree")}},p=d,u=(i("1eb0"),i("2877")),v=Object(u["a"])(p,r,a,!1,null,"67627ab7",null);t["default"]=v.exports},7842:function(e,t,i){}}]);