\r\n'),""===i&&t.setCursor(a.line,a.ch+1)},mindmap:function(t,e,a,i){t.replaceSelection("\n```mindmap\n# 一级\n## 二级分支1\n### 三级分支1\n### 三级分支2\n## 二级分支2\n### 三级分支3\n### 三级分支4\n```\n"),""===i&&t.setCursor(a.line,a.ch+1)},center:function(t,e,a,i){t.replaceSelection(""+i+""),""===i&&t.setCursor(a.line,a.ch+1)}},lang:{toolbar:{toc:"在最开头插入TOC,自动生成标题目录",mindmap:"插入思维导图",video:"插入视频",center:"居中"}},onchange:function(){t.deal_with_content()}}}}},components:{BigImg:K},data:function(){return{instance:null,showImg:!1,imgSrc:""}},computed:{},mounted:function(){var t=this;X([this.editorPath+"/../jquery.min.js",this.editorPath+"/lib/raphael.min.js",this.editorPath+"/lib/flowchart.min.js",this.editorPath+"/lib/d3@5.min.js"],function(){X([t.editorPath+"/../xss.min.js",t.editorPath+"/lib/marked.min.js",t.editorPath+"/lib/prettify.min.js",t.editorPath+"/lib/underscore.min.js",t.editorPath+"/lib/sequence-diagram.min.js",t.editorPath+"/lib/jquery.flowchart.min.js",t.editorPath+"/lib/jquery.mark.min.js",t.editorPath+"/lib/plantuml.js",t.editorPath+"/lib/view.min.js",t.editorPath+"/lib/transform.min.js"],function(){X(t.editorPath+"/editormd.js",function(){t.initEditor()}),X(t.editorPath+"/../highlight/highlight.min.js",function(){hljs.initHighlightingOnLoad()})})})},beforeDestroy:function(){for(var t=1;t<999;t++)window.clearInterval(t)},methods:{initEditor:function(){var t=this;this.$nextTick(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.editormd;e&&("editor"==t.type?t.instance=e(t.id,t.editorConfig):t.instance=e.markdownToHTML(t.id,t.editorConfig),t.deal_with_content())})},insertValue:function(t){this.instance.insertValue(this.html_decode(t))},getMarkdown:function(){return this.instance.getMarkdown()},editor_unwatch:function(){return this.instance.unwatch()},editor_watch:function(){return this.instance.watch()},clear:function(){return this.instance.clear()},draft:function(){var t=this;setInterval(function(){localStorage.page_content=t.getMarkdown()},6e4);var e=localStorage.page_content;e&&e.length>0&&(localStorage.removeItem("page_content"),t.$confirm(t.$t("draft_tips"),"",{showClose:!1}).then(function(){t.clear(),t.insertValue(e),localStorage.removeItem("page_content")}).catch(function(){localStorage.removeItem("page_content")}))},beforeunloadHandler:function(t){return(t=t||window.event)&&(t.returnValue="提示"),"提示"},deal_with_content:function(){var t=this;$.each($("#"+this.id+" table"),function(){$(this).prop("outerHTML",''+$(this).prop("outerHTML")+"
")}),$("#"+this.id+' a[href^="http"]').click(function(){var e=$(this).attr("href"),a=t.parseURL(e);return window.location.hostname==a.hostname&&window.location.pathname==a.pathname?(window.location.href=e,a.hash&&window.location.reload()):window.open(e),!1}),$("#"+this.id+" table tbody tr").each(function(){var t=$(this),e=t.find("td").eq(1).html(),a=t.find("td").eq(2).html();"object"==e||"array[object]"==e||"object"==a||"array[object]"==a?t.css({"background-color":"#F8F8F8"}):t.css("background-color","#fff"),t.hover(function(){t.css("background-color","#F8F8F8")},function(){"object"==e||"array[object]"==e||"object"==a||"array[object]"==a?t.css({"background-color":"#F8F8F8"}):t.css("background-color","#fff")})});var e=$("#"+this.id+" p").width();e=e||722,$("#"+this.id+" table").each(function(t){var a=$(this).get(0).rows.item(0).cells.length,i=Math.floor(e/a)-2;a<=5&&$(this).find("th").css("width",i.toString()+"px")}),$("#"+this.id+" img").click(function(){var e=$(this).attr("src");t.showImg=!0,t.imgSrc=e}),$("#"+this.id+" table thead tr").css("background-color","#409eff"),$("#"+this.id+" table thead tr").css("color","#fff"),$("#"+this.id+" .linenums").css("padding-left","5px"),$("#"+this.id+" .linenums li code").each(function(){$(this).find("span").text()&&$(this).parent().css("list-style-type","none")}),$("#"+this.id+" .linenums li").css("background-color","#fcfcfc"),$(".markdown-body pre").css("background-color","#fcfcfc"),$(".markdown-body pre").css("border","1px solid #e1e1e8"),this.keyword&&$("#"+this.id).mark(this.keyword)},html_decode:function(t){return 0==t.length?"":t.replace(/>/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ /g," ").replace(/'/g,"'").replace(/"/g,'"')},parseURL:function(t){var e=document.createElement("a");return e.href=t,{source:t,protocol:e.protocol.replace(":",""),host:e.hostname,hostname:e.hostname,port:e.port,query:e.search,params:function(){for(var t,a={},i=e.search.replace(/^\?/,"").split("&"),o=i.length,n=0;n0}},methods:{gototop:function(){var t=this;t.timer=setInterval(function(){t.scrollTop-=2e3,t.scrollTop<100&&(t.scrollTop=0,t.status=!1,clearInterval(t.timer)),scrollTo(0,t.scrollTop)},this.speed)}},destroyed:function(){clearInterval(this.timer)}},at={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{directives:[{name:"show",rawName:"v-show",value:this.status,expression:"status"}],staticClass:"gotop-box",on:{click:this.gototop}},[e("i",{staticClass:"el-icon-caret-top",attrs:{title:this.$t("back_to_top")}})])},staticRenderFns:[]};var it=a("VU/8")(et,at,!1,function(t){a("M2JD")},"data-v-f105c618",null).exports,ot={data:function(){return{}},mounted:function(){var t=this,e=setInterval(function(){try{void 0!=$&&(clearInterval(e),t.toc_main_script())}catch(t){}},200)},methods:{toc_main_script:function(){$(document).on("click",".markdown-toc-list a[href]",function(t){t.preventDefault();var e=$(this).attr("href").substring(1),a=$('[name="'+e+'"]').offset().top;$("html, body").animate({scrollTop:a},300)}),$(document).on("click",".markdown-toc",function(t){$(t.target).is("a")||$(".markdown-toc").toggleClass("open-list")}),$(window).scroll(function(t){var e="";$(".markdown-toc-list a[href]").each(function(t,a){var i=$(a).attr("href").substring(1);if(!($('[name="'+i+'"]').offset().top-$(window).scrollTop()<1))return!1;e=i}),$(".markdown-toc-list a").removeClass("current"),$('.markdown-toc-list a[href="#'+e+'"]').addClass("current")}),!this.isMobile()&&window.screen.width>1e3&&this.$nextTick(function(){setTimeout(function(){$(".markdown-toc").click()},200)})}},destroyed:function(){$(document).off("click",".markdown-toc-list a[href]"),$(document).off("click",".markdown-toc"),$(".markdown-toc").remove()}},nt={render:function(){var t=this.$createElement;return(this._self._c||t)("div")},staticRenderFns:[]};var st=a("VU/8")(ot,nt,!1,function(t){a("yUSZ")},null,null).exports,rt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.catalog.length?t._l(t.catalog,function(e){return a("el-submenu",{key:e.cat_id,attrs:{index:e.cat_id}},[a("template",{slot:"title"},[a("img",{attrs:{src:"static/images/folder.png"}}),t._v("\n "+t._s(e.cat_name)+"\n ")]),t._v(" "),e.pages?t._l(e.pages,function(e){return a("el-menu-item",{key:e.page_id,attrs:{index:e.page_id}},[a("i",{staticClass:"el-icon-document"}),t._v(" "),a("span",{attrs:{title:e.page_title,id:"left_page_"+e.page_id}},[t._v(t._s(e.page_title))])])}):t._e(),t._v(" "),e.catalogs.length?a("LeftMenuSub",{attrs:{catalog:e.catalogs}}):t._e()],2)}):t._e()],2)},staticRenderFns:[]};var lt={props:{get_page_content:"",item_info:"",search_item:"",keyword:""},data:function(){return{openeds:[],menu:"",show_menu_btn:!1,hideScrollbar:!0,asideWidth:"250px",menuMarginLeft:"menu-margin-left1"}},components:{LeftMenuSub:a("VU/8")({name:"LeftMenuSub",props:{catalog:[]},data:function(){return{}},components:{},methods:{},mounted:function(){}},rt,!1,function(t){a("RU/w")},"data-v-e06959a0",null).exports},methods:{select_menu:function(t,e){this.change_url(t),this.get_page_content(t)},new_page:function(){var t="/page/edit/"+this.item_info.item_id+"/0";this.$router.push({path:t})},mamage_catalog:function(){var t="/catalog/"+this.item_info.item_id;this.$router.push({path:t})},change_url:function(t){var e=this.item_info.item_domain?this.item_info.item_domain:this.item_info.item_id;this.$router.replace({path:"/"+e,query:{page_id:t}})},input_keyword:function(){this.search_item(this.keyword)},show_menu:function(){this.show_menu_btn=!1;var t=document.getElementById("left-side-menu");t.style.display="block",t.style.marginLeft="0px",t.style.marginTop="0px",t.style.position="static",(t=document.getElementById("p-content")).style.display="none"},hide_menu:function(){this.show_menu_btn=!0;var t=document.getElementById("left-side-menu");t.style.display="none",(t=document.getElementById("p-content")).style.marginLeft="0px",t.style.display="block",(t=document.getElementById("page_md_content")).style.width="95%"}},mounted:function(){this.menu=this.item_info.menu;var t=this.item_info;t.default_page_id>0&&(this.select_menu(t.default_page_id),t.default_cat_id4?this.openeds=[t.default_cat_id4,t.default_cat_id3,t.default_cat_id2,t.default_page_id]:t.default_cat_id3?this.openeds=[t.default_cat_id3,t.default_cat_id2,t.default_page_id]:t.default_cat_id2&&(this.openeds=[t.default_cat_id2,t.default_page_id]),setTimeout(function(){document.querySelector("#left_page_"+t.default_page_id).scrollIntoView()},1e3)),window.screen.width>=1600&&this.menu.catalogs&&this.menu.catalogs.length>0&&(this.asideWidth="300px",this.menuMarginLeft="menu-margin-left2")}},ct={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:t.hideScrollbar?"hide-scrollbar":"normal-scrollbar"},[t.show_menu_btn?a("i",{staticClass:"el-icon-menu header-left-btn",attrs:{id:"header-left-btn"},on:{click:t.show_menu}}):t._e(),t._v(" "),t.show_menu_btn?a("i",{staticClass:"el-icon-menu header-left-btn",attrs:{id:"header-left-btn"},on:{click:t.show_menu}}):t._e(),t._v(" "),a("el-aside",{class:t.menuMarginLeft,attrs:{id:"left-side-menu",width:t.asideWidth},nativeOn:{mouseenter:function(e){t.hideScrollbar=!1},mouseleave:function(e){t.hideScrollbar=!0}}},[a("el-menu",{attrs:{"background-color":"#fafafa","text-color":"","active-text-color":"#008cff","default-active":t.item_info.default_page_id,"default-openeds":t.openeds},on:{select:t.select_menu}},[a("el-input",{staticClass:"search-box",attrs:{placeholder:t.$t("input_keyword"),clearable:!0},on:{clear:function(e){return t.search_item()}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.input_keyword(e)}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}}),t._v(" "),t.menu.pages&&t.menu.pages.length?t._l(t.menu.pages,function(e){return a("el-menu-item",{key:e.page_id,attrs:{index:e.page_id}},[a("i",{staticClass:"el-icon-document"}),t._v(" "),a("span",{attrs:{title:e.page_title}},[t._v(t._s(e.page_title))])])}):t._e(),t._v(" "),t.menu.catalogs&&t.menu.catalogs.length?a("LeftMenuSub",{attrs:{catalog:t.menu.catalogs}}):t._e()],2)],1)],1)},staticRenderFns:[]};var dt=a("VU/8")(lt,ct,!1,function(t){a("jCWs"),a("xkpm")},"data-v-69908a5d",null).exports,mt={props:{callback:"",page_id:"",is_modal:!0,is_show_recover_btn:!0},data:function(){return{currentDate:new Date,content:[],dialogTableVisible:!1}},components:{},methods:{get_content:function(){var t=this,e=DocConfig.server+"/api/page/history",a=new URLSearchParams,i=this.page_id?this.page_id:t.$route.params.page_id;a.append("page_id",i),t.axios.post(e,a).then(function(e){0===e.data.error_code?e.data.data.length>0?(t.content=e.data.data,t.dialogTableVisible=!0):(t.dialogTableVisible=!1,t.$alert("no data")):(t.dialogTableVisible=!1,t.$alert(e.data.error_message))}).catch(function(t){console.log(t)})},show:function(){this.get_content()},recover:function(t){this.callback(t.page_content,!0),this.dialogTableVisible=!1},preview_diff:function(t){var e=t.page_history_id,a="#/page/diff/"+(this.page_id?this.page_id:this.$route.params.page_id)+"/"+e;window.open(a)}},mounted:function(){}},_t={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",{staticClass:"container-narrow"},[a("el-dialog",{attrs:{title:t.$t("history_version"),modal:t.is_modal,visible:t.dialogTableVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-table",{attrs:{data:t.content}},[a("el-table-column",{attrs:{property:"addtime",label:t.$t("update_time"),width:"170"}}),t._v(" "),a("el-table-column",{attrs:{property:"author_username",label:t.$t("update_by_who")}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.preview_diff(e.row)}}},[t._v(t._s(t.$t("overview")))]),t._v(" "),t.is_show_recover_btn?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.recover(e.row)}}},[t._v(t._s(t.$t("recover_to_this_version")))]):t._e()]}}])})],1)],1)],1),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var pt=a("VU/8")(mt,_t,!1,function(t){a("gfD7")},null,null).exports,ut={props:{item_id:"",item_domain:"",page_id:"",item_info:"",page_info:{}},data:function(){return{menu:[],dialogVisible:!1,qr_page_link:"#",qr_single_link:"#",share_page_link:"",share_single_link:"",copyText1:"",copyText2:"",isCreateSiglePage:!1,showMore:!1,lang:"",show_menu_btn:!1,show_op_bar:!0}},components:{HistoryVersion:pt},methods:{edit_page:function(){var t=this.page_id>0?this.page_id:0,e="/page/edit/"+this.item_id+"/"+t;this.$router.push({path:e})},share_page:function(){var t=this.page_id>0?this.page_id:0,e=this.item_domain?this.item_domain:this.item_id;this.share_page_link=this.getRootPath()+"#/"+e+"?page_id="+t,this.qr_page_link=DocConfig.server+"/api/common/qrcode&size=3&url="+encodeURIComponent(this.share_page_link),this.dialogVisible=!0,this.copyText1=this.item_info.item_name+" - "+this.page_info.page_title+"\r\n"+this.share_page_link,this.copyText2=this.page_info.page_title+"\r\n"+this.share_single_link},dropdown_callback:function(t){t&&t()},show_page_info:function(){var t="本页面由 "+this.page_info.author_username+" 于 "+this.page_info.addtime+" 更新";this.$alert(t)},ShowHistoryVersion:function(){this.$refs.HistoryVersion.show()},delete_page:function(){var t=this.page_id>0?this.page_id:0,e=this,a=DocConfig.server+"/api/page/delete";this.$confirm(e.$t("comfirm_delete")," ",{confirmButtonText:e.$t("confirm"),cancelButtonText:e.$t("cancel"),type:"warning"}).then(function(){var i=new URLSearchParams;i.append("page_id",t),e.axios.post(a,i).then(function(t){0===t.data.error_code?window.location.reload():e.$alert(t.data.error_message)})})},onCopy:function(){this.$message(this.$t("copy_success"))},checkCreateSiglePage:function(t){var e=this;t?this.CreateSiglePage():this.$confirm(this.$t("cancelSingle")," ",{confirmButtonText:this.$t("cancelSingleYes"),cancelButtonText:this.$t("cancelSingleNo"),type:"warning"}).then(function(){e.CreateSiglePage()},function(){e.isCreateSiglePage=!0})},CreateSiglePage:function(){var t=this.page_id>0?this.page_id:0,e=this,a=DocConfig.server+"/api/page/createSinglePage",i=new URLSearchParams;i.append("page_id",t),i.append("isCreateSiglePage",this.isCreateSiglePage),e.axios.post(a,i).then(function(t){if(0===t.data.error_code){var a=t.data.data.unique_key;e.share_single_link=a?e.getRootPath()+"#/p/"+a:""}else e.$alert(t.data.error_message)})},new_page:function(){var t="/page/edit/"+this.item_info.item_id+"/0";this.$router.push({path:t})},mamage_catalog:function(){var t="/catalog/"+this.item_info.item_id;this.$router.push({path:t})},showMoreAction:function(){this.showMore=!0,document.getElementById("page_md_content").getElementsByClassName("open-list")[0].style.top="330px"},hideMoreAction:function(){this.showMore=!1,document.getElementById("page_md_content").getElementsByClassName("open-list")[0].style.top="230px"},handleCommand:function(t){switch(t){case"goback":this.$router.push({path:"/item/index"});break;case"share":this.share_page();break;case"new_page":this.new_page();break;case"new_catalog":this.mamage_catalog();break;case"edit_page":this.edit_page();break;case"ShowHistoryVersion":this.ShowHistoryVersion();break;case"copy":this.$router.push({path:"/page/edit/"+this.item_info.item_id+"/0?copy_page_id="+this.page_id});break;case"export":this.$router.push({path:"/item/export/"+this.item_info.item_id});break;case"delete_page":this.delete_page()}}},mounted:function(){var t=this;this.lang=DocConfig.lang,this.page_info.unique_key&&(this.isCreateSiglePage=!0,this.share_single_link=this.getRootPath()+"#/p/"+this.page_info.unique_key),document.onkeydown=function(e){var a=window.event?e.keyCode:e.which;69==a&&e.ctrlKey&&(t.edit_page(),e.preventDefault()),46==a&&e.ctrlKey&&(t.delete_page(),e.preventDefault())},(this.isMobile()||window.innerWidth<1300&&!this.item_info.is_login)&&(this.show_menu_btn=!1,this.show_op_bar=!1),(this.isMobile()||window.innerWidth<1300&&this.item_info.is_login)&&(this.show_menu_btn=!0,this.show_op_bar=!1)},watch:{page_info:function(){this.page_info.unique_key?(this.isCreateSiglePage=!0,this.share_single_link=this.getRootPath()+"#/p/"+this.page_info.unique_key):(this.isCreateSiglePage=!1,this.share_single_link="")}},destroyed:function(){document.onkeydown=void 0}},ft={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[t.show_menu_btn?a("div",{attrs:{id:"header-right-btn"}},[a("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[a("i",{staticClass:"el-icon-caret-bottom el-icon--right"})]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"goback"}},[t._v(t._s(t.$t("goback")))]),t._v(" "),a("el-dropdown-item",{attrs:{command:"share"}},[t._v(t._s(t.$t("share")))]),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"new_page"}},[t._v(t._s(t.$t("new_page")))]):t._e(),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"new_catalog"}},[t._v(t._s(t.$t("new_catalog")))]):t._e(),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"edit_page"}},[t._v(t._s(t.$t("edit_page")))]):t._e(),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"copy"}},[t._v(t._s(t.$t("copy")))]):t._e(),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"ShowHistoryVersion"}},[t._v(t._s(t.$t("history_version")))]):t._e(),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"export"}},[t._v(t._s(t.$t("export")))]):t._e(),t._v(" "),t.item_info.ItemPermn?a("el-dropdown-item",{attrs:{command:"delete_page"}},[t._v(t._s(t.$t("delete_interface")))]):t._e()],1)],1)],1):t._e(),t._v(" "),t.show_op_bar?a("div",{staticClass:"op-bar"},[t.item_info.is_login?t._e():a("span",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("index_login_or_register"),placement:"top"}},[a("router-link",{attrs:{to:"/user/login"}},[a("i",{staticClass:"el-icon-user"})])],1),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("history_version"),placement:"top"}},[a("i",{staticClass:"el-icon-goods",on:{click:t.ShowHistoryVersion}})]),t._v(" "),"zh-cn"==t.lang?a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("about_showdoc"),placement:"top"}},[a("a",{attrs:{href:"https://www.showdoc.cc/help",target:"_blank"}},[a("i",{staticClass:"el-icon-arrow-right"})])]):t._e()],1),t._v(" "),t.item_info.is_login?a("span",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("goback"),placement:"left"}},[a("router-link",{attrs:{to:"/item/index"}},[a("i",{staticClass:"el-icon-back"})])],1),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("share"),placement:"top"}},[a("i",{staticClass:"el-icon-share",on:{click:t.share_page}})]),t._v(" "),t.item_info.ItemPermn?t._e():a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("detail"),placement:"top"}},[a("i",{staticClass:"el-icon-info",on:{click:t.show_page_info}})])],1):t._e(),t._v(" "),t.item_info.ItemPermn?a("span",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("new_page"),placement:"top"}},[a("i",{staticClass:"el-icon-plus",on:{click:t.new_page}})]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("new_catalog"),placement:"left"}},[a("i",{staticClass:"el-icon-folder",on:{click:t.mamage_catalog}})]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("edit_page"),placement:"top"}},[a("i",{staticClass:"el-icon-edit",on:{click:t.edit_page}})]),t._v(" "),a("el-tooltip",{directives:[{name:"show",rawName:"v-show",value:!t.showMore,expression:"!showMore"}],staticClass:"item",attrs:{effect:"dark",content:t.$t("more"),placement:"top"}},[a("i",{staticClass:"el-icon-caret-top",on:{click:t.showMoreAction}})]),t._v(" "),a("el-tooltip",{directives:[{name:"show",rawName:"v-show",value:t.showMore,expression:"showMore"}],staticClass:"item",attrs:{effect:"dark",content:t.$t("more"),placement:"top"}},[a("i",{staticClass:"el-icon-caret-bottom",on:{click:t.hideMoreAction}})]),t._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:t.showMore,expression:"showMore"}]},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("copy"),placement:"left"}},[a("router-link",{attrs:{to:"/page/edit/"+t.item_id+"/0?copy_page_id="+t.page_id}},[a("i",{staticClass:"el-icon-document"})])],1),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("history_version"),placement:"top"}},[a("i",{staticClass:"el-icon-goods",on:{click:t.ShowHistoryVersion}})]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("detail"),placement:"top"}},[a("i",{staticClass:"el-icon-info",on:{click:t.show_page_info}})]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("export"),placement:"left"}},[t.item_info.ItemPermn?a("router-link",{attrs:{to:"/item/export/"+t.item_info.item_id}},[a("i",{staticClass:"el-icon-download"})]):t._e()],1),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("delete_interface"),placement:"top"}},[a("i",{staticClass:"el-icon-delete",on:{click:t.delete_page}})]),t._v(" "),t.item_info.ItemCreator?a("span",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("item_setting"),placement:"top"}},[t.item_info.ItemCreator?a("router-link",{attrs:{to:"/item/setting/"+t.item_info.item_id}},[a("i",{staticClass:"el-icon-setting"})]):t._e()],1)],1):t._e()],1)],1):t._e()]):t._e(),t._v(" "),a("el-dialog",{attrs:{title:t.$t("share_page"),visible:t.dialogVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("p",[t._v("\n "+t._s(t.$t("item_page_address"))+" :\n "),a("code",[t._v(t._s(t.share_page_link))]),t._v(" "),a("i",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.share_page_link,expression:"share_page_link",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"}],staticClass:"el-icon-document-copy"})]),t._v(" "),t._e(),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.item_info.ItemPermn,expression:"item_info.ItemPermn"}]},[a("el-checkbox",{on:{change:t.checkCreateSiglePage},model:{value:t.isCreateSiglePage,callback:function(e){t.isCreateSiglePage=e},expression:"isCreateSiglePage"}},[t._v(t._s(t.$t("create_sigle_page")))]),t._v(" "),t.isCreateSiglePage?a("p",[t._v("\n "+t._s(t.$t("single_page_address"))+" :\n "),a("code",[t._v(t._s(t.share_single_link))]),t._v(" "),a("i",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.share_single_link,expression:"share_single_link",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"}],staticClass:"el-icon-document-copy"})]):t._e(),t._v(" "),a("p"),t._v(" "),a("p",[t._v(t._s(t.$t("create_sigle_page_tips")))])],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v(t._s(t.$t("confirm")))])],1)]),t._v(" "),a("HistoryVersion",{ref:"HistoryVersion",attrs:{page_id:t.page_id,is_show_recover_btn:!1,is_modal:!1,callback:"insertValue"}})],1)},staticRenderFns:[]};var ht=a("VU/8")(ut,ft,!1,function(t){a("aVn+")},"data-v-69443d87",null).exports,gt={props:{callback:"",page_id:"",item_id:"",manage:!0},data:function(){return{dialogTableVisible:!1,page:1,count:5,display_name:"",username:"",dataList:[],total:0,positive_type:"1",attachment_type:"-1",used:0,used_flow:0,uploadUrl:DocConfig.server+"/api/page/upload"}},components:{},computed:{uploadData:function(){return{page_id:this.page_id,item_id:this.item_id}}},methods:{getList:function(){var t=this;this.request("/api/attachment/getMyList",{page:this.page,count:this.count,attachment_type:this.attachment_type,display_name:this.display_name,username:this.username}).then(function(e){var a=e.data;t.dataList=a.list,t.total=parseInt(a.total),t.used=a.used_m,t.used_flow=a.used_flow_m})},show:function(){this.dialogTableVisible=!0,this.getList()},handleCurrentChange:function(t){this.page=t,this.getList()},onSubmit:function(){this.page=1,this.getList()},visit:function(t){window.open(t.url)},delete_row:function(t){var e=this;this.$confirm(this.$t("confirm_delete")," ",{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then(function(){e.request("/api/attachment/deleteMyAttachment",{file_id:t.file_id}).then(function(t){e.$message.success(e.$t("op_success")),e.getList()})})},uploadCallback:function(t){t.error_message&&this.$alert(t.error_message),this.$refs.uploadFile.clearFiles(),this.getList()},select:function(t){var e=this;this.request("/api/attachment/bindingPage",{file_id:t.file_id,page_id:this.page_id}).then(function(t){e.dialogTableVisible=!1,e.callback()})}},mounted:function(){}},vt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",{staticClass:"container-narrow"},[a("el-dialog",{attrs:{title:t.$t("file_gub"),visible:t.dialogTableVisible,"close-on-click-modal":!1,width:"65%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("display_name")},model:{value:t.display_name,callback:function(e){t.display_name=e},expression:"display_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{placeholder:""},model:{value:t.attachment_type,callback:function(e){t.attachment_type=e},expression:"attachment_type"}},[a("el-option",{attrs:{label:t.$t("all_attachment_type"),value:"-1"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("image"),value:"1"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("general_attachment"),value:"2"}})],1)],1),t._v(" "),a("el-form-item",[a("el-button",{on:{click:t.onSubmit}},[t._v(t._s(t.$t("search")))])],1),t._v(" "),a("el-form-item",[a("el-upload",{ref:"uploadFile",staticClass:"upload-file",attrs:{action:t.uploadUrl,"on-success":t.uploadCallback,"on-error":t.uploadCallback}},[a("el-button",[t._v(t._s(t.$t("upload")))])],1)],1)],1),t._v(" "),a("P",[t._v(t._s(t.$t("accumulated_used_sapce"))+" "+t._s(t.used)+"M , "+t._s(t.$t("month_flow"))+" "+t._s(t.used_flow)+"M")]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList}},[a("el-table-column",{attrs:{prop:"file_id",label:t.$t("file_id")}}),t._v(" "),a("el-table-column",{attrs:{prop:"display_name",label:t.$t("display_name")}}),t._v(" "),a("el-table-column",{attrs:{prop:"file_type",label:t.$t("file_type"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"file_size_m",label:t.$t("file_size_m"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"visit_times",label:t.$t("visit_times")}}),t._v(" "),a("el-table-column",{attrs:{prop:"addtime",label:t.$t("add_time"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:t.operation},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.select(e.row)}}},[t._v(t._s(t.$t("select")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.visit(e.row)}}},[t._v(t._s(t.$t("visit")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.delete_row(e.row)}}},[t._v(t._s(t.$t("delete")))])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("span",{staticClass:"demonstration"}),t._v(" "),a("el-pagination",{attrs:{"page-size":t.count,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var bt={props:{callback:"",page_id:"",item_id:"",manage:!0},data:function(){return{currentDate:new Date,content:[],dialogTableVisible:!1,uploadUrl:DocConfig.server+"/api/page/upload"}},components:{filehub:a("VU/8")(gt,vt,!1,function(t){a("WunF")},null,null).exports},computed:{uploadData:function(){return{page_id:this.page_id,item_id:this.item_id}}},methods:{get_content:function(){var t=this,e=DocConfig.server+"/api/page/uploadList",a=new URLSearchParams;a.append("page_id",this.page_id),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogTableVisible=!0,t.content=e.data.data):(t.dialogTableVisible=!1,t.$alert(e.data.error_message))})},show:function(){this.get_content()},downloadFile:function(t){var e=t.url;window.open(e)},deleteFile:function(t){var e=this;this.$confirm(this.$t("comfirm_delete")," ",{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then(function(){var a=t.file_id,i=e,o=DocConfig.server+"/api/page/deleteUploadFile",n=new URLSearchParams;n.append("file_id",a),n.append("page_id",i.page_id),i.axios.post(o,n).then(function(t){0===t.data.error_code?i.get_content():i.$alert(t.data.error_message)})})},clearFiles:function(){this.$refs.uploadFile.clearFiles(),this.get_content()},insertFile:function(t){var e="["+t.display_name+"]("+t.url+' "['+t.display_name+'")';this.callback(e),this.dialogTableVisible=!1},uploadCallback:function(t){t.error_message&&this.$alert(t.error_message),this.$refs.uploadFile.clearFiles(),this.get_content()},showFilehub:function(){this.$refs.filehub.show()}},mounted:function(){}},wt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",{staticClass:"container-narrow"},[a("el-dialog",{attrs:{title:t.$t("attachment"),visible:t.dialogTableVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",[a("el-button",{on:{click:t.showFilehub}},[t._v(t._s(t.$t("from_file_gub")))])],1),t._v(" "),a("el-form-item",[t.manage?a("el-upload",{ref:"uploadFile",staticClass:"upload-file",attrs:{action:t.uploadUrl,"on-success":t.uploadCallback,"on-error":t.uploadCallback,data:t.uploadData}},[a("el-button",[t._v(t._s(t.$t("upload")))]),t._v(" "),a("small",[t._v(" "+t._s(t.$t("file_size_tips")))])],1):t._e()],1)],1),t._v(" "),a("el-table",{attrs:{data:t.content}},[a("el-table-column",{attrs:{property:"addtime",label:t.$t("add_time"),width:"170"}}),t._v(" "),a("el-table-column",{attrs:{property:"display_name",label:t.$t("file_name")}}),t._v(" "),a("el-table-column",{attrs:{label:t.$t("operation"),width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.downloadFile(e.row)}}},[t._v(t._s(t.$t("download")))]),t._v(" "),t.manage?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.insertFile(e.row)}}},[t._v(t._s(t.$t("insert")))]):t._e(),t._v(" "),t.manage?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.deleteFile(e.row)}}},[t._v(t._s(t.$t("delete")))]):t._e()]}}])})],1)],1)],1),t._v(" "),a("filehub",{ref:"filehub",attrs:{callback:t.get_content,item_id:t.item_id,page_id:t.page_id}}),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var yt=a("VU/8")(bt,wt,!1,function(t){a("fSLA")},null,null).exports,$t=function(t){return t.replace(/&|<|>|'|"/g,function(t){return{"&":"&","<":"<",">":">","'":"'",""":'"'}[t]||t})},kt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=void 0;t=$t(t);try{a=JSON.parse(t)}catch(t){}if(!a||!a.info||!a.info.url)return t;e&&("get"==a.info.method&&e.query&&e.query[0]&&e.query[0].name&&e.query.map(function(t){a.request.params[a.request.params.mode].unshift(t)}),"get"!=a.info.method&&"json"!=a.request.params.mode&&e.body&&e.body[0]&&e.body[0].name&&e.body.map(function(t){a.request.params[a.request.params.mode].unshift(t)}),e.header&&e.header[0]&&e.header[0].name&&e.header.map(function(t){a.request.headers.unshift(t)}));var i="\n[TOC]\n\n##### 简要描述\n - "+(a.info.description?a.info.description:"无")+"\n\n##### 请求URL\n\n - ` "+a.info.url+" `\n\n##### 请求方式\n - "+a.info.method+"\n ";a.request.headers&&a.request.headers[0]&&a.request.headers[0].name&&(i+="\n##### Header\n\n|header|必选|类型|说明|\n|:----- |:-----|-----|\n",a.request.headers.map(function(t){!t.name||t.disable&&t.disable>=1||(i+="|"+t.name+" |"+(t.require>0?"是":"否")+" |"+t.type+" |"+(t.remark?t.remark:"无")+" |\n")}));var o=a.request.params[a.request.params.mode];o&&o[0]&&o[0].name&&(i+="\n##### 请求参数\n\n|参数名|必选|类型|说明|\n|:----- |:-----|-----|\n",o.map(function(t){!t.name||t.disable&&t.disable>=1||(i+="|"+t.name+" |"+(t.require>0?"是":"否")+" |"+t.type+" |"+(t.remark?t.remark:"无")+" |\n")})),"json"==a.request.params.mode&&o&&(i+="\n##### 请求参数示例\n```\n"+o+"\n```\n\n");var n=a.request.params.jsonDesc;("json"==a.request.params.mode&&n&&n[0]&&n[0].name&&(i+="\n##### json字段说明\n\n|字段名|必选|类型|说明|\n|:----- |:-----|-----|\n",n.map(function(t){t.name&&(i+="|"+t.name+" |"+(t.require>0?"是":"否")+" |"+t.type+" |"+(t.remark?t.remark:"无")+" |\n")})),a.response.responseExample&&(i+="\n##### 返回示例\n```\n"+a.response.responseExample+"\n ```\n "),a.response.responseParamsDesc&&a.response.responseParamsDesc[0]&&a.response.responseParamsDesc[0].name)&&(i+="\n##### 返回参数说明\n\n|参数名|类型|说明|\n|:----- |:-----|-----|\n",a.response.responseParamsDesc.map(function(t){t.name&&(i+="|"+t.name+" |"+t.type+" |"+(t.remark?t.remark:"无")+" |\n")}));return i+="\n##### 备注\n\n "+a.info.remark+"\n\n"},xt={props:{item_info:"",search_item:"",keyword:""},data:function(){return{content:"###正在加载...",page_id:"",page_title:"",dialogVisible:!1,share_item_link:"",qr_item_link:"",page_info:"",copyText:"",attachment_count:"",fullPage:!1,showfullPageBtn:!1,showToc:!0,showComp:!0}},components:{Editormd:tt,LeftMenu:dt,OpBar:ht,BackToTop:it,Toc:st,AttachmentList:yt},methods:{get_page_content:function(t){if(!(t<=0)){this.adaptScreen();var e=this;this.request("/api/page/info",{page_id:t},"post",!1).then(function(a){0===a.error_code&&(e.content=kt(a.data.page_content,e.$store.state.item_info.global_param),e.page_title=a.data.page_title,e.page_info=a.data,e.attachment_count=a.data.attachment_count>0?a.data.attachment_count:"",e.page_id=0,e.item_info.default_page_id=t,e.$nextTick(function(){e.page_id=t,document.body.scrollTop=document.documentElement.scrollTop=0,document.title=e.page_title+"--ShowDoc"}))})}},adaptToMobile:function(){this.$refs.leftMenu.hide_menu(),this.show_page_bar=!1;var t=document.getElementById("doc-container");t.style.width="95%",t.style.padding="5px",document.getElementById("header").style.height="10px",document.getElementById("doc-title-box").style.marginTop="40px",this.showToc=!1},adaptToSmallpc:function(){var t=document.getElementById("doc-container");t.style.width="calc( 95% - 300px )",t.style.marginLeft="300px",t.style.padding="20px",document.getElementById("header").style.height="20px",document.getElementById("doc-title-box").style.marginTop="30px"},adaptScreen:function(){var t=this;this.$nextTick(function(){(t.isMobile()||window.innerWidth<1300)&&(window.innerWidth<1300&&window.innerWidth>1100?t.adaptToSmallpc():t.adaptToMobile())})},onCopy:function(){this.$message(this.$t("copy_success"))},ShowAttachment:function(){this.$refs.AttachmentList.show()},clickFullPage:function(){var t=this;if(this.fullPage)this.showComp=!1,this.$nextTick(function(){t.showComp=!0});else{this.adaptToMobile();var e=this.page_id;this.page_id=0,this.$nextTick(function(){t.page_id=e,setTimeout(function(){$(".editormd-html-preview").css("font-size","16px")},200)}),$("#left-side").hide(),$(".op-bar").hide()}this.fullPage=!this.fullPage}},mounted:function(){this.adaptScreen(),this.set_bg_grey()}},Ct={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.showComp?a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("div",{attrs:{id:"header"}}),t._v(" "),a("div",{staticClass:"container doc-container",attrs:{id:"doc-container"}},[a("div",{attrs:{id:"left-side"}},[t.item_info?a("LeftMenu",{ref:"leftMenu",attrs:{get_page_content:t.get_page_content,keyword:t.keyword,item_info:t.item_info,search_item:t.search_item}}):t._e()],1),t._v(" "),a("div",{attrs:{id:"right-side"}},[a("div",{attrs:{id:"p-content"},on:{mouseenter:function(e){t.showfullPageBtn=!0},mouseleave:function(e){t.showfullPageBtn=!1}}},[a("div",{staticClass:"doc-title-box",attrs:{id:"doc-title-box"}},[a("span",{staticClass:"dn",attrs:{id:"doc-title-span"}}),t._v(" "),a("h2",{attrs:{id:"doc-title"}},[t._v(t._s(t.page_title))]),t._v(" "),a("i",{directives:[{name:"show",rawName:"v-show",value:t.showfullPageBtn,expression:"showfullPageBtn"}],staticClass:"el-icon-full-screen",attrs:{id:"full-page"},on:{click:t.clickFullPage}}),t._v(" "),t.attachment_count?a("i",{staticClass:"el-icon-upload item",attrs:{id:"attachment"},on:{click:t.ShowAttachment}}):t._e()]),t._v(" "),a("div",{attrs:{id:"doc-body"}},[a("div",{staticClass:"page_content_main",attrs:{id:"page_md_content"}},[t.page_id?a("Editormd",{attrs:{content:t.content,type:"html",keyword:t.keyword}}):t._e()],1)])]),t._v(" "),a("OpBar",{attrs:{page_id:t.page_id,item_id:t.item_info.item_id,item_info:t.item_info,page_info:t.page_info}})],1)]),t._v(" "),a("BackToTop"),t._v(" "),t.page_id&&t.showToc?a("Toc"):t._e(),t._v(" "),a("AttachmentList",{ref:"AttachmentList",attrs:{callback:"",item_id:t.page_info.item_id,manage:!1,page_id:t.page_info.page_id}}),t._v(" "),a("Footer")],1):t._e()},staticRenderFns:[]};var Ft=a("VU/8")(xt,Ct,!1,function(t){a("Mnhe")},"data-v-64bb7ec7",null).exports,St={data:function(){return{}},mounted:function(){var t=this,e=setInterval(function(){try{void 0!=$&&(clearInterval(e),t.toc_main_script())}catch(t){}},200)},methods:{toc_main_script:function(){$(document).on("click",".markdown-toc-list a[href]",function(t){t.preventDefault();var e=$(this).attr("href").substring(1),a=$('[name="'+e+'"]').offset().top;$("html, body").animate({scrollTop:a},300)}),$(document).on("click",".markdown-toc",function(t){$(t.target).is("a")||$(".markdown-toc").toggleClass("open-list")}),$(window).scroll(function(t){var e="";$(".markdown-toc-list a[href]").each(function(t,a){var i=$(a).attr("href").substring(1);if(!($('[name="'+i+'"]').offset().top-$(window).scrollTop()<1))return!1;e=i}),$(".markdown-toc-list a").removeClass("current"),$('.markdown-toc-list a[href="#'+e+'"]').addClass("current")}),!this.isMobile()&&window.screen.width>1e3&&this.$nextTick(function(){setTimeout(function(){$(".markdown-toc").click()},500)})}},destroyed:function(){$(document).off("click",".markdown-toc-list a[href]"),$(document).off("click",".markdown-toc"),$(".markdown-toc").remove()}},Lt={render:function(){var t=this.$createElement;return(this._self._c||t)("div")},staticRenderFns:[]};var Tt=a("VU/8")(St,Lt,!1,function(t){a("zaO8")},null,null).exports,Pt={props:{item_info:""},data:function(){return{menu:"",content:"",page_title:"",page_id:"",dialogVisible:!1,share_item_link:"",qr_item_link:"",copyText:""}},components:{Editormd:tt,BackToTop:it,Toc:Tt},methods:{get_page_content:function(t){var e=this,a=DocConfig.server+"/api/page/info";t||(t=e.page_id);var i=new URLSearchParams;i.append("page_id",t),e.axios.post(a,i).then(function(t){0===t.data.error_code?(e.content=t.data.data.page_content,e.page_title=t.data.data.page_title):e.$alert(t.data.error_message)}).catch(function(t){console.log(t)})},edit_page:function(){var t=this.page_id>0?this.page_id:0,e="/page/edit/"+this.item_info.item_id+"/"+t;this.$router.push({path:e})},share_item:function(){this.share_item_link=this.getRootPath()+"#/"+this.item_info.item_id,this.qr_item_link=DocConfig.server+"/api/common/qrcode&size=3&url="+encodeURIComponent(this.share_item_link),this.dialogVisible=!0,this.copyText=this.item_info.item_name+" -- ShowDoc \r\n"+this.share_item_link},AdaptToMobile:function(){var t=document.getElementById("doc-container");t.style.width="95%",t.style.padding="5px",document.getElementById("header").style.height="10px"},onCopy:function(){this.$message(this.$t("copy_success"))}},mounted:function(){var t=this;this.menu=this.item_info.menu,this.page_id=this.menu.pages[0].page_id,this.get_page_content(),(this.isMobile()||window.screen.width<1e3)&&this.$nextTick(function(){t.AdaptToMobile()})}},It={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello grey-bg"},[a("Header"),t._v(" "),a("div",{attrs:{id:"header"}}),t._v(" "),a("div",{staticClass:"container doc-container",attrs:{id:"doc-container"}},[a("div",{staticClass:"doc-title-box"},[a("span",{staticClass:"dn",attrs:{id:"doc-title-span"}}),t._v(" "),a("h2",{attrs:{id:"doc-title"}},[t._v(t._s(t.page_title))]),t._v(" "),a("div",{staticClass:"tool-bar pull-right"},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("share"),placement:"top"}},[a("i",{staticClass:"el-icon-share",on:{click:t.share_item}})]),t._v(" "),t.item_info.ItemPermn&&t.item_info.is_archived<1?a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("edit_page"),placement:"top"}},[a("i",{staticClass:"el-icon-edit",on:{click:t.edit_page}})]):t._e(),t._v(" "),a("el-dropdown",[a("span",{staticClass:"el-dropdown-link"},[a("i",{staticClass:"el-icon-caret-bottom el-icon--right"})]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.item_info.ItemPermn?a("router-link",{attrs:{to:"/item/export/"+t.item_info.item_id}},[a("el-dropdown-item",[t._v(t._s(t.$t("export")))])],1):t._e(),t._v(" "),t.item_info.ItemCreator?a("router-link",{attrs:{to:"/item/setting/"+t.item_info.item_id}},[a("el-dropdown-item",[t._v(t._s(t.$t("item_setting")))])],1):t._e(),t._v(" "),a("router-link",{attrs:{to:"/item/index"}},[a("el-dropdown-item",[t._v(t._s(t.$t("goback")))])],1)],1)],1)],1)]),t._v(" "),a("div",{attrs:{id:"doc-body"}},[a("div",{staticClass:"page_content_main",attrs:{id:"page_md_content"}},[t.content?a("Editormd",{attrs:{content:t.content,type:"html"}}):t._e()],1)])]),t._v(" "),a("el-dialog",{staticClass:"text-center",attrs:{title:t.$t("share"),visible:t.dialogVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("p",[t._v("\n "+t._s(t.$t("item_address"))+" :\n "),a("code",[t._v(t._s(t.share_item_link))])]),t._v(" "),a("p",[a("a",{directives:[{name:"clipboard",rawName:"v-clipboard:copyhttplist",value:t.copyText,expression:"copyText",arg:"copyhttplist"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"}],staticClass:"home-phone-butt",attrs:{href:"javascript:;"}},[t._v(t._s(t.$t("copy_link")))])]),t._v(" "),a("p",{staticStyle:{"border-bottom":"1px solid #eee"}},[a("img",{staticStyle:{width:"114px",height:"114px"},attrs:{id:"",src:t.qr_item_link}})]),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v(t._s(t.$t("confirm")))])],1)]),t._v(" "),a("BackToTop"),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var Dt=a("VU/8")(Pt,It,!1,function(t){a("WQf9")},"data-v-34c5e753",null).exports,Mt=a("fZjL"),Vt=a.n(Mt);if("undefined"!=typeof window)var Ut=a("zhAq");var Rt={props:{item_info:""},data:function(){return{menu:"",content:"",page_title:"",page_id:"",dialogVisible:!1,share_item_link:"",qr_item_link:"",copyText:"",spreadsheetObj:{},spreadsheetData:{},isLock:0,isEditable:0,intervalId:0,importDialogVisible:!1}},components:{},methods:{getPageContent:function(t){var e=this;t||(t=this.page_id),this.request("/api/page/info",{page_id:t}).then(function(t){if(t.data.page_content){var a=void 0;try{a=JSON.parse(t.data.page_content.replace(/&|<|>|'|"/g,function(t){return{"&":"&","<":"<",">":">","'":"'",""":'"'}[t]||t}))}catch(t){a={}}e.spreadsheetData=a,e.initSheet(),e.item_info.ItemPermn&&e.draft()}})},initSheet:function(){if(!x_spreadsheet)return!1;var t=this.isEditable?"edit":"read";document.getElementById("table-item").innerHTML="",this.spreadsheetObj=null,this.spreadsheetObj=x_spreadsheet("#table-item",{mode:t,showToolbar:!0,row:{len:500,height:25}}).loadData(this.spreadsheetData)},shareItem:function(){var t=this.item_info.item_domain?this.item_info.item_domain:this.item_info.item_id;this.share_item_link=this.getRootPath()+"#/"+t,this.qr_item_link=DocConfig.server+"/api/common/qrcode&size=3&url="+encodeURIComponent(this.share_item_link),this.dialogVisible=!0,this.copyText=this.item_info.item_name+" -- ShowDoc \r\n"+this.share_item_link},onCopy:function(){this.$message(this.$t("copy_success"))},save:function(){var t=this;this.request("/api/page/save",{page_id:this.page_id,page_title:this.item_info.item_name,item_id:this.item_info.item_id,is_urlencode:1,page_content:encodeURIComponent(p()(this.spreadsheetObj.getData()))}).then(function(e){t.$message({showClose:!0,message:"保存成功",type:"success"}),t.deleteDraft()})},goback:function(){this.$router.push({path:"/item/index"}),setTimeout(function(){window.location.reload()},200)},dropdownCallback:function(t){t&&t()},draft:function(){var t=this,e="page_content_"+this.page_id;setInterval(function(){var a=p()(t.spreadsheetObj.getData());localStorage.setItem(e,a)},3e4);var a=JSON.parse(localStorage.getItem(e));a&&a.length>0&&localStorage.getItem(e)!=p()(this.spreadsheetObj.getData())&&(localStorage.removeItem(e),this.$confirm(this.$t("draft_tips"),"",{showClose:!1}).then(function(){t.spreadsheetData=a,t.initSheet(),localStorage.removeItem(e)}).catch(function(){localStorage.removeItem(e)}))},deleteDraft:function(){for(var t=0;t-1&&localStorage.removeItem(e)}},setLock:function(){var t=this;this.page_id>0&&this.request("/api/page/setLock",{page_id:this.page_id,item_id:this.item_info.item_id}).then(function(){t.isLock=1})},unlock:function(){var t=this;this.isLock&&this.request("/api/page/setLock",{page_id:this.page_id,item_id:this.item_info.item_id,lock_to:1e3}).then(function(){t.isLock=0})},heartBeatLock:function(){var t=this;this.intervalId=setInterval(function(){t.isLock&&t.setLock()},18e4)},remoteIsLock:function(){var t=this;this.request("/api/page/isLock",{page_id:this.page_id}).then(function(e){e.data.lock>0?e.data.is_cur_user>0?(t.isLock=1,t.isEditable=1,t.initSheet(),t.heartBeatLock()):(t.$alert(t.$t("locking")+e.data.lock_username),t.item_info.ItemPermn=!1,clearInterval(t.intervalId),t.deleteDraft()):(t.setLock(),t.isEditable=1,t.initSheet(),t.heartBeatLock())})},exportFile:function(){var t,e,a=(t=this.spreadsheetObj.getData(),e=XLSX.utils.book_new(),t.forEach(function(t){for(var a=[[]],i=t.rows,o=0;o0&&e.$message({showClose:!0,duration:1e4,dangerouslyUseHTMLString:!0,message:'你有新的未读消息,点击查看'})}else 10307===t.error_code||10303===t.error_code?e.$router.replace({path:"/item/password/"+i,query:{page_id:o,redirect:e.$router.currentRoute.fullPath}}):e.$alert(t.error_message)}),setTimeout(function(){a.close()},2e4)},search_item:function(t){this.item_info="",this.$store.dispatch("changeItemInfo",""),this.keyword=t,this.get_item_menu(t)},checkDb:function(){var t=DocConfig.server+"/api/update/checkDb";this.axios.get(t)}},mounted:function(){this.checkDb(),this.get_item_menu()},beforeDestroy:function(){this.$message.closeAll(),document.title="ShowDoc"}},jt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),!t.item_info||1!=t.item_info.item_type&&3!=t.item_info.item_type&&"0"!==t.item_info.item_type&&0!==t.item_info.item_type?t._e():a("ShowRegularItem",{attrs:{item_info:t.item_info,search_item:t.search_item,keyword:t.keyword}}),t._v(" "),t.item_info&&2==t.item_info.item_type?a("ShowSinglePageItem",{attrs:{item_info:t.item_info}}):t._e(),t._v(" "),t.item_info&&4==t.item_info.item_type?a("ShowTableItem",{attrs:{item_info:t.item_info}}):t._e(),t._v(" "),a("Footer")],1)},staticRenderFns:[]};var Ot=a("VU/8")(Et,jt,!1,function(t){a("rXPt")},"data-v-dc9cae7a",null).exports,qt={name:"Login",components:{},data:function(){return{catalogs:[],cat_id:"",export_type:"1",item_id:0,export_format:"word",pages:[{page_id:"0",page_title:this.$t("all_pages")}],page_id:"0"}},computed:{computed_catalogs:function(){for(var t=this.catalogs.slice(0),e=[],a=0;a0)for(var o=0;o0)for(var s=0;s0?a("el-table",{staticStyle:{width:"100%"},attrs:{align:"left",data:t.members,height:"200"}},[a("el-table-column",{attrs:{prop:"username",label:t.$t("member_username"),width:"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:t.$t("name")}}),t._v(" "),a("el-table-column",{attrs:{prop:"addtime",label:t.$t("add_time"),width:"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"member_group",label:t.$t("authority")}}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:t.$t("operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.delete_member(e.row.item_member_id)}}},[t._v(t._s(t.$t("delete")))])]}}],null,!1,1670770248)})],1):t._e(),t._v(" "),t.teamItems.length>0?a("el-table",{staticStyle:{width:"100%"},attrs:{align:"left",data:t.teamItems,height:"200"}},[a("el-table-column",{attrs:{prop:"team_name",label:t.$t("team_name")}}),t._v(" "),a("el-table-column",{attrs:{prop:"addtime",label:t.$t("add_time")}}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:t.$t("operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.getTeamItemMember(e.row.team_id)}}},[t._v(t._s(t.$t("member_authority")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.deleteTeam(e.row.id)}}},[t._v(t._s(t.$t("delete")))])]}}],null,!1,2799852319)})],1):t._e(),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogFormVisible,modal:!1,top:"10vh","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{multiple:"",filterable:"","reserve-keyword":"",placeholder:"",loading:t.loading},model:{value:t.MyForm.username,callback:function(e){t.$set(t.MyForm,"username",e)},expression:"MyForm.username"}},t._l(t.memberOptions,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),a("el-form-item",{staticClass:"readonly-checkbox",attrs:{label:""}},[a("el-checkbox",{model:{value:t.MyForm.is_readonly,callback:function(e){t.$set(t.MyForm,"is_readonly",e)},expression:"MyForm.is_readonly"}},[t._v(t._s(t.$t("readonly")))])],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{placeholder:t.$t("all_cat2")},model:{value:t.MyForm.cat_id,callback:function(e){t.$set(t.MyForm,"cat_id",e)},expression:"MyForm.cat_id"}},t._l(t.catalogs,function(t){return a("el-option",{key:t.cat_id,attrs:{label:t.cat_name,value:t.cat_id}})}),1)],1)],1),t._v(" "),a("p",{staticClass:"tips"},[t._v(t._s(t.$t("member_authority_tips")))]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.MyFormSubmit}},[t._v(t._s(t.$t("confirm")))])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogFormTeamVisible,modal:!1,top:"10vh","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormTeamVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:"选择团队"}},[a("el-select",{model:{value:t.MyForm2.team_id,callback:function(e){t.$set(t.MyForm2,"team_id",e)},expression:"MyForm2.team_id"}},t._l(t.teams,function(t){return a("el-option",{key:t.team_name,attrs:{label:t.team_name,value:t.id}})}),1)],1),t._v(" "),a("router-link",{attrs:{to:"/team/index",target:"_blank"}},[t._v(t._s(t.$t("go_to_new_an_team")))])],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormTeamVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.addTeam}},[t._v(t._s(t.$t("confirm")))])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogFormTeamMemberVisible,modal:!1,top:"10vh",title:t.$t("adjust_member_authority"),width:"90%","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormTeamMemberVisible=e}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{align:"left","empty-text":t.$t("team_member_empty_tips"),data:t.teamItemMembers}},[a("el-table-column",{attrs:{prop:"member_username",label:t.$t("username")}}),t._v(" "),a("el-table-column",{attrs:{prop:"member_group_id",label:t.$t("authority"),width:"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-select",{attrs:{size:"mini",placeholder:t.$t("please_choose")},on:{change:function(a){return t.changeTeamItemMemberGroup(a,e.row.id)}},model:{value:e.row.member_group_id,callback:function(a){t.$set(e.row,"member_group_id",a)},expression:"scope.row.member_group_id"}},t._l(t.authorityOptions,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"cat_id",label:t.$t("catalog"),width:"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-select",{attrs:{size:"mini",placeholder:t.$t("please_choose")},on:{change:function(a){return t.changeTeamItemMemberCat(a,e.row.id)}},model:{value:e.row.cat_id,callback:function(a){t.$set(e.row,"cat_id",a)},expression:"scope.row.cat_id"}},t._l(t.catalogs,function(t){return a("el-option",{key:t.cat_id,attrs:{label:t.cat_name,value:t.cat_id}})}),1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"addtime",label:t.$t("add_time")}})],1),t._v(" "),a("br"),t._v(" "),a("p",{staticClass:"tips"},[t._v(t._s(t.$t("team_member_authority_tips")))]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormTeamMemberVisible=!1}}},[t._v(t._s(t.$t("close")))])],1)],1)],1)},staticRenderFns:[]};var Yt={name:"Login",components:{},data:function(){return{dialogAttornVisible:!1,dialogArchiveVisible:!1,dialogDeleteVisible:!1,attornForm:{username:"",password:""},archiveForm:{password:""},deleteForm:{password:""}}},methods:{deleteItem:function(){var t=this,e=DocConfig.server+"/api/item/delete",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),a.append("password",this.deleteForm.password),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogDeleteVisible=!1,t.$message.success(t.$t("success_jump")),setTimeout(function(){t.$router.push({path:"/item/index"})},2e3)):t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})},archive:function(){var t=this,e=DocConfig.server+"/api/item/archive",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),a.append("password",this.archiveForm.password),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogArchiveVisible=!1,t.$message.success(t.$t("success_jump")),setTimeout(function(){t.$router.push({path:"/item/index"})},2e3)):t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})},attorn:function(){var t=this,e=DocConfig.server+"/api/item/attorn",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),a.append("username",this.attornForm.username),a.append("password",this.attornForm.password),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogAttornVisible=!1,t.$message.success(t.$t("success_jump")),setTimeout(function(){t.$router.push({path:"/item/index"})},2e3)):t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})}},mounted:function(){}},Gt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("p",{staticStyle:{height:"40px"}}),t._v(" "),a("p",[a("el-tooltip",{attrs:{content:t.$t("attorn_tips"),placement:"top-start"}},[a("el-button",{staticClass:"a_button",on:{click:function(e){t.dialogAttornVisible=!0}}},[t._v(t._s(t.$t("attorn")))])],1)],1),t._v(" "),a("p",[a("el-tooltip",{attrs:{content:t.$t("archive_tips"),placement:"top-start"}},[a("el-button",{staticClass:"a_button",on:{click:function(e){t.dialogArchiveVisible=!0}}},[t._v(t._s(t.$t("archive")))])],1)],1),t._v(" "),a("p",[a("el-tooltip",{attrs:{content:t.$t("delete_tips"),placement:"top-start"}},[a("el-button",{staticClass:"a_button",on:{click:function(e){t.dialogDeleteVisible=!0}}},[t._v(t._s(t.$t("delete")))])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogAttornVisible,modal:!1,width:"300px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogAttornVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("attorn_username")},model:{value:t.attornForm.username,callback:function(e){t.$set(t.attornForm,"username",e)},expression:"attornForm.username"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("input_login_password")},model:{value:t.attornForm.password,callback:function(e){t.$set(t.attornForm,"password",e)},expression:"attornForm.password"}})],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogAttornVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.attorn}},[t._v(t._s(t.$t("attorn")))])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogArchiveVisible,modal:!1,width:"300px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogArchiveVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("input_login_password")},model:{value:t.archiveForm.password,callback:function(e){t.$set(t.archiveForm,"password",e)},expression:"archiveForm.password"}})],1)],1),t._v(" "),a("p",{staticClass:"tips"},[t._v(t._s(t.$t("archive_tips2")))]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogArchiveVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.archive}},[t._v(t._s(t.$t("archive")))])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogDeleteVisible,modal:!1,width:"300px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogDeleteVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("input_login_password")},model:{value:t.deleteForm.password,callback:function(e){t.$set(t.deleteForm,"password",e)},expression:"deleteForm.password"}},[t._v(">")])],1)],1),t._v(" "),a("p",{staticClass:"tips"},[a("el-tag",{attrs:{type:"danger"}},[t._v(t._s(t.$t("delete_tips")))])],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogDeleteVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.deleteItem}},[t._v(t._s(t.$t("delete")))])],1)],1)],1)},staticRenderFns:[]};var Kt={name:"Login",components:{},data:function(){return{api_key:"",api_token:""}},methods:{get_key_info:function(){var t=this,e=DocConfig.server+"/api/item/getKey",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.api_key=a.api_key,t.api_token=a.api_token}else t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})},resetKey:function(){var t=this,e=DocConfig.server+"/api/item/resetKey",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),t.axios.post(e,a).then(function(e){0===e.data.error_code?t.get_key_info():t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})}},mounted:function(){this.get_key_info()}},Xt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("el-form",{staticClass:"infoForm",attrs:{"status-icon":"","label-width":"100px"}},[a("el-form-item",{attrs:{label:"api_key:"}},[a("el-input",{attrs:{type:"text","auto-complete":"off",readonly:!0,placeholder:""},model:{value:t.api_key,callback:function(e){t.api_key=e},expression:"api_key"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"api_token"}},[a("el-input",{attrs:{type:"text","auto-complete":"off",readonly:!0,placeholder:""},model:{value:t.api_token,callback:function(e){t.api_token=e},expression:"api_token"}})],1),t._v(" "),a("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:t.resetKey}},[t._v(t._s(t.$t("reset_token")))])],1),t._v(" "),a("p",[a("span",{domProps:{innerHTML:t._s(t.$t("open_api_tips1"))}})]),t._v(" "),a("p",[a("span",{domProps:{innerHTML:t._s(t.$t("open_api_tips2"))}})]),t._v(" "),a("p",[a("span",{domProps:{innerHTML:t._s(t.$t("open_api_tips3"))}})]),t._v(" "),a("p",[a("span",{domProps:{innerHTML:t._s(t.$t("open_api_tips4"))}})])],1)},staticRenderFns:[]};var Zt={name:"Login",components:{},data:function(){return{MyForm:{username:"",is_readonly:!1},MyForm2:{team_id:""},lists:[]}},methods:{get_list:function(){var t=this,e=DocConfig.server+"/api/recycle/getList",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.lists=a}else t.$alert(e.data.error_message)})},recover:function(t){var e=this,a=DocConfig.server+"/api/recycle/recover";this.$confirm(this.$t("recover_tips")," ",{confirmButtonText:e.$t("confirm"),cancelButtonText:e.$t("cancel"),type:"warning"}).then(function(){var i=new URLSearchParams;i.append("item_id",e.$route.params.item_id),i.append("page_id",t),e.axios.post(a,i).then(function(t){0===t.data.error_code?e.get_list():e.$alert(t.data.error_message)})})}},mounted:function(){this.get_list()}},Qt={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("p",{staticClass:"tips"},[t._v(t._s(t.$t("recycle_tips")))]),t._v(" "),t.lists.length>0?a("el-table",{staticClass:"recycle-table",staticStyle:{width:"100%"},attrs:{align:"left",data:t.lists}},[a("el-table-column",{attrs:{prop:"page_title",label:t.$t("page_title")}}),t._v(" "),a("el-table-column",{attrs:{prop:"del_by_username",label:t.$t("deleter")}}),t._v(" "),a("el-table-column",{attrs:{prop:"del_time",label:t.$t("del_time")}}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:t.$t("operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.recover(e.row.page_id)}}},[t._v(t._s(t.$t("recover")))])]}}],null,!1,2213832654)})],1):t._e()],1)},staticRenderFns:[]};var te={name:"Login",components:{Info:a("VU/8")(Ht,Nt,!1,function(t){a("dCOX")},"data-v-03a893a2",null).exports,Member:a("VU/8")(Jt,Wt,!1,function(t){a("EtTO")},"data-v-94fbedae",null).exports,Advanced:a("VU/8")(Yt,Gt,!1,function(t){a("tNbj")},"data-v-756a8545",null).exports,OpenApi:a("VU/8")(Kt,Xt,!1,function(t){a("SgRK")},"data-v-7887d052",null).exports,Recycle:a("VU/8")(Zt,Qt,!1,function(t){a("HMj1")},"data-v-1b8a60b9",null).exports},data:function(){return{userInfo:{}}},methods:{get_item_info:function(){var t=this,e=DocConfig.server+"/api/item/detail",a=new URLSearchParams;a.append("item_id",t.$route.params.item_id),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.infoForm=a}else t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})},goback:function(){this.$router.go(-1)}},mounted:function(){},beforeDestroy:function(){}},ee={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",[a("el-card",{staticClass:"center-card"},[[a("el-button",{staticClass:"goback-btn",attrs:{type:"text"},on:{click:t.goback}},[a("i",{staticClass:"el-icon-back"})]),t._v(" "),a("el-tabs",{attrs:{value:"first",type:"card"}},[a("el-tab-pane",{attrs:{label:t.$t("base_info"),name:"first"}},[a("Info")],1),t._v(" "),a("el-tab-pane",{attrs:{label:t.$t("member_manage"),name:"second"}},[a("Member")],1),t._v(" "),a("el-tab-pane",{attrs:{label:t.$t("advance_setting"),name:"third"}},[a("Advanced")],1),t._v(" "),a("el-tab-pane",{attrs:{label:t.$t("open_api"),name:"four"}},[a("OpenApi")],1),t._v(" "),a("el-tab-pane",{attrs:{label:t.$t("recycle"),name:"five"}},[a("Recycle")],1)],1)]],2)],1),t._v(" "),a("Footer")],1)},staticRenderFns:[]};var ae=a("VU/8")(te,ee,!1,function(t){a("sAIR")},"data-v-4f7e248f",null).exports,ie={data:function(){return{currentDate:new Date,itemList:{},content:"",page_title:"",page_id:0}},components:{Editormd:tt,BackToTop:it,Toc:Tt},methods:{get_page_content:function(){var t,e=this,a=e.$route.params.page_id,i=e.$route.params.unique_key;t=i?DocConfig.server+"/api/page/infoByKey":DocConfig.server+"/api/page/info";var o=new URLSearchParams;o.append("page_id",a),o.append("unique_key",i),e.axios.post(t,o).then(function(t){0===t.data.error_code?(e.content=t.data.data.page_content,e.page_title=t.data.data.page_title,e.page_id=t.data.data.page_id):10307===t.data.error_code||10303===t.data.error_code?e.$router.replace({path:"/item/password/0",query:{page_id:a,redirect:e.$router.currentRoute.fullPath}}):e.$alert(t.data.error_message)})},AdaptToMobile:function(){var t=document.getElementById("doc-container");t.style.width="95%",t.style.padding="5px",document.getElementById("header").style.height="10px"}},mounted:function(){var t=this;this.get_page_content(),(this.isMobile()||window.screen.width<1e3)&&this.$nextTick(function(){t.AdaptToMobile()})},beforeDestroy:function(){}},oe={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("div",{attrs:{id:"header"}}),t._v(" "),a("div",{staticClass:"container doc-container",attrs:{id:"doc-container"}},[a("div",{staticClass:"doc-title-box"},[a("span",{staticClass:"dn",attrs:{id:"doc-title-span"}}),t._v(" "),a("h2",{attrs:{id:"doc-title"}},[t._v(t._s(t.page_title))])]),t._v(" "),a("div",{attrs:{id:"doc-body"}},[a("div",{staticClass:"page_content_main",attrs:{id:"page_md_content"}},[t.content?a("Editormd",{attrs:{content:t.content,type:"html"}}):t._e()],1)])]),t._v(" "),a("BackToTop"),t._v(" "),t.page_id?a("Toc"):t._e(),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var ne=a("VU/8")(ie,oe,!1,function(t){a("0EG5")},"data-v-72864d08",null).exports,se=a("pFYg"),re=a.n(se),le={name:"JsonToTable",props:{formLabelWidth:"120px",callback:""},data:function(){return{content:"",json_table_data:"",dialogFormVisible:!1}},methods:{transform:function(){try{var t=JSON.parse(this.content);this.json_table_data="|参数|类型|描述|\n|:-------|:-------|:-------|\n",this.Change(t),this.callback(this.json_table_data)}catch(t){this.$alert("Json解析失败")}this.dialogFormVisible=!1},Change:function(t){var e="- ";if(arguments.length>1){var a;a=arguments[1]>0?arguments[1]:1;for(var i=0;i-1){var e=window.location.protocol+"//"+window.location.host+window.location.pathname+"index.php?s=";return(e=e.replace(/\/web/g,"/server"))+"/mock-data/"+t}return window.location.protocol+"//"+window.location.host+"/server/index.php?s=/mock-data/"+t},handleClick:function(){this.add()},beautifyJson:function(){this.content=this.formatJson(this.content)},onCopy:function(){this.$message(this.$t("copy_success"))}},mounted:function(){this.infoByPageId()}},fe={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-dialog",{attrs:{title:"Mock",visible:!0,"close-on-click-modal":!1},on:{close:function(e){return t.callback()}}},[a("el-form",[t.mock_url?a("p",{staticStyle:{"margin-bottom":"20px","font-size":"16px"}},[t._v("\n Mock地址 :\n "),a("code",[t._v(t._s(t.mock_url))]),t._v(" "),a("i",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.mock_url,expression:"mock_url",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"}],staticClass:"el-icon-document-copy"}),t._v("\n \n "),a("el-button",{attrs:{type:"text"},on:{click:function(e){return t.callback(t.mock_url)}}},[t._v("把地址插入文档中")])],1):t._e(),t._v(" "),a("el-input",{staticClass:"dialoContent",attrs:{type:"textarea",placeholder:"这里填写的是Mock接口的返回结果。你可以直接编辑/粘贴一段json字符串,支持使用MockJs语法(关于MockJs语法,可以查看下方的帮助说明按钮)。输入完毕后,点击保存,就会自动生成Mock地址",rows:20},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}),t._v(" "),a("p",[a("el-button",{attrs:{type:"primary"},on:{click:t.handleClick}},[t._v(t._s(t.$t("save")))]),t._v(" \n "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"假如上面填写的是一段符合json语法的字符串,点此按钮可以对json字符串进行快速格式化(美化)",placement:"top"}},[a("el-button",{on:{click:t.beautifyJson}},[t._v("json快速美化")])],1),t._v(" \n \n "),a("a",{attrs:{href:"https://www.showdoc.com.cn/p/d952ed6b7b5fb454df13dce74d1b41f8",target:"_blank"}},[t._v("帮助说明")])],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){return t.callback()}}},[t._v(t._s(t.$t("goback")))])],1)],1)],1)},staticRenderFns:[]};var he=a("VU/8")(ue,fe,!1,function(t){a("pF1U")},"data-v-0da73dd4",null).exports,ge={props:{callback:""},data:function(){return{currentDate:new Date,content:[],dialogTableVisible:!1}},components:{},methods:{get_content:function(){var t=this,e=DocConfig.server+"/api/template/getList",a=new URLSearchParams;t.axios.post(e,a).then(function(e){0===e.data.error_code?e.data.data.length>0?(t.content=e.data.data,t.dialogTableVisible=!0):(t.dialogTableVisible=!1,t.$alert(t.$t("no_templ_text"))):(t.dialogTableVisible=!1,t.$alert(e.data.error_message))}).catch(function(t){console.log(t)})},show:function(){this.get_content()},insertTemplate:function(t){this.callback(t.template_content),this.dialogTableVisible=!1},deleteTemplate:function(t){var e=t.id,a=this,i=DocConfig.server+"/api/template/delete",o=new URLSearchParams;o.append("id",e),a.axios.post(i,o).then(function(t){0===t.data.error_code?a.get_content():a.$alert(t.data.error_message)}).catch(function(t){console.log(t)})}},mounted:function(){}},ve={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",{staticClass:"container-narrow"},[a("el-dialog",{attrs:{title:t.$t("templ_list"),visible:t.dialogTableVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-table",{attrs:{data:t.content}},[a("el-table-column",{attrs:{property:"addtime",label:t.$t("save_time"),width:"170"}}),t._v(" "),a("el-table-column",{attrs:{property:"template_title",label:t.$t("templ_title")}}),t._v(" "),a("el-table-column",{attrs:{label:t.$t("operation"),width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.insertTemplate(e.row)}}},[t._v(t._s(t.$t("insert_templ")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.deleteTemplate(e.row)}}},[t._v(t._s(t.$t("delete_templ")))])]}}])})],1)],1)],1),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var be=a("VU/8")(ge,ve,!1,function(t){a("WNtS")},null,null).exports,we=a("BO1k"),ye=a.n(we),$e=a("d7EF"),ke=a.n($e),xe={props:{callback:"",page_id:"",is_modal:!0,is_show_recover_btn:!0},data:function(){return{currentDate:new Date,content:"",dialogFormVisible:!1}},components:{},methods:{transform:function(){var t=this.content,e="\n\n",a=!0,i=!1,o=void 0;try{for(var n,s=ye()(t.split("\n").entries());!(a=(n=s.next()).done);a=!0){var r=n.value,l=ke()(r,2),c=l[0],d=l[1].split("\t");if(e+="| "+d.join(" | ")+" |\n",0==c){for(var m=0;m0)for(var o=0;o0&&t(a[o].sub,n)}},i=0;i3e3?e.editor_unwatch():e.editor_watch(),e.draft()},1e3),e.title=t.data.data.page_title,e.item_id=t.data.data.item_id,e.s_number=t.data.data.s_number,e.attachment_count=t.data.data.attachment_count>0?"...":""):e.$alert(t.data.error_message)}).catch(function(t){console.log(t)})},get_catalog:function(t){var e=this,a=DocConfig.server+"/api/catalog/catListGroup",i=new URLSearchParams;i.append("item_id",t),e.axios.post(a,i).then(function(t){if(0===t.data.error_code){var a=t.data.data;e.catalogs=a,e.get_default_cat()}else e.$alert(t.data.error_message)}).catch(function(t){console.log(t)})},get_default_cat:function(){var t=this,e=DocConfig.server+"/api/catalog/getDefaultCat",a=new URLSearchParams;a.append("page_id",this.page_id),a.append("item_id",t.$route.params.item_id),a.append("copy_page_id",this.copy_page_id),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.cat_id=a.default_cat_id}else t.$alert(e.data.error_message)})},insertValue:function(t,e){if(t){var a=this.$refs.Editormd;e&&a.clear(),a.insertValue(t)}},insert_api_template:function(){var t;t="zh-cn"==DocConfig.lang?'\n\n \n##### 简要描述\n\n- 用户注册接口\n\n##### 请求URL\n- ` http://xx.com/api/user/register `\n \n##### 请求方式\n- POST \n\n##### 参数\n\n|参数名|必选|类型|说明|\n|:---- |:---|:----- |----- |\n|username |是 |string |用户名 |\n|password |是 |string | 密码 |\n|name |否 |string | 昵称 |\n\n##### 返回示例 \n\n``` \n {\n "error_code": 0,\n "data": {\n "uid": "1",\n "username": "12154545",\n "name": "吴系挂",\n "groupid": 2 ,\n "reg_time": "1436864169",\n "last_login_time": "0",\n }\n }\n```\n\n##### 返回参数说明 \n\n|参数名|类型|说明|\n|:----- |:-----|----- |\n|groupid |int |用户组id,1:超级管理员;2:普通用户 |\n\n##### 备注 \n\n- 更多返回错误代码请看首页的错误代码描述\n\n\n\n':'\n \n##### Brief description\n\n- User Registration Interface\n\n\n##### Request URL\n- ` http://xx.com/api/user/register `\n \n##### Method\n- POST \n\n##### Parameter\n\n|Parameter name|Required|Type|Explain|\n|:---- |:---|:----- |----- |\n|username |Yes |string |Your username |\n|password |Yes |string | Your password |\n|name |No |string | Your name |\n\n##### Return example \n\n``` \n {\n "error_code": 0,\n "data": {\n "uid": "1",\n "username": "12154545",\n "name": "harry",\n "groupid": 2 ,\n "reg_time": "1436864169",\n "last_login_time": "0",\n }\n }\n```\n\n##### Return parameter description \n\n|Parameter name|Type|Explain|\n|:----- |:-----|----- |\n|groupid |int | .|\n\n##### Remark \n\n- For more error code returns, see the error code description on the home page\n\n\n',this.insertValue(t)},insert_database_template:function(){var t;t="zh-cn"==DocConfig.lang?"\n\n \n- 用户表,储存用户信息\n\n|字段|类型|空|默认|注释|\n|:---- |:------- |:--- |-- -|------ |\n|uid |int(10) |否 | | |\n|username |varchar(20) |否 | | 用户名 |\n|password |varchar(50) |否 | | 密码 |\n|name |varchar(15) |是 | | 昵称 |\n|reg_time |int(11) |否 | 0 | 注册时间 |\n\n- 备注:无\n\n":"\n \n- User table , to store user information\n\n\n|Field|Type|Empty|Default|Explain|\n|:---- |:------- |:--- |-- -|------ |\n|uid |int(10) |No | | |\n|username |varchar(20) |No | | |\n|password |varchar(50) |No | | |\n|name |varchar(15) |No | | |\n|reg_time |int(11) |No | 0 | . |\n\n- Remark : none\n\n\n",this.insertValue(t)},editor_unwatch:function(){this.$refs.Editormd.editor_unwatch(),sessionStorage.getItem("page_id_unwatch_"+this.page_id)||(this.$alert(this.$t("long_page_tips")),sessionStorage.setItem("page_id_unwatch_"+this.page_id,1))},editor_watch:function(){this.$refs.Editormd.editor_watch()},ShowJsonToTable:function(){this.$refs.JsonToTable.dialogFormVisible=!0},ShowJsonBeautify:function(){this.$refs.JsonBeautify.dialogFormVisible=!0},ShowRunApi:function(){window.open("http://runapi.showdoc.cc/")},ShowTemplateList:function(){this.$refs.TemplateList.show()},ShowPasteTable:function(){this.$refs.PasteTable.dialogFormVisible=!0},ShowHistoryVersion:function(){this.$refs.HistoryVersion.show()},ShowSortPage:function(){var t=this;this.save(function(){t.$refs.SortPage.show()})},save:function(t){var e=this;if(this.saving)return!1;this.saving=!0;var a=e.$loading(),i=this.$refs.Editormd.getMarkdown(),o=this.cat_id,n=e.$route.params.item_id,s=e.$route.params.page_id,r=DocConfig.server+"/api/page/save",l=new URLSearchParams;l.append("page_id",s),l.append("item_id",n),l.append("page_title",e.title),l.append("page_content",encodeURIComponent(i)),l.append("is_urlencode",1),l.append("cat_id",o),e.axios.post(r,l).then(function(i){a.close(),e.saving=!1,0===i.data.error_code?("function"==typeof t?t():e.$message({showClose:!0,message:e.$t("save_success"),type:"success"}),e.deleteDraft(),s<=0&&(e.$router.push({path:"/page/edit/"+n+"/"+i.data.data.page_id}),e.page_id=i.data.data.page_id)):e.$alert(i.data.error_message)}),setTimeout(function(){a.close(),e.saving=!1},2e4)},goback:function(){var t="/"+this.$route.params.item_id;this.$router.push({path:t,query:{page_id:this.$route.params.page_id}})},dropdown_callback:function(t){t&&t()},save_to_template:function(){var t=this,e=this.$refs.Editormd.getMarkdown();this.$prompt(t.$t("save_templ_title")," ",{}).then(function(a){var i=DocConfig.server+"/api/template/save",o=new URLSearchParams;o.append("template_title",a.value),o.append("template_content",e),t.axios.post(i,o).then(function(e){0===e.data.error_code?t.$alert(t.$t("save_templ_text")):t.$alert(e.data.error_message)})})},ShowAttachment:function(){this.$refs.AttachmentList.show()},upload_paste_img:function(t){for(var e=this,a=DocConfig.server+"/api/page/uploadImg",i=t.clipboardData,o=0,n=i.items.length;o-1){var s=i.items[o].getAsFile(),r=new FormData;r.append("t","ajax-uploadpic"),r.append("editormd-image-file",s);var l="",c=function(t,a){switch(t=t||"before"){case"before":l=e.$loading();break;case"error":l.close(),e.$alert("图片上传失败");break;case"success":if(l.close(),1==a.success){var i="![]("+a.url+")";e.insertValue(i)}else e.$alert(a.message)}};$.ajax({url:a,type:"POST",dataType:"json",data:r,processData:!1,contentType:!1,beforeSend:function(){c("before")},error:function(){c("error")},success:function(t){c("success",t)}}),t.preventDefault()}},draft:function(){var t=this,e="page_content_"+this.page_id,a=this.$refs.Editormd;setInterval(function(){var t=a.getMarkdown();localStorage.setItem(e,t)},3e4);var i=localStorage.getItem(e);i&&i.length>0&&i!=a.getMarkdown()&&a.getMarkdown()&&a.getMarkdown().length>10&&(localStorage.removeItem(e),t.$confirm(t.$t("draft_tips"),"",{showClose:!1}).then(function(){t.insertValue(i,!0),localStorage.removeItem(e)}).catch(function(){localStorage.removeItem(e)}))},deleteDraft:function(){for(var t=0;t-1&&localStorage.removeItem(e)}},setLock:function(){var t=this;this.page_id>0&&this.request("/api/page/setLock",{page_id:this.page_id,item_id:this.item_id}).then(function(){t.isLock=1})},unlock:function(){var t=this;this.isLock&&this.request("/api/page/setLock",{page_id:this.page_id,item_id:this.item_id,lock_to:1e3}).then(function(){t.isLock=0})},heartBeatLock:function(){var t=this;this.intervalId=setInterval(function(){t.isLock&&t.setLock()},18e4)},remoteIsLock:function(){var t=this;this.request("/api/page/isLock",{page_id:this.page_id}).then(function(e){e.data.lock>0?e.data.is_cur_user>0?t.isLock=1:(t.$alert(t.$t("locking")+e.data.lock_username),t.goback()):t.setLock()})}},mounted:function(){this.page_id=this.$route.params.page_id,this.item_id=this.$route.params.item_id,this.copy_page_id=this.$route.query.copy_page_id?this.$route.query.copy_page_id:"",this.copy_page_id>0?this.get_page_content(this.copy_page_id):this.page_id>0?this.get_page_content(this.page_id):this.content=this.$t("welcome_use_showdoc"),this.get_catalog(this.$route.params.item_id),this.heartBeatLock(),this.remoteIsLock(),document.addEventListener("paste",this.upload_paste_img),this.lang=DocConfig.lang},beforeDestroy:function(){document.removeEventListener("paste",this.upload_paste_img),this.$message.closeAll(),clearInterval(this.intervalId),this.unlock()}}),Ie={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello",on:{keydown:[function(e){return(e.type.indexOf("key")||83===e.keyCode)&&e.ctrlKey?(e.preventDefault(),t.save(e)):null},function(e){return(e.type.indexOf("key")||83===e.keyCode)&&e.metaKey?(e.preventDefault(),t.save(e)):null}]}},[a("Header"),t._v(" "),a("el-container",{staticClass:"container-narrow"},[a("el-row",{staticClass:"masthead"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,size:"small"}},[a("el-form-item",{attrs:{label:t.$t("title")+" : "}},[a("el-input",{attrs:{placeholder:""},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("catalog")+" : "}},[t.belong_to_catalogs?a("el-select",{staticClass:"cat",attrs:{placeholder:t.$t("optional")},model:{value:t.cat_id,callback:function(e){t.cat_id=e},expression:"cat_id"}},t._l(t.belong_to_catalogs,function(t){return a("el-option",{key:t.cat_name,attrs:{label:t.cat_name,value:t.cat_id}})}),1):t._e()],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"text"},on:{click:t.ShowSortPage}},[t._v(t._s(t.$t("sort_pages")))])],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"text"},on:{click:t.ShowHistoryVersion}},[t._v(t._s(t.$t("history_version")))])],1),t._v(" "),a("el-form-item",{staticClass:"pull-right"},[a("el-dropdown",{attrs:{"split-button":"",type:"primary",size:"medium",title:"Ctrl + S",trigger:"click"},on:{command:t.dropdown_callback,click:t.save}},[a("span",{attrs:{id:"save-page"}},[t._v(t._s(t.$t("save")))]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:t.save_to_template}},[t._v(t._s(t.$t("save_to_templ")))]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("lock_edit_tips"),placement:"left"}},[t.isLock?t._e():a("el-dropdown-item",{attrs:{command:t.setLock}},[t._v(t._s(t.$t("lock_edit")))])],1),t._v(" "),t.isLock?a("el-dropdown-item",{attrs:{command:t.unlock}},[t._v(t._s(t.$t("cacel_lock")))]):t._e()],1)],1),t._v(" "),a("el-button",{attrs:{type:"",size:"medium"},on:{click:t.goback}},[t._v(t._s(t.$t("goback")))])],1)],1),t._v(" "),a("el-row",{staticClass:"fun-btn-group"},[a("el-button",{attrs:{type:"",size:"medium"},on:{click:t.insert_api_template}},[t._v(t._s(t.$t("insert_apidoc_template")))]),t._v(" "),a("el-button",{attrs:{type:"",size:"medium"},on:{click:t.insert_database_template}},[t._v(t._s(t.$t("insert_database_doc_template")))]),t._v(" "),a("el-button",{attrs:{type:"",size:"medium"},nativeOn:{click:function(e){return t.ShowTemplateList(e)}}},[t._v(t._s(t.$t("more_templ")))]),t._v(" "),a("el-dropdown",{staticStyle:{"margin-left":"100px"},attrs:{"split-button":"",type:"",size:"medium",trigger:"hover"}},[t._v("\n "+t._s(t.$t("format_tools"))+"\n "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{nativeOn:{click:function(e){return t.ShowJsonToTable(e)}}},[t._v(t._s(t.$t("json_to_table")))]),t._v(" "),a("el-dropdown-item",{nativeOn:{click:function(e){return t.ShowJsonBeautify(e)}}},[t._v(t._s(t.$t("beautify_json")))]),t._v(" "),a("el-dropdown-item",{nativeOn:{click:function(e){return t.ShowPasteTable(e)}}},[t._v(t._s(t.$t("paste_insert_table")))])],1)],1),t._v(" "),"zh-cn"==t.lang?a("el-button",{attrs:{type:"",size:"medium"},on:{click:function(e){t.showMockDialog=!0}}},[t._v("Mock")]):t._e(),t._v(" "),"zh-cn"==t.lang?a("el-button",{attrs:{type:"",size:"medium"},on:{click:t.ShowRunApi}},[t._v(t._s(t.$t("http_test_api")))]):t._e(),t._v(" "),a("el-badge",{staticClass:"item",attrs:{value:t.attachment_count}},[a("el-button",{attrs:{type:"",size:"medium"},on:{click:t.ShowAttachment}},[t._v(t._s(t.$t("attachment")))])],1)],1),t._v(" "),t.content?a("Editormd",{ref:"Editormd",attrs:{content:t.content,type:"editor"}}):t._e()],1),t._v(" "),a("TemplateList",{ref:"TemplateList",attrs:{callback:t.insertValue}}),t._v(" "),a("HistoryVersion",{ref:"HistoryVersion",attrs:{callback:t.insertValue,is_show_recover_btn:!0}}),t._v(" "),a("JsonToTable",{ref:"JsonToTable",attrs:{callback:t.insertValue}}),t._v(" "),a("JsonBeautify",{ref:"JsonBeautify",attrs:{callback:t.insertValue}}),t._v(" "),a("AttachmentList",{ref:"AttachmentList",attrs:{callback:t.insertValue,item_id:t.item_id,manage:!0,page_id:t.page_id}}),t._v(" "),a("PasteTable",{ref:"PasteTable",attrs:{callback:t.insertValue,item_id:t.item_id,manage:!0,page_id:t.page_id}}),t._v(" "),a("SortPage",{ref:"SortPage",attrs:{callback:t.insertValue,belong_to_catalogs:t.belong_to_catalogs,item_id:t.item_id,page_id:t.page_id,cat_id:t.cat_id}}),t._v(" "),t.showMockDialog?a("Mock",{ref:"Mock",attrs:{page_id:t.page_id,callback:function(e){e&&t.insertValue(e),t.showMockDialog=!1}}}):t._e()],1),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var De=a("VU/8")(Pe,Ie,!1,function(t){a("sYP/")},"data-v-7b9319d6",null).exports;if("undefined"!=typeof window)var Me=a("zhAq");var Ve={props:{callback:""},data:function(){return{content:"",historyContent:""}},components:{},methods:{get_content:function(){var t=this,e=DocConfig.server+"/api/page/diff",a=new URLSearchParams;a.append("page_id",t.$route.params.page_id),a.append("page_history_id",t.$route.params.page_history_id),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.content=a.page.page_content,t.historyContent=a.history_page.page_content,t.$nextTick(function(){t.diffUsingJS(0)})}else t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})},diffUsingJS:function(t){var e=function(t){return document.getElementById(t)},a=difflib.stringAsLines(e("baseText").value),i=difflib.stringAsLines(e("newText").value),o=new difflib.SequenceMatcher(a,i).get_opcodes(),n=e("diffoutput");n.innerHTML="",n.appendChild(diffview.buildView({baseTextLines:a,newTextLines:i,opcodes:o,baseTextName:this.$t("cur_page_content"),newTextName:this.$t("history_version"),viewType:t}))}},mounted:function(){var t=this;Me(["static/diff/difflib.js","static/diff/diffview.js"],function(){t.get_content()})},beforeDestroy:function(){}},Ue={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("link",{attrs:{href:"static/diff/diffview.css",rel:"stylesheet"}}),t._v(" "),a("el-container",{staticClass:"container-narrow"},[a("div",{staticClass:"textInput"},[a("textarea",{staticStyle:{display:"none"},attrs:{id:"baseText"},domProps:{innerHTML:t._s(t.content)}})]),t._v(" "),a("div",{staticClass:"textInput spacer"},[a("textarea",{staticStyle:{display:"none"},attrs:{id:"newText"},domProps:{innerHTML:t._s(t.historyContent)}})]),t._v(" "),a("div",{attrs:{id:"diffoutput"}})]),t._v(" "),a("Footer"),t._v(" "),a("div",{})],1)},staticRenderFns:[]};var Re=a("VU/8")(Ve,Ue,!1,function(t){a("h/6b")},"data-v-4b517963",null).exports,Ae={name:"Login",components:{SortPage:Te},data:function(){return{MyForm:{cat_id:0,parent_cat_id:"",cat_name:"",s_number:""},catalogs:[],dialogFormVisible:!1,treeData:[],defaultProps:{children:"children",label:"label"},item_id:"",curl_cat_id:""}},computed:{belong_to_catalogs:function(){if(!this.catalogs||this.catalogs.length<=0)return[];for(var t=this.catalogs.slice(0),e=[],a=function t(a,i){if(a.length>0)for(var o=0;o0&&t(a[o].sub,n)}},i=0;i0&&(o.children=t(e[i].sub)),a.push(o)}return a}(a)})},MyFormSubmit:function(){var t=this;this.request("/api/catalog/save",{item_id:this.$route.params.item_id,cat_id:this.MyForm.cat_id,parent_cat_id:this.MyForm.parent_cat_id,cat_name:this.MyForm.cat_name}).then(function(e){t.dialogFormVisible=!1,t.get_catalog(),t.MyForm=[]})},edit:function(t,e){this.MyForm={cat_id:e.id,parent_cat_id:t.parent.data.id,cat_name:e.label},this.dialogFormVisible=!0},delete_cat:function(t,e){var a=this,i=e.id;this.$confirm(this.$t("confirm_cat_delete")," ",{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then(function(){a.request("/api/catalog/delete",{item_id:a.$route.params.item_id,cat_id:i}).then(function(t){a.get_catalog()})})},resetForm:function(){this.MyForm={cat_id:0,parent_cat_id:"",cat_name:"",s_number:""}},add_cat:function(t,e){t&&e.id?this.MyForm={cat_id:"",parent_cat_id:e.id,cat_name:""}:this.resetForm(),this.dialogFormVisible=!0},goback:function(){var t="/"+this.$route.params.item_id;this.$router.push({path:t})},handleDragEnd:function(t,e,a,i){var o=this.dimensionReduction(this.treeData);this.request("/api/catalog/batUpdate",{item_id:this.$route.params.item_id,cats:p()(o)})},dimensionReduction:function(t){for(var e=[],a=function t(a,i,o,n){if(e.push({cat_id:a.id,cat_name:a.label,parent_cat_id:i,level:o,s_number:n+1}),a.hasOwnProperty("children"))for(var s=0;s1?a("p",{staticClass:"tips"},[t._v(t._s(t.$t("cat_tips")))]):t._e(),t._v(" "),a("el-tree",{staticClass:"tree-node",attrs:{data:t.treeData,"node-key":"id","default-expand-all":"",draggable:""},on:{"node-drag-end":t.handleDragEnd},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.node,o=e.data;return a("span",{staticClass:"custom-tree-node"},[a("span",[t._v(t._s(i.label))]),t._v(" "),a("span",{staticClass:"right-bar"},[a("el-button",{staticClass:"el-icon-edit",attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.edit(i,o)}}}),t._v(" "),a("el-button",{staticClass:"el-icon-plus",attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.add_cat(i,o)}}}),t._v(" "),a("el-button",{staticClass:"el-icon-document",attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.showSortPage(i,o)}}}),t._v(" "),a("el-button",{staticClass:"el-icon-delete",attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.delete_cat(i,o)}}})],1)])}}])})],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogFormVisible,width:"300px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:t.$t("cat_name")+" : "}},[a("el-input",{attrs:{placeholder:t.$t("input_cat_name")},model:{value:t.MyForm.cat_name,callback:function(e){t.$set(t.MyForm,"cat_name",e)},expression:"MyForm.cat_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("parent_cat_name")+" : "}},[a("el-select",{attrs:{placeholder:t.$t("none")},model:{value:t.MyForm.parent_cat_id,callback:function(e){t.$set(t.MyForm,"parent_cat_id",e)},expression:"MyForm.parent_cat_id"}},t._l(t.belong_to_catalogs,function(t){return a("el-option",{key:t.cat_id,attrs:{label:t.cat_name,value:t.cat_id}})}),1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.MyFormSubmit}},[t._v(t._s(t.$t("confirm")))])],1)],1)],1),t._v(" "),a("SortPage",{ref:"SortPage",attrs:{callback:t.insertValue,belong_to_catalogs:t.belong_to_catalogs,item_id:t.item_id,cat_id:t.curl_cat_id}}),t._v(" "),a("Footer")],1)},staticRenderFns:[]};var je=a("VU/8")(Ae,Ee,!1,function(t){a("ZFL+")},"data-v-0f2bbf9d",null).exports,Oe={name:"Login",components:{},data:function(){return{unreadList:[],allList:[]}},methods:{getList:function(t){t||(t="all");var e=this,a=DocConfig.server+"/api/notice/getList",i=new URLSearchParams;i.append("notice_type",t),e.axios.post(a,i).then(function(a){if(0===a.data.error_code){var i=a.data.data;"unread"==t?e.unreadList=i:e.allList=i}else e.$alert(a.data.error_message)})},show_notice:function(t){var e=t.notice_id;t.is_read=1;var a=this;a.$alert(t.notice_content,"",{dangerouslyUseHTMLString:!0});var i=DocConfig.server+"/api/notice/setRead",o=new URLSearchParams;o.append("notice_id",e),a.axios.post(i,o).then(function(t){0===t.data.error_code||a.$alert(t.data.error_message)})},delete_notice:function(t){var e=t.notice_id,a=this,i=DocConfig.server+"/api/notice/delete";this.$confirm("确认删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t=new URLSearchParams;t.append("notice_id",e),a.axios.post(i,t).then(function(t){0===t.data.error_code?a.getList():a.$alert(t.data.error_message)})})},feedback:function(){this.$alert("对showdoc.cc的任何疑问、建议都可以反馈到 xing7th@gmail.com")}},mounted:function(){this.getList()},beforeCreate:function(){},beforeDestroy:function(){}},qe={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",[a("el-card",{staticClass:"center-card"},[[a("el-button",{staticClass:"goback-btn",attrs:{type:"text"},on:{click:t.feedback}},[a("span",{staticClass:"feedback"},[t._v("反馈")])]),t._v(" "),a("router-link",{attrs:{to:"/item/index"}},[t._v("返回")]),t._v(" "),a("el-tabs",{attrs:{value:"first",type:"card"}},[a("el-tab-pane",{attrs:{label:"我的消息",name:"first"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{align:"left",data:t.allList,height:"350","default-expand-all":!1}},[a("el-table-column",{attrs:{prop:"notice_title",label:"标题"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{domProps:{innerHTML:t._s(e.row.notice_title)}}),t._v(" "),0==e.row.is_read?a("el-badge",{staticClass:"mark",attrs:{value:"未读"}}):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"from_name",label:"发送人"}}),t._v(" "),a("el-table-column",{attrs:{prop:"notice_time",label:"时间",width:"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.show_notice(e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.delete_notice(e.row)}}},[t._v("删除")])]}}])})],1)],1)],1)]],2)],1),t._v(" "),a("Footer")],1)},staticRenderFns:[]};var Be=a("VU/8")(Oe,qe,!1,function(t){a("+nIW")},"data-v-635a8e03",null).exports,ze={data:function(){return{page:1,count:7,item_name:"",username:"",itemList:[],total:0,dialogAttornVisible:!1,attornForm:{username:""},attorn_item_id:""}},methods:{get_item_list:function(){var t=this,e=DocConfig.server+"/api/adminItem/getList",a=new URLSearchParams;a.append("item_name",this.item_name),a.append("username",this.username),a.append("page",this.page),a.append("count",this.count),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.itemList=a.items,t.total=a.total}else t.$alert(e.data.error_message)})},formatPrivacy:function(t,e){if(t)return t.password.length>0?this.$t("private"):this.$t("public")},jump_to_item:function(t){var e="#/"+t.item_id;window.open(e)},handleCurrentChange:function(t){this.page=t,this.get_item_list()},onSubmit:function(){this.page=1,this.get_item_list()},delete_item:function(t){var e=this,a=DocConfig.server+"/api/adminItem/deleteItem";this.$confirm(e.$t("confirm_delete")," ",{confirmButtonText:e.$t("confirm"),cancelButtonText:e.$t("cancel"),type:"warning"}).then(function(){var i=new URLSearchParams;i.append("item_id",t.item_id),e.axios.post(a,i).then(function(t){0===t.data.error_code?(e.$message.success("删除成功"),e.get_item_list()):e.$alert(t.data.error_message)})})},click_attorn_item:function(t){this.dialogAttornVisible=!0,this.attorn_item_id=t.item_id},attorn:function(){var t=this,e=DocConfig.server+"/api/adminItem/attorn",a=new URLSearchParams;a.append("item_id",t.attorn_item_id),a.append("username",this.attornForm.username),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogAttornVisible=!1,t.$message.success(t.$t("success")),t.get_item_list()):t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})}},mounted:function(){this.get_item_list()},beforeDestroy:function(){this.$message.closeAll()}},He={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("item_name")},model:{value:t.item_name,callback:function(e){t.item_name=e},expression:"item_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("owner")},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}})],1),t._v(" "),a("el-form-item",[a("el-button",{on:{click:t.onSubmit}},[t._v(t._s(t.$t("search")))])],1)],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.itemList}},[a("el-table-column",{attrs:{prop:"item_name",label:t.$t("item_name"),width:"140"}}),t._v(" "),a("el-table-column",{attrs:{prop:"item_description",label:t.$t("item_description"),width:"140"}}),t._v(" "),a("el-table-column",{attrs:{prop:"password",label:t.$t("privacy"),formatter:t.formatPrivacy,width:"80"}}),t._v(" "),a("el-table-column",{attrs:{prop:"item_id",label:t.$t("link"),width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.jump_to_item(e.row)}}},[t._v(t._s(t.$t("link")))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"username",label:t.$t("owner"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{label:t.$t("memberCount"),width:"80"}}),t._v(" "),a("el-table-column",{attrs:{prop:"addtime",label:t.$t("add_time"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"item_domain",label:t.$t("operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.click_attorn_item(e.row)}}},[t._v(t._s(t.$t("attorn")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.delete_item(e.row)}}},[t._v(t._s(t.$t("delete")))])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("span",{staticClass:"demonstration"}),t._v(" "),a("el-pagination",{attrs:{"page-size":t.count,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogAttornVisible,"close-on-click-modal":!1,width:"300px"},on:{"update:visible":function(e){t.dialogAttornVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("attorn_username")},model:{value:t.attornForm.username,callback:function(e){t.$set(t.attornForm,"username",e)},expression:"attornForm.username"}})],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogAttornVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.attorn}},[t._v(t._s(t.$t("attorn")))])],1)],1)],1)},staticRenderFns:[]};var Ne={data:function(){return{itemList:[],username:"",page:1,count:7,total:0,addForm:{username:"",password:"",uid:0,name:""},dialogAddVisible:!1}},methods:{get_user_list:function(){var t=this,e=DocConfig.server+"/api/adminUser/getList",a=new URLSearchParams;a.append("username",this.username),a.append("page",this.page),a.append("count",this.count),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.itemList=a.users,t.total=a.total}else t.$alert(e.data.error_message)})},formatGroup:function(t,e){if(t)return 1==t.groupid?this.$t("administrator"):2==t.groupid?this.$t("ordinary_users"):""},jump_to_item:function(t){var e="#/"+t.item_id;window.open(e)},handleCurrentChange:function(t){this.page=t,this.get_user_list()},onSubmit:function(){this.page=1,this.get_user_list()},delete_user:function(t){var e=this,a=DocConfig.server+"/api/adminUser/deleteUser";this.$confirm(e.$t("confirm_delete")," ",{confirmButtonText:e.$t("confirm"),cancelButtonText:e.$t("cancel"),type:"warning"}).then(function(){var i=new URLSearchParams;i.append("uid",t.uid),e.axios.post(a,i).then(function(t){0===t.data.error_code?(e.$message.success("success"),e.get_user_list(),e.username=""):e.$alert(t.data.error_message)})})},click_edit:function(t){this.dialogAddVisible=!0,this.addForm={uid:t.uid,name:t.name,username:t.username,password:""}},add_user:function(){var t=this,e=DocConfig.server+"/api/adminUser/addUser",a=new URLSearchParams;a.append("username",t.addForm.username),a.append("password",this.addForm.password),a.append("uid",this.addForm.uid),a.append("name",this.addForm.name),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogAddVisible=!1,t.addForm.password="",t.addForm.username="",t.addForm.uid=0,t.addForm.name="",t.$message.success(t.$t("success")),t.get_user_list()):t.$alert(e.data.error_message)}).catch(function(t){console.log(t)})},resetForm:function(){this.addForm={uid:0,name:"",username:"",password:""},this.dialogAddVisible=!1}},mounted:function(){this.get_user_list()},beforeDestroy:function(){this.$message.closeAll()}},Je={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"用户名"},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}})],1),t._v(" "),a("el-form-item",[a("el-button",{on:{click:t.onSubmit}},[t._v(t._s(t.$t("search")))])],1)],1),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogAddVisible=!0}}},[t._v(t._s(t.$t("add_user")))]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.itemList}},[a("el-table-column",{attrs:{prop:"username",label:t.$t("username"),width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:t.$t("name")}}),t._v(" "),a("el-table-column",{attrs:{prop:"groupid",label:t.$t("userrole"),formatter:t.formatGroup,width:"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"reg_time",label:t.$t("reg_time"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"last_login_time",label:t.$t("last_login_time"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"item_domain",label:t.$t("operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.click_edit(e.row)}}},[t._v(t._s(t.$t("edit")))]),t._v(" "),1!=e.row.groupid?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.delete_user(e.row)}}},[t._v(t._s(t.$t("delete")))]):t._e()]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("span",{staticClass:"demonstration"}),t._v(" "),a("el-pagination",{attrs:{"page-size":t.count,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogAddVisible,"before-close":t.resetForm,"close-on-click-modal":!1,width:"300px"},on:{"update:visible":function(e){t.dialogAddVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"text",placeholder:t.$t("username"),readonly:t.addForm.uid>0},model:{value:t.addForm.username,callback:function(e){t.$set(t.addForm,"username",e)},expression:"addForm.username"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"text",placeholder:t.$t("name")},model:{value:t.addForm.name,callback:function(e){t.$set(t.addForm,"name",e)},expression:"addForm.name"}})],1),t._v(" "),t.addForm.uid<=0?a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("password")},model:{value:t.addForm.password,callback:function(e){t.$set(t.addForm,"password",e)},expression:"addForm.password"}})],1):t._e(),t._v(" "),t.addForm.uid>0?a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"password",placeholder:t.$t("update_pwd_tips")},model:{value:t.addForm.password,callback:function(e){t.$set(t.addForm,"password",e)},expression:"addForm.password"}})],1):t._e()],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.resetForm}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.add_user}},[t._v(t._s(t.$t("confirm")))])],1)],1)],1)},staticRenderFns:[]};var We={data:function(){return{form:{register_open:!0,ldap_open:!1,home_page:"1",ldap_form:{host:"",port:"389",version:"3",base_dn:"",bind_dn:"",bind_password:"",user_field:""},home_item:"",oss_open:!1,oss_setting:{oss_type:"aliyun",key:"",secret:"",endpoint:"",bucket:"",protocol:"http",domain:""}},itemList:[]}},methods:{onSubmit:function(){var t=this,e=DocConfig.server+"/api/adminSetting/saveConfig";this.axios.post(e,this.form).then(function(e){0===e.data.error_code?t.$alert(t.$t("success")):t.$alert(e.data.error_message)})},loadConfig:function(){var t=this,e=DocConfig.server+"/api/adminSetting/loadConfig";this.axios.post(e,this.form).then(function(e){if(0===e.data.error_code){if(0===e.data.data.length)return;t.form.register_open=e.data.data.register_open>0,t.form.oss_open=e.data.data.oss_open>0,t.form.ldap_open=e.data.data.ldap_open>0,t.form.home_page=e.data.data.home_page>0?e.data.data.home_page:1,t.form.home_item=e.data.data.home_item>0?e.data.data.home_item:"",t.form.ldap_form=e.data.data.ldap_form?e.data.data.ldap_form:t.form.ldap_form,t.form.oss_setting=e.data.data.oss_setting?e.data.data.oss_setting:t.form.oss_setting}else t.$alert(e.data.error_message)})},get_item_list:function(){var t=this,e=DocConfig.server+"/api/adminItem/getList",a=new URLSearchParams;a.append("page",1),a.append("count",1e3),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.itemList=a.items}else t.$alert(e.data.error_message)})}},mounted:function(){this.get_item_list(),this.loadConfig()},beforeDestroy:function(){this.$message.closeAll()}},Ye={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("el-form",{ref:"form",attrs:{model:t.form,"label-width":"150px"}},[a("el-form-item",{attrs:{label:t.$t("register_open")}},[a("el-switch",{model:{value:t.form.register_open,callback:function(e){t.$set(t.form,"register_open",e)},expression:"form.register_open"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("home_page")}},[a("el-select",{attrs:{placeholder:t.$t("please_choose")},model:{value:t.form.home_page,callback:function(e){t.$set(t.form,"home_page",e)},expression:"form.home_page"}},[a("el-option",{attrs:{label:t.$t("full_page"),value:"1"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("login_page"),value:"2"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("jump_to_an_item"),value:"3"}})],1)],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3==t.form.home_page,expression:"form.home_page == 3"}],attrs:{label:t.$t("jump_to_item")}},[a("el-select",{attrs:{placeholder:t.$t("please_choose")},model:{value:t.form.home_item,callback:function(e){t.$set(t.form,"home_item",e)},expression:"form.home_item"}},t._l(t.itemList,function(t){return a("el-option",{key:t.item_id,attrs:{label:t.item_name,value:t.item_id}})}),1)],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("ldap_open_label")}},[a("el-switch",{model:{value:t.form.ldap_open,callback:function(e){t.$set(t.form,"ldap_open",e)},expression:"form.ldap_open"}})],1),t._v(" "),t.form.ldap_open?a("div",{staticStyle:{"margin-left":"50px"}},[a("el-form-item",{attrs:{label:"ldap host"}},[a("el-input",{staticClass:"form-el",model:{value:t.form.ldap_form.host,callback:function(e){t.$set(t.form.ldap_form,"host",e)},expression:"form.ldap_form.host"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"ldap port"}},[a("el-input",{staticStyle:{width:"90px"},model:{value:t.form.ldap_form.port,callback:function(e){t.$set(t.form.ldap_form,"port",e)},expression:"form.ldap_form.port"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"ldap base dn "}},[a("el-input",{staticClass:"form-el",attrs:{placeholder:"例如 dc=showdoc,dc=com"},model:{value:t.form.ldap_form.base_dn,callback:function(e){t.$set(t.form.ldap_form,"base_dn",e)},expression:"form.ldap_form.base_dn"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"ldap bind dn "}},[a("el-input",{staticClass:"form-el",attrs:{placeholder:"cn=admin,dc=showdoc,dc=com"},model:{value:t.form.ldap_form.bind_dn,callback:function(e){t.$set(t.form.ldap_form,"bind_dn",e)},expression:"form.ldap_form.bind_dn"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"ldap bind password "}},[a("el-input",{staticClass:"form-el",attrs:{placeholder:"例如 123456"},model:{value:t.form.ldap_form.bind_password,callback:function(e){t.$set(t.form.ldap_form,"bind_password",e)},expression:"form.ldap_form.bind_password"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"ldap version"}},[a("el-select",{staticClass:"form-el",model:{value:t.form.ldap_form.version,callback:function(e){t.$set(t.form.ldap_form,"version",e)},expression:"form.ldap_form.version"}},[a("el-option",{attrs:{label:"3",value:"3"}}),t._v(" "),a("el-option",{attrs:{label:"2",value:"2"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"ldap user filed"}},[a("el-input",{staticClass:"form-el",attrs:{placeholder:"例如 cn 或者 sAMAccountName"},model:{value:t.form.ldap_form.user_field,callback:function(e){t.$set(t.form.ldap_form,"user_field",e)},expression:"form.ldap_form.user_field"}})],1)],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:t.$t("oss_open")}},[a("el-switch",{model:{value:t.form.oss_open,callback:function(e){t.$set(t.form,"oss_open",e)},expression:"form.oss_open"}})],1),t._v(" "),t.form.oss_open?a("div",{staticStyle:{"margin-left":"50px"}},[a("el-form-item",{attrs:{label:t.$t("oss_server")}},[a("el-select",{model:{value:t.form.oss_setting.oss_type,callback:function(e){t.$set(t.form.oss_setting,"oss_type",e)},expression:"form.oss_setting.oss_type"}},[a("el-option",{attrs:{label:t.$t("aliyun"),value:"aliyun"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("qiniu"),value:"qiniu"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"key"}},[a("el-input",{staticClass:"form-el",model:{value:t.form.oss_setting.key,callback:function(e){t.$set(t.form.oss_setting,"key",e)},expression:"form.oss_setting.key"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"secret"}},[a("el-input",{staticClass:"form-el",model:{value:t.form.oss_setting.secret,callback:function(e){t.$set(t.form.oss_setting,"secret",e)},expression:"form.oss_setting.secret"}})],1),t._v(" "),"aliyun"==t.form.oss_setting.oss_type?a("el-form-item",{attrs:{label:"endpoint"}},[a("el-input",{staticClass:"form-el",model:{value:t.form.oss_setting.endpoint,callback:function(e){t.$set(t.form.oss_setting,"endpoint",e)},expression:"form.oss_setting.endpoint"}})],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"bucket"}},[a("el-input",{staticClass:"form-el",model:{value:t.form.oss_setting.bucket,callback:function(e){t.$set(t.form.oss_setting,"bucket",e)},expression:"form.oss_setting.bucket"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("oss_domain")}},[a("el-select",{staticStyle:{width:"100px"},model:{value:t.form.oss_setting.protocol,callback:function(e){t.$set(t.form.oss_setting,"protocol",e)},expression:"form.oss_setting.protocol"}},[a("el-option",{attrs:{label:"http://",value:"http"}}),t._v(" "),a("el-option",{attrs:{label:"https://",value:"https"}})],1),t._v(" "),a("el-input",{staticClass:"form-el",model:{value:t.form.oss_setting.domain,callback:function(e){t.$set(t.form.oss_setting,"domain",e)},expression:"form.oss_setting.domain"}})],1)],1):t._e(),t._v(" "),a("br"),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v(t._s(t.$t("save")))]),t._v(" "),a("el-button",[t._v(t._s(t.$t("cancel")))])],1)],1)],1)},staticRenderFns:[]};var Ge={data:function(){return{page:1,count:7,display_name:"",username:"",dataList:[],total:0,positive_type:"1",attachment_type:"-1",used:0}},methods:{getList:function(){var t=this;this.request("/api/attachment/getAllList",{page:this.page,count:this.count,attachment_type:this.attachment_type,display_name:this.display_name,username:this.username}).then(function(e){var a=e.data;t.dataList=a.list,t.total=parseInt(a.total),t.used=a.used_m})},jump_to_item:function(t){var e="/"+t.item_id;window.open(e)},handleCurrentChange:function(t){this.page=t,this.getList()},onSubmit:function(){this.page=1,this.getList()},visit:function(t){window.open(t.url)},delete_row:function(t){var e=this;this.$confirm(this.$t("confirm_delete")," ",{confirmButtonText:this.$t("confirm"),cancelButtonText:this.$t("cancel"),type:"warning"}).then(function(){e.request("/api/attachment/deleteAttachment",{file_id:t.file_id}).then(function(t){e.$message.success(e.$t("op_success")),e.getList()})})}},mounted:function(){this.getList()},beforeDestroy:function(){this.$message.closeAll()}},Ke={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("display_name")},model:{value:t.display_name,callback:function(e){t.display_name=e},expression:"display_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-select",{attrs:{placeholder:""},model:{value:t.attachment_type,callback:function(e){t.attachment_type=e},expression:"attachment_type"}},[a("el-option",{attrs:{label:t.$t("all_attachment_type"),value:"-1"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("image"),value:"1"}}),t._v(" "),a("el-option",{attrs:{label:t.$t("general_attachment"),value:"2"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("uploader")},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}})],1),t._v(" "),a("el-form-item",[a("el-button",{on:{click:t.onSubmit}},[t._v(t._s(t.$t("search")))])],1)],1),t._v(" "),a("P",[t._v("累计已使用 "+t._s(t.used)+"M 空间")]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList}},[a("el-table-column",{attrs:{prop:"file_id",label:t.$t("file_id")}}),t._v(" "),a("el-table-column",{attrs:{prop:"display_name",label:t.$t("display_name")}}),t._v(" "),a("el-table-column",{attrs:{prop:"file_type",label:t.$t("file_type"),width:"140"}}),t._v(" "),a("el-table-column",{attrs:{prop:"file_size_m",label:t.$t("file_size_m"),width:"140"}}),t._v(" "),a("el-table-column",{attrs:{prop:"visit_times",label:t.$t("visit_times")}}),t._v(" "),a("el-table-column",{attrs:{prop:"username",label:t.$t("uploader")}}),t._v(" "),a("el-table-column",{attrs:{prop:"addtime",label:t.$t("add_time"),width:"160"}}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:t.operation},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.visit(e.row)}}},[t._v(t._s(t.$t("visit")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.delete_row(e.row)}}},[t._v(t._s(t.$t("delete")))])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("span",{staticClass:"demonstration"}),t._v(" "),a("el-pagination",{attrs:{"page-size":t.count,layout:"total, prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var Xe={data:function(){return{open_menu_index:1}},components:{Item:a("VU/8")(ze,He,!1,function(t){a("T7kL")},"data-v-3d1cfd5c",null).exports,User:a("VU/8")(Ne,Je,!1,function(t){a("T/7R")},"data-v-95e57e58",null).exports,Setting:a("VU/8")(We,Ye,!1,function(t){a("s9ij")},"data-v-a3e2721e",null).exports,Attachment:a("VU/8")(Ge,Ke,!1,function(t){a("3tiB")},"data-v-2984a6ad",null).exports},methods:{select_menu:function(t,e){var a=this;this.open_menu_index=0,this.$nextTick(function(){a.open_menu_index=t})},check_upadte:function(){var t=this,e=DocConfig.server+"/api/adminUser/checkUpdate",a=new URLSearchParams;t.axios.post(e,a).then(function(e){e&&e.data&&e.data.data&&e.data.data.url&&t.$message({showClose:!0,duration:1e4,dangerouslyUseHTMLString:!0,message:''+e.data.data.title+""})})}},mounted:function(){this.check_upadte(),this.unset_bg_grey()},beforeDestroy:function(){this.$message.closeAll(),this.set_bg_grey()}},Ze={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("el-container",[a("el-header",[a("div",{staticClass:"header_title"},[t._v("ShowDoc")]),t._v(" "),a("router-link",{staticClass:"goback",attrs:{to:"/item/index"}},[t._v(t._s(t.$t("goback")))])],1),t._v(" "),a("el-container",[a("el-aside",{attrs:{width:"150px"}},[a("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{"default-active":"1","background-color":"#545c64","text-color":"#fff","active-text-color":"#ffd04b"},on:{select:t.select_menu}},[a("el-menu-item",{attrs:{index:"1"}},[a("i",{staticClass:"el-icon-info"}),t._v(" "),a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.$t("user_manage")))])]),t._v(" "),a("el-menu-item",{attrs:{index:"2"}},[a("i",{staticClass:"el-icon-tickets"}),t._v(" "),a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.$t("item_manage")))])]),t._v(" "),a("el-menu-item",{attrs:{index:"5"}},[a("i",{staticClass:"el-icon-tickets"}),t._v(" "),a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.$t("attachment_manage")))])]),t._v(" "),a("el-menu-item",{attrs:{index:"3"}},[a("i",{staticClass:"el-icon-tickets"}),t._v(" "),a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.$t("web_setting")))])])],1)],1),t._v(" "),a("el-container",[a("el-main",[1==t.open_menu_index?a("User"):t._e(),t._v(" "),2==t.open_menu_index?a("Item"):t._e(),t._v(" "),3==t.open_menu_index?a("Setting"):t._e(),t._v(" "),5==t.open_menu_index?a("Attachment"):t._e()],1),t._v(" "),a("el-footer")],1)],1)],1)],1)},staticRenderFns:[]};var Qe=a("VU/8")(Xe,Ze,!1,function(t){a("kP2Y")},"data-v-6045bdb6",null).exports,ta={components:{},data:function(){return{MyForm:{id:"",team_name:""},list:[],dialogFormVisible:!1,dialogMemberVisible:!1,dialogAttornVisible:!1,attornForm:{team_id:"",username:"",password:""}}},methods:{geList:function(){var t=this,e=DocConfig.server+"/api/team/getList",a=new URLSearchParams;t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.list=a}else t.$alert(e.data.error_message)})},MyFormSubmit:function(){var t=this,e=DocConfig.server+"/api/team/save",a=new URLSearchParams;a.append("id",this.MyForm.id),a.append("team_name",this.MyForm.team_name),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogFormVisible=!1,t.geList(),t.MyForm={id:"",team_name:""}):t.$alert(e.data.error_message)})},edit:function(t){this.MyForm.id=t.id,this.MyForm.team_name=t.team_name,this.dialogFormVisible=!0},deleteTeam:function(t){var e=this,a=DocConfig.server+"/api/team/delete";this.$confirm(e.$t("confirm_delete")," ",{confirmButtonText:e.$t("confirm"),cancelButtonText:e.$t("cancel"),type:"warning"}).then(function(){var i=new URLSearchParams;i.append("id",t),e.axios.post(a,i).then(function(t){0===t.data.error_code?e.geList():e.$alert(t.data.error_message)})})},addTeam:function(){this.MyForm={id:"",team_name:""},this.dialogFormVisible=!0},goback:function(){this.$router.push({path:"/item/index"})},attornDialog:function(t){this.attornForm.team_id=t.id,this.dialogAttornVisible=!0},attorn:function(){var t=this,e=DocConfig.server+"/api/team/attorn",a=new URLSearchParams;a.append("team_id",this.attornForm.team_id),a.append("username",this.attornForm.username),a.append("password",this.attornForm.password),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogAttornVisible=!1,t.geList()):t.$alert(e.data.error_message)})}},mounted:function(){this.geList()},beforeDestroy:function(){}},ea={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello"},[a("Header"),t._v(" "),a("el-container",[a("el-card",{staticClass:"center-card"},[a("el-button",{staticClass:"add-cat",attrs:{type:"text"},on:{click:t.addTeam}},[t._v(t._s(t.$t("add_team")))]),t._v(" "),a("el-button",{staticClass:"goback-btn",attrs:{type:"text"},on:{click:t.goback}},[t._v(t._s(t.$t("goback")))]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{align:"left","empty-text":t.$t("empty_team_tips"),data:t.list,height:"400"}},[a("el-table-column",{attrs:{prop:"team_name",label:t.$t("team_name")}}),t._v(" "),a("el-table-column",{attrs:{prop:"memberCount",label:t.$t("memberCount")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{attrs:{to:"/team/member/"+e.row.id}},[t._v(t._s(e.row.memberCount))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"itemCount",label:t.$t("itemCount")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{attrs:{to:"/team/item/"+e.row.id}},[t._v(t._s(e.row.itemCount))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:t.$t("operation")},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.$router.push({path:"/team/member/"+e.row.id})}}},[t._v(t._s(t.$t("member")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.$router.push({path:"/team/item/"+e.row.id})}}},[t._v(t._s(t.$t("team_item")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.edit(e.row)}}},[t._v(t._s(t.$t("edit")))]),t._v(" "),a("br"),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.attornDialog(e.row)}}},[t._v(t._s(t.$t("attorn")))]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.deleteTeam(e.row.id)}}},[t._v(t._s(t.$t("delete")))])]}}])})],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogFormVisible,width:"300px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:t.$t("team_name")+":"}},[a("el-input",{model:{value:t.MyForm.team_name,callback:function(e){t.$set(t.MyForm,"team_name",e)},expression:"MyForm.team_name"}})],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.MyFormSubmit}},[t._v(t._s(t.$t("confirm")))])],1)],1),t._v(" "),a("el-dialog",{attrs:{visible:t.dialogAttornVisible,modal:!1,width:"300px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogAttornVisible=e}}},[a("el-form",[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:t.$t("attorn_username"),"auto-complete":"new-password"},model:{value:t.attornForm.username,callback:function(e){t.$set(t.attornForm,"username",e)},expression:"attornForm.username"}})],1),t._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{type:"password","auto-complete":"new-password",placeholder:t.$t("input_login_password")},model:{value:t.attornForm.password,callback:function(e){t.$set(t.attornForm,"password",e)},expression:"attornForm.password"}})],1)],1),t._v(" "),a("p",{staticClass:"tips"},[t._v(t._s(t.$t("attornTeamTips")))]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogAttornVisible=!1}}},[t._v(t._s(t.$t("cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.attorn}},[t._v(t._s(t.$t("attorn")))])],1)],1)],1),t._v(" "),a("Footer")],1)},staticRenderFns:[]};var aa=a("VU/8")(ta,ea,!1,function(t){a("6xgM"),a("SaYI")},"data-v-0e7a3899",null).exports,ia={components:{},data:function(){return{MyForm:{id:"",member_username:""},list:[],dialogFormVisible:!1,team_id:"",memberOptions:[]}},methods:{geList:function(){var t=this,e=DocConfig.server+"/api/teamMember/getList",a=new URLSearchParams;a.append("team_id",this.team_id),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){var a=e.data.data;t.list=a,t.getAllUser()}else t.$alert(e.data.error_message)})},MyFormSubmit:function(){var t=this,e=DocConfig.server+"/api/teamMember/save",a=new URLSearchParams;a.append("team_id",this.team_id),a.append("member_username",this.MyForm.member_username),t.axios.post(e,a).then(function(e){0===e.data.error_code?(t.dialogFormVisible=!1,t.geList(),t.MyForm={}):t.$alert(e.data.error_message)})},deleteTeamMember:function(t){var e=this,a=DocConfig.server+"/api/teamMember/delete";this.$confirm(e.$t("confirm_delete")," ",{confirmButtonText:e.$t("confirm"),cancelButtonText:e.$t("cancel"),type:"warning"}).then(function(){var i=new URLSearchParams;i.append("id",t),e.axios.post(a,i).then(function(t){0===t.data.error_code?e.geList():e.$alert(t.data.error_message)})})},addTeamMember:function(){this.MyForm=[],this.dialogFormVisible=!0},goback:function(){this.$router.push({path:"/team/index"})},getAllUser:function(){var t=this,e=DocConfig.server+"/api/user/allUser",a=new URLSearchParams;a.append("username",""),t.axios.post(e,a).then(function(e){if(0===e.data.error_code){for(var a=e.data.data,i=[],o=0;o1&&void 0!==arguments[1]&&arguments[1]))try{return"string"==typeof t&&(t=JSON.parse(t)),p()(t,null,2)}catch(e){return t}try{var e=JSON.parse(t);return p()(e)}catch(e){return t}}}},wa=a("//Fk"),ya=a.n(wa),$a=a("mtWM"),ka=a.n($a);ka.a.defaults.timeout=2e4,ka.a.defaults.baseURL=DocConfig.server,ka.a.interceptors.request.use(function(t){return t},function(t){return ya.a.reject(t)}),ka.a.interceptors.response.use(function(t){return t.config.data&&t.config.data.indexOf("redirect_login=false")>-1||10102===t.data.error_code&&_a.replace({path:"/user/login",query:{redirect:_a.currentRoute.fullPath}}),t},function(t){return ya.a.reject(t.response)});var xa=ka.a,Ca=function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=new URLSearchParams(e),n=DocConfig.server+t;return new ya.a(function(t,e){xa({url:n,method:a,data:o,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(a){if(10102===a.data.error_code&&-1===a.config.data.indexOf("redirect_login=false")&&(_a.replace({path:"/user/login",query:{redirect:_a.currentRoute.fullPath}}),e(new Error("登录态无效"))),i&&a.data&&0!==a.data.error_code)return pa.MessageBox.alert(a.data.error_message),e(new Error("业务级别的错误"));t(a.data)},function(t){t.Cancel?console.log(t):e(t)}).catch(function(t){e(t)})})},Fa=a("xO72"),Sa=a.n(Fa),La=a("wUZ8"),Ta=a.n(La),Pa=a("Vi3T"),Ia=a.n(Pa),Da=a("J71k"),Ma=a.n(Da),Va=a("AQny"),Ua=a.n(Va),Ra=(a("9Z4o"),a("j1ja"),a("wvfG")),Aa=a.n(Ra),Ea=a("NYxO"),ja=a("bOdI"),Oa=a.n(ja)()({increment:function(t,e){t.count++},changeItemInfo:function(t,e){t.item_info=e}},"SOME_MUTATION",function(t){}),qa={incrementAsync:function(t){var e=t.commit;setTimeout(function(){e("increment")},1e3)},changeItemInfo:function(t,e){t.commit("changeItemInfo",e)}},Ba={count:"1",item_info:{}};n.default.use(Ea.a);var za=new Ea.a.Store({state:Ba,actions:qa,mutations:Oa});n.default.use(ba),n.default.config.productionTip=!1,n.default.component("Header",ha),n.default.component("Footer",va),n.default.use(ua.a),n.default.use(Sa.a),n.default.use(Aa.a);var Ha=o()(Ia.a,Ma.a),Na=o()(Ta.a,Ua.a);n.default.config.lang=DocConfig.lang,n.default.locale("zh-cn",Ha),n.default.locale("en",Na),n.default.prototype.axios=xa,n.default.prototype.request=Ca,new n.default({el:"#app",router:_a,store:za,template:"",components:{App:r}})},RLZw:function(t,e){},"RU/w":function(t,e){},SaYI:function(t,e){},SgRK:function(t,e){},"T/7R":function(t,e){},T7kL:function(t,e){},W3gx:function(t,e){},WNtS:function(t,e){},WQf9:function(t,e){},WunF:function(t,e){},"Y+qT":function(t,e){},"ZFL+":function(t,e){},aCj9:function(t,e){},"aVn+":function(t,e){},bv2D:function(t,e){},cYDf:function(t,e){},dCOX:function(t,e){},dF8i:function(t,e){},fSLA:function(t,e){},gfD7:function(t,e){},"h/6b":function(t,e){},hHMT:function(t,e){},j3By:function(t,e){},jCWs:function(t,e){},kP2Y:function(t,e){},lgXi:function(t,e){},lkmy:function(t,e){},oFiZ:function(t,e){},pF1U:function(t,e){},pt9Z:function(t,e){},qHHh:function(t,e){},rXPt:function(t,e){},s9ij:function(t,e){},sAIR:function(t,e){},"sYP/":function(t,e){},tNbj:function(t,e){},tvR6:function(t,e){},xkpm:function(t,e){},y2ly:function(t,e){},yUSZ:function(t,e){},"z/Rs":function(t,e){},zaO8:function(t,e){}},["NHnr"]);