1 |
- webpackJsonp([6,12],{274:function(t,e,o){var i=o(2)(o(277),o(278),!1,function(t){o(275)},"data-v-e18ef0c6",null);t.exports=i.exports},275:function(t,e,o){var i=o(276);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);o(1)("2dccb423",i,!0,{})},276:function(t,e,o){(t.exports=o(0)(!1)).push([t.i,".w-content[data-v-e18ef0c6]{position:absolute;top:72px;left:0;right:0;bottom:0;overflow:auto;background-repeat:no-repeat;background-position:50%;background-color:#eee;background-size:cover}.w-content .w-container[data-v-e18ef0c6]{min-height:500px}",""])},277:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"WContent",data:function(){return{bgid:-1}},mounted:function(){this.bgid=$A.runNum(this.usrInfo.bgid)},watch:{usrInfo:{handler:function(t){this.bgid=$A.runNum(t.bgid)},deep:!0}},methods:{getBgUrl:function(t,e){return t<0?"none":(t=Math.max(1,parseInt(t)),"url("+window.location.origin+"/images/bg/"+(e?"thumb/":"")+t+".jpg)")}}}},278:function(t,e){t.exports={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"w-content",style:"background-image:"+this.getBgUrl(this.bgid)},[this._t("default")],2)},staticRenderFns:[]}},289:function(t,e,o){var i=o(2)(o(324),o(325),!1,function(t){o(322)},"data-v-044b242c",null);t.exports=i.exports},322:function(t,e,o){var i=o(323);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);o(1)("5b9dc177",i,!0,{})},323:function(t,e,o){(t.exports=o(0)(!1)).push([t.i,".docs-group[data-v-044b242c]{cursor:move}.docs-group.readonly[data-v-044b242c]{cursor:default}.docs-group.hidden-children .docs-group[data-v-044b242c]{display:none}.docs-group.hidden-children .item .together[data-v-044b242c]{display:block}.docs-group .docs-group[data-v-044b242c]{padding-left:14px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+LUNEtwAAAEtJREFUSIntzzEVwAAMQkFSKfi3FKzQqQ5oJm5h5P3ZXQMYkrgwtk+OPo8kSzo7bGFcC+NaGNfCuBbGtTCuhXEtzB+SHAAGAEm/7wv2LKvDNoBjfgAAAABJRU5ErkJggg==) no-repeat -2px -9px;margin-left:18px;border-left:1px dotted #ddd}.docs-group .item[data-v-044b242c]{padding:4px 0 0 4px;background-color:#fff;border:1px solid #fff;line-height:24px;position:relative}.docs-group .item .together[data-v-044b242c]{display:none;cursor:pointer;position:absolute;font-size:12px;color:#ffb519;top:50%;left:-2px;margin-top:1px;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:1}.docs-group .item .dashed[data-v-044b242c]{position:absolute;margin:0;padding:0;top:16px;right:0;left:20px;height:2px;border-width:0 0 1px;border-bottom:1px dashed #eee}.docs-group .item .header[data-v-044b242c]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;position:relative;background:#fff;padding:0 8px;cursor:pointer}.docs-group .item .header .tip[data-v-044b242c]{display:inline-block;position:relative}.docs-group .item .header .tip>img[data-v-044b242c]{display:inline-block;width:14px;height:14px;margin-top:5px;vertical-align:top}.docs-group .item .header .title[data-v-044b242c]{display:inline-block;border-bottom:1px solid transparent;cursor:pointer;padding:0 3px 0 7px;color:#555;word-break:break-all}.docs-group .item .header .title.active[data-v-044b242c]{color:#0396f2}.docs-group .item .info[data-v-044b242c]{position:absolute;background:#fff;padding-left:12px;color:#666;right:3px;top:5px}.docs-group .item .info>i[data-v-044b242c]{padding:0 2px;-webkit-transition:all .2s;transition:all .2s;cursor:pointer}.docs-group .item .info>i[data-v-044b242c]:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}",""])},324:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(51),s=o.n(i);e.default={name:"NestedDraggable",props:{lists:{required:!0,type:Array},isChildren:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},activeid:{default:""}},data:function(){return{listSortData:"",childrenHidden:!1}},components:{draggable:s.a},mounted:function(){this.listSortData=this.getSort(this.lists)},methods:{getSort:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i="";return t.forEach(function(t){i+=t.id+":"+o+";"+e.getSort(t.children,t.id)}),i},handleClick:function(t,e){if("open"!=t||"folder"!=e.type)if("sort"!=t)this.$emit("change",t,e);else if(this.isChildren)this.$emit("change",t,e);else{var o=this.getSort(this.lists);o!=this.listSortData&&(this.listSortData=o,this.$emit("change",t,o))}else this.$set(e,"hiddenChildren",!e.hiddenChildren)}}}},325:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("draggable",{attrs:{tag:"div",list:t.lists,group:{name:"docs-nested"},animation:150,disabled:t.disabled||t.readonly},on:{sort:function(e){return t.handleClick("sort")}}},t._l(t.lists,function(e){return o("div",{key:e.id,staticClass:"docs-group",class:{readonly:t.readonly,"hidden-children":!0===e.hiddenChildren}},[o("div",{staticClass:"item"},[o("Icon",{staticClass:"together",attrs:{type:"md-add"},on:{click:function(o){return t.handleClick("open",e)}}}),t._v(" "),o("div",{staticClass:"dashed"}),t._v(" "),o("div",{staticClass:"header"},[o("div",{staticClass:"tip"},[o("img",{attrs:{src:e.icon}})]),t._v(" "),o("div",{staticClass:"title",class:{active:t.activeid==e.id},on:{click:function(o){return t.handleClick("open",e)}}},[t._v(t._s(e.title))])]),t._v(" "),t.readonly?t._e():o("div",{staticClass:"info"},[o("Icon",{attrs:{type:"md-create"},on:{click:function(o){return t.handleClick("edit",e)}}}),t._v(" "),o("Icon",{attrs:{type:"md-add"},on:{click:function(o){return t.handleClick("add",e)}}}),t._v(" "),o("Icon",{attrs:{type:"md-trash"},on:{click:function(o){return t.handleClick("delete",e)}}})],1)],1),t._v(" "),"object"==typeof e.children&&null!==e.children?o("nested-draggable",{attrs:{lists:e.children,isChildren:!0,disabled:t.disabled,readonly:t.readonly,activeid:t.activeid},on:{change:t.handleClick}}):t._e()],1)}),0)},staticRenderFns:[]}},786:function(t,e,o){var i=o(787);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);o(1)("7757fd83",i,!0,{})},787:function(t,e,o){(t.exports=o(0)(!1)).push([t.i,".docs .docs-main[data-v-216f7e72]{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;min-width:1024px;padding:15px}.docs .docs-main .docs-body[data-v-216f7e72],.docs .docs-main[data-v-216f7e72]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal;width:100%;height:100%}.docs .docs-main .docs-body[data-v-216f7e72]{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;min-height:500px}.docs .docs-main .docs-body .docs-menu[data-v-216f7e72]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:230px;border-radius:3px 0 0 3px;background:hsla(0,0%,100%,.8)}.docs .docs-main .docs-body .docs-menu h3[data-v-216f7e72]{font-size:18px;font-weight:400;padding:10px 12px;color:#333}.docs .docs-main .docs-body .docs-menu ul[data-v-216f7e72]{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:auto}.docs .docs-main .docs-body .docs-menu ul li[data-v-216f7e72]{padding:12px;cursor:pointer}.docs .docs-main .docs-body .docs-menu ul li.more[data-v-216f7e72]{text-align:center;color:#555;margin-bottom:6px}.docs .docs-main .docs-body .docs-menu ul li.more[data-v-216f7e72]:hover{color:#333}.docs .docs-main .docs-body .docs-menu ul li.load[data-v-216f7e72]{text-align:center;height:42px;margin-bottom:9px}.docs .docs-main .docs-body .docs-menu ul li.none[data-v-216f7e72]{background-color:transparent;text-align:center;color:#666;padding:8px 18px}.docs .docs-main .docs-body .docs-menu ul li.active[data-v-216f7e72]{background-color:#fff}.docs .docs-main .docs-body .docs-menu ul li .docs-title[data-v-216f7e72]{color:#242424;font-size:13px}.docs .docs-main .docs-body .docs-menu ul li .docs-time[data-v-216f7e72]{display:block;color:#999;font-size:12px;margin-top:2px;position:relative}.docs .docs-main .docs-body .docs-container[data-v-216f7e72]{-webkit-box-flex:1;-ms-flex:1;flex:1;background-color:#fff;border-radius:0 3px 3px 0}.docs .docs-main .docs-body .docs-container .docs-box[data-v-216f7e72]{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.docs .docs-main .docs-body .docs-container .docs-header[data-v-216f7e72]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:6px 24px 0;padding:12px 0;border-bottom:1px solid #eee}.docs .docs-main .docs-body .docs-container .docs-header .docs-h1[data-v-216f7e72]{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:16px;white-space:nowrap}.docs .docs-main .docs-body .docs-container .docs-header .docs-setting[data-v-216f7e72]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.docs .docs-main .docs-body .docs-container .docs-header .docs-setting>button[data-v-216f7e72]{margin:0 6px}.docs .docs-main .docs-body .docs-container .docs-header .docs-setting>button[data-v-216f7e72]:last-child{margin-right:0}.docs .docs-main .docs-body .docs-container .docs-section[data-v-216f7e72]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:12px 26px;overflow:auto;-webkit-transform:translateZ(0);transform:translateZ(0)}.docs .docs-main .docs-body .docs-container .docs-section .none[data-v-216f7e72]{background-color:transparent;text-align:center;color:#666;padding:48px 24px}",""])},788:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(274),s=o.n(i),a=o(289),n=o.n(a),d=o(789),r=o.n(d),l=o(794),c=o.n(l),u=o(49),f=o.n(u);e.default={components:{WDrawer:f.a,BookUsers:c.a,BookSetting:r.a,NestedDraggable:n.a,WContent:s.a},data:function(){return{loadIng:0,bookLists:[],bookListPage:1,bookListTotal:0,bookLoading:!1,bookHasMorePages:!1,bookNoDataText:"",addBookId:0,addBookShow:!1,formBookAdd:{title:""},ruleBookAdd:{},selectBookData:{},sectionLists:[],sectionNoDataText:"",addSectionId:0,addSectionShow:!1,formSectionAdd:{title:"",type:"document"},ruleSectionAdd:{},sectionTypeLists:[],sortDisabled:!1,settingDrawerShow:!1,settingDrawerTab:"setting"}},mounted:function(){this.getBookLists(!0)},deactivated:function(){this.addBookShow=!1,this.addSectionShow=!1},computed:{},watch:{usrName:function(){this.usrLogin&&this.getBookLists(!0)},addBookShow:function(t){var e=this;if(t&&this.addBookId>0){var o=this.bookLists.filter(function(t){return t.id==e.addBookId});1===o.length?this.$set(this.formBookAdd,"title",o[0].title):this.$set(this.formBookAdd,"title","")}},addSectionShow:function(t){var e=this;if(t&&this.addSectionId>0){var o=this.children2lists(this.sectionLists).filter(function(t){return t.id==e.addSectionId});1===o.length?this.$set(this.formSectionAdd,"title",o[0].title):this.$set(this.formSectionAdd,"title","")}}},methods:{initLanguage:function(){this.bookNoDataText=this.$L("数据加载中....."),this.sectionNoDataText=this.$L("数据加载中....."),this.sectionTypeLists=[{value:"document",text:this.$L("文本")},{value:"mind",text:this.$L("脑图")},{value:"sheet",text:this.$L("表格")},{value:"flow",text:this.$L("流程图")},{value:"folder",text:this.$L("目录")}],this.ruleBookAdd={title:[{required:!0,message:this.$L("请填写知识库名称!"),trigger:"change"},{type:"string",min:2,message:this.$L("知识库名称长度至少2位!"),trigger:"change"}]},this.ruleSectionAdd={title:[{required:!0,message:this.$L("请填写文档标题!"),trigger:"change"},{type:"string",min:2,message:this.$L("文档标题长度至少2位!"),trigger:"change"}],type:[{required:!0}]}},children2lists:function(t){var e=this,o=[];return t.forEach(function(t){o.push({id:t.id,title:t.title}),o=o.concat(e.children2lists(t.children))}),o},getBookLists:function(t){var e=this;if(!0===t)this.bookListPage=1;else{if(!1===this.bookHasMorePages)return;this.bookListPage++}this.bookLoading=!0,this.bookNoDataText=this.$L("数据加载中....."),this.bookHasMorePages=!1,$A.apiAjax({url:"docs/book/lists",data:{page:Math.max(this.bookListPage,1),pagesize:20},complete:function(){e.bookLoading=!1},error:function(){e.bookNoDataText=e.$L("数据加载失败!")},success:function(t){1===t.ret?(t.data.lists.forEach(function(t){e.bookLists.find(function(e){return e.id==t.id})||e.bookLists.push(t)}),e.bookListTotal=t.data.total,e.bookNoDataText=e.$L("没有相关的数据"),e.bookHasMorePages=t.data.hasMorePages,void 0===e.selectBookData.id&&(e.selectBookData=e.bookLists[0],e.getSectionLists())):(e.bookLists=[],e.bookListTotal=0,e.bookNoDataText=t.msg)}})},onBookAdd:function(){var t=this;this.$refs.bookAdd.validate(function(e){e&&(t.loadIng++,$A.apiAjax({url:"docs/book/add",data:Object.assign(t.formBookAdd,{id:t.addBookId}),complete:function(){t.loadIng--},success:function(e){1===e.ret?(t.addBookShow=!1,t.$Message.success(e.msg),t.$refs.bookAdd.resetFields(),t.addBookId>0?t.bookLists.some(function(o){if(o.id==t.addBookId)return t.$set(o,"title",e.data.title),!0}):(t.bookLists.unshift(e.data),t.selectBookData=t.bookLists[0],t.getSectionLists())):t.$Modal.error({title:t.$L("温馨提示"),content:e.msg})}}))})},onBookDelete:function(t){var e=this;this.$Modal.confirm({title:this.$L("删除知识库"),content:this.$L("你确定要删除此知识库吗?"),loading:!0,onOk:function(){$A.apiAjax({url:"docs/book/delete",data:{id:t},error:function(){e.$Modal.remove(),alert(e.$L("网络繁忙,请稍后再试!"))},success:function(o){e.$Modal.remove(),e.bookLists.some(function(o,i){if(o.id==t)return e.bookLists.splice(i,1),!0}),e.selectBookData=e.bookLists.length>0?e.bookLists[0]:{},e.getSectionLists(),setTimeout(function(){1===o.ret?e.$Message.success(o.msg):e.$Modal.error({title:e.$L("温馨提示"),content:o.msg})},350)}})}})},getSectionLists:function(t){var e=this;!0===t&&(this.sectionLists=[]);var o=this.selectBookData.id;this.loadIng++,this.sectionNoDataText=this.$L("数据加载中....."),$A.apiAjax({url:"docs/section/lists",data:{act:"edit",bookid:o},complete:function(){e.loadIng--},error:function(){o==e.selectBookData.id&&(e.sectionNoDataText=e.$L("数据加载失败!"))},success:function(t){o==e.selectBookData.id&&(1===t.ret?(e.sectionLists=t.data.tree,e.sectionNoDataText=e.$L("没有相关的数据")):(e.sectionLists=[],e.sectionNoDataText=t.msg))}})},onSectionAdd:function(){var t=this;this.$refs.sectionAdd.validate(function(e){if(e){t.loadIng++;var o=t.selectBookData.id;$A.apiAjax({url:"docs/section/add",data:Object.assign(t.formSectionAdd,{id:t.addSectionId,bookid:o}),complete:function(){t.loadIng--},success:function(e){o==t.selectBookData.id&&(1===e.ret?(t.addSectionShow=!1,t.$Message.success(e.msg),t.$refs.sectionAdd.resetFields(),t.getSectionLists()):t.$Modal.error({title:t.$L("温馨提示"),content:e.msg}))}})}})},onSectionDelete:function(t){var e=this,o=this.sectionTypeLists.find(function(e){return e.value==t.type});this.$Modal.confirm({title:this.$L("删除文档"),content:this.$L("你确定要删除%【%】吗?",o?o.text:"",t.title),loading:!0,onOk:function(){$A.apiAjax({url:"docs/section/delete",data:{id:t.id},error:function(){e.$Modal.remove(),alert(e.$L("网络繁忙,请稍后再试!"))},success:function(t){e.$Modal.remove(),e.getSectionLists(),setTimeout(function(){1===t.ret?e.$Message.success(t.msg):e.$Modal.error({title:e.$L("温馨提示"),content:t.msg})},350)}})}})},handleSection:function(t,e){var o=this;switch(t){case"open":this.goForward({name:"docs-edit",params:{sid:e.id,other:e||{}}});break;case"edit":this.addSectionId=e.id,this.addSectionShow=!0;break;case"add":this.addSectionId=-1*e.id,this.addSectionShow=!0;break;case"delete":if(this.sortDisabled)return void this.$Modal.warning({title:this.$L("温馨提示"),content:this.$L("正在进行其他操作,请稍后重试...")});this.onSectionDelete(e);break;case"sort":this.sortDisabled=!0,this.loadIng++,$A.apiAjax({url:"docs/section/sort",data:{bookid:this.selectBookData.id,newsort:e},complete:function(){o.sortDisabled=!1,o.loadIng--},error:function(){o.getSectionLists(),alert(o.$L("网络繁忙,请稍后再试!"))},success:function(t){1===t.ret?o.$Message.success(t.msg):(o.getSectionLists(),o.$Modal.error({title:o.$L("温馨提示"),content:t.msg}))}})}},showShare:function(){var t=this;this.$Modal.confirm({render:function(e){return e("div",[e("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},t.$L("文档链接")),e("Input",{props:{value:$A.webUrl("docs/view/b"+t.selectBookData.id),readonly:!0}})])}})},settingCallback:function(t){var e=this,o=this.bookLists.find(function(e){return e.id==t.id});o&&$A.each(t,function(t,i){e.$set(o,t,i)})}}}},789:function(t,e,o){var i=o(2)(o(792),o(793),!1,function(t){o(790)},"data-v-37b30780",null);t.exports=i.exports},790:function(t,e,o){var i=o(791);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);o(1)("681f49f4",i,!0,{})},791:function(t,e,o){(t.exports=o(0)(!1)).push([t.i,".book-setting[data-v-37b30780]{padding:0 12px}.book-setting .form-title[data-v-37b30780]{font-weight:700}.book-setting .form-link[data-v-37b30780]{text-decoration:underline}.book-setting .form-placeholder[data-v-37b30780]{font-size:12px;color:#999}.book-setting .form-placeholder[data-v-37b30780]:hover{color:#000}",""])},792:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(7),s=o.n(i);e.default={name:"BookSetting",components:{DrawerTabsContainer:s.a},props:{id:{default:0},canload:{type:Boolean,default:!0}},data:function(){return{loadYet:!1,loadIng:0,formSystem:{}}},mounted:function(){this.canload&&(this.loadYet=!0,this.getSetting())},watch:{id:function(){this.loadYet&&this.getSetting()},canload:function(t){t&&!this.loadYet&&(this.loadYet=!0,this.getSetting())}},methods:{getSetting:function(t){var e=this;this.loadIng++,$A.apiAjax({url:"docs/book/setting?type="+(t?"save":"get"),data:Object.assign(this.formSystem,{id:this.id}),complete:function(){e.loadIng--},success:function(o){if(1===o.ret){var i=o.data;i.role_edit=i.role_edit||"reg",i.role_look=i.role_look||"edit",i.role_view=i.role_view||"all",e.formSystem=i,e.formSystem__reset=$A.cloneData(e.formSystem),t&&(e.$emit("on-setting-callback",Object.assign(i,{id:e.id})),e.$Message.success(e.$L("修改成功")))}else t&&e.$Modal.error({title:e.$L("温馨提示"),content:o.msg})}})},handleSubmit:function(t){var e=this;this.$refs[t].validate(function(o){if(o)switch(t){case"formSystem":e.getSetting(!0)}})},handleReset:function(t){void 0===this[t+"__reset"]?this.$refs[t].resetFields():this[t]=$A.cloneData(this[t+"__reset"])}}}},793:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("drawer-tabs-container",[o("div",{staticClass:"book-setting"},[o("Form",{ref:"formSystem",attrs:{model:t.formSystem,"label-width":80},nativeOn:{submit:function(t){t.preventDefault()}}},[o("FormItem",{attrs:{label:t.$L("文档链接")}},[o("a",{staticClass:"form-link",attrs:{target:"_blank",href:t.$A.webUrl("docs/view/b"+this.id)}},[t._v(t._s(t.$A.webUrl("docs/view/b"+this.id)))])]),t._v(" "),o("FormItem",{attrs:{label:t.$L("管理权限")}},[o("div",[o("div",[o("RadioGroup",{model:{value:t.formSystem.role_edit,callback:function(e){t.$set(t.formSystem,"role_edit",e)},expression:"formSystem.role_edit"}},[o("Radio",{attrs:{label:"private"}},[t._v(t._s(t.$L("私有文库")))]),t._v(" "),o("Radio",{attrs:{label:"member"}},[t._v(t._s(t.$L("成员开放")))]),t._v(" "),o("Radio",{attrs:{label:"reg"}},[t._v(t._s(t.$L("注册会员")))])],1)],1),t._v(" "),"private"==t.formSystem.role_edit?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("仅作者可以修改。"))+"\n ")]):"member"==t.formSystem.role_edit?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("仅作者和文档成员可以修改。"))+"\n ")]):"reg"==t.formSystem.role_edit?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("所有会员都可以修改。"))+"\n ")]):t._e()])]),t._v(" "),o("FormItem",{attrs:{label:t.$L("阅读权限")}},[o("div",[o("RadioGroup",{model:{value:t.formSystem.role_view,callback:function(e){t.$set(t.formSystem,"role_view",e)},expression:"formSystem.role_view"}},[o("Radio",{attrs:{label:"private"}},[t._v(t._s(t.$L("私有文库")))]),t._v(" "),o("Radio",{attrs:{label:"member"}},[t._v(t._s(t.$L("成员开放")))]),t._v(" "),o("Radio",{attrs:{label:"reg"}},[t._v(t._s(t.$L("注册会员")))]),t._v(" "),o("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("完全开放")))])],1)],1),t._v(" "),"private"==t.formSystem.role_view?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("仅作者可以阅读分享地址。"))+"\n ")]):"member"==t.formSystem.role_view?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("仅作者和文档成员可以阅读分享地址。"))+"\n ")]):"reg"==t.formSystem.role_view?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("所有会员都可以阅读分享地址。"))+"\n ")]):"all"==t.formSystem.role_view?o("div",{staticClass:"form-placeholder"},[t._v("\n "+t._s(t.$L("所有人(含游客)都可以阅读分享地址。"))+"\n ")]):t._e()]),t._v(" "),o("FormItem",[o("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(e){return t.handleSubmit("formSystem")}}},[t._v(t._s(t.$L("提交")))]),t._v(" "),o("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:function(e){return t.handleReset("formSystem")}}},[t._v(t._s(t.$L("重置")))])],1)],1)],1)])},staticRenderFns:[]}},794:function(t,e,o){var i=o(2)(o(797),o(798),!1,function(t){o(795)},"data-v-3a68f7bf",null);t.exports=i.exports},795:function(t,e,o){var i=o(796);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);o(1)("e8cbd212",i,!0,{})},796:function(t,e,o){(t.exports=o(0)(!1)).push([t.i,".book-users[data-v-3a68f7bf]{padding:0 12px}.book-users .tableFill[data-v-3a68f7bf]{margin:12px 0 20px}",""])},797:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=o(7),s=o.n(i);e.default={name:"BookUsers",components:{DrawerTabsContainer:s.a},props:{id:{default:0},canload:{type:Boolean,default:!0}},data:function(){return{loadYet:!1,loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,noDataText:""}},mounted:function(){this.canload&&(this.loadYet=!0,this.getLists(!0))},watch:{id:function(){this.loadYet&&this.getLists(!0)},canload:function(t){t&&!this.loadYet&&(this.loadYet=!0,this.getLists(!0))}},methods:{initLanguage:function(){var t=this;this.noDataText=this.$L("数据加载中....."),this.columns=[{title:this.$L("头像"),minWidth:60,maxWidth:100,render:function(t,e){return t("UserImg",{props:{info:e.row},style:{width:"30px",height:"30px",fontSize:"16px",lineHeight:"30px",borderRadius:"15px",verticalAlign:"middle"}})}},{title:this.$L("用户名"),key:"username",minWidth:80,ellipsis:!0},{title:this.$L("昵称"),minWidth:80,ellipsis:!0,render:function(t,e){return t("span",e.row.nickname||"-")}},{title:this.$L("职位/职称"),minWidth:100,ellipsis:!0,render:function(t,e){return t("span",e.row.profession||"-")}},{title:this.$L("加入时间"),width:160,render:function(t,e){return t("span",$A.formatDate("Y-m-d H:i:s",e.row.indate))}},{title:this.$L("操作"),key:"action",width:80,align:"center",render:function(e,o){return e("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"},on:{click:function(){t.$Modal.confirm({title:t.$L("移出成员"),content:t.$L("你确定要将此成员移出项目吗?"),loading:!0,onOk:function(){$A.apiAjax({url:"docs/users/join",data:{act:"delete",id:o.row.bookid,username:o.row.username},error:function(){t.$Modal.remove(),alert(t.$L("网络繁忙,请稍后再试!"))},success:function(e){t.$Modal.remove(),t.getLists(),setTimeout(function(){1===e.ret?t.$Message.success(e.msg):t.$Modal.error({title:t.$L("温馨提示"),content:e.msg})},350)}})}})}}},t.$L("删除"))}}]},setPage:function(t){this.listPage=t,this.getLists()},setPageSize:function(t){Math.max($A.runNum(this.listPageSize),10)!=t&&(this.listPageSize=t,this.getLists())},getLists:function(t){var e=this;if(!0===t&&(this.listPage=1),0==this.id)return this.lists=[],this.listTotal=0,void(this.noDataText=this.$L("没有相关的数据"));this.loadIng++,this.noDataText=this.$L("数据加载中....."),$A.apiAjax({url:"docs/users/lists",data:{page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10),id:this.id},complete:function(){e.loadIng--},error:function(){e.noDataText=e.$L("数据加载失败!")},success:function(t){1===t.ret?(e.lists=t.data.lists,e.listTotal=t.data.total,e.noDataText=e.$L("没有相关的数据")):(e.lists=[],e.listTotal=0,e.noDataText=t.msg)}})},addUser:function(){var t=this;this.userValue="",this.$Modal.confirm({render:function(e){return e("div",[e("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},t.$L("添加成员")),e("UserInput",{props:{value:t.userValue,multiple:!0,nousername:t.usrName,nobookid:t.id,placeholder:t.$L("请输入昵称/用户名搜索")},on:{input:function(e){t.userValue=e}}})])},loading:!0,onOk:function(){if(t.userValue){var e=t.userValue;$A.apiAjax({url:"docs/users/join",data:{act:"join",id:t.id,username:e},error:function(){t.$Modal.remove(),alert(t.$L("网络繁忙,请稍后再试!"))},success:function(e){t.$Modal.remove(),t.getLists(),setTimeout(function(){1===e.ret?t.$Message.success(e.msg):t.$Modal.error({title:t.$L("温馨提示"),content:e.msg})},350)}})}else t.$Modal.remove()}})}}}},798:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("drawer-tabs-container",[o("div",{staticClass:"book-users"},[o("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"md-add"},on:{click:t.addUser}},[t._v(t._s(t.$L("添加成员")))]),t._v(" "),o("Table",{ref:"tableRef",staticClass:"tableFill",attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.noDataText,stripe:""}}),t._v(" "),o("Page",{staticClass:"pageBox",attrs:{total:t.listTotal,current:t.listPage,disabled:t.loadIng>0,"page-size-opts":[10,20,30,50,100],placement:"top","show-elevator":"","show-sizer":"","show-total":"",transfer:"",simple:t.windowMax768},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])},staticRenderFns:[]}},799:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"w-main docs"},[o("v-title",[t._v(t._s(t.$L("知识库")))]),t._v(" "),o("div",{staticClass:"w-nav"},[o("div",{staticClass:"nav-row"},[o("div",{staticClass:"w-nav-left"},[o("div",{staticClass:"page-nav-left"},[o("span",{staticClass:"hover",on:{click:function(e){t.addBookId=0,t.addBookShow=!0}}},[o("i",{staticClass:"ft icon"},[t._v("")]),t._v(" "+t._s(t.$L("新建知识库")))]),t._v(" "),t.loadIng>0?o("div",{staticClass:"page-nav-loading"},[o("w-loading")],1):o("div",{staticClass:"page-nav-refresh"},[o("em",{on:{click:function(e){return t.getBookLists(!0)}}},[t._v(t._s(t.$L("刷新")))])])])]),t._v(" "),o("div",{staticClass:"w-nav-flex"})])]),t._v(" "),o("w-content",[o("div",{staticClass:"docs-main"},[o("div",{staticClass:"docs-body"},[o("div",{staticClass:"docs-menu"},[o("h3",[t._v(t._s(t.$L("我的知识库")))]),t._v(" "),o("ul",[t._l(t.bookLists,function(e){return o("li",{class:{active:e.id==t.selectBookData.id},on:{click:function(o){t.selectBookData=e,t.getSectionLists(!0)}}},[o("div",{staticClass:"docs-title"},[t._v(t._s(e.title))]),t._v(" "),o("div",{staticClass:"docs-time"},[t._v(t._s(t.$A.formatDate("Y-m-d H:i:s",e.indate)))])])}),t._v(" "),t.bookHasMorePages?o("li",{staticClass:"more",on:{click:t.getBookLists}},[t._v(t._s(t.$L("加载下一页...")))]):t.bookLoading?o("li",{staticClass:"load"},[o("WLoading")],1):0==t.bookLists.length?o("li",{staticClass:"none"},[t._v(t._s(t.bookNoDataText))]):t._e()],2)]),t._v(" "),o("div",{staticClass:"docs-container"},[t.selectBookData.id>0?o("div",{staticClass:"docs-box"},[o("div",{staticClass:"docs-header"},[o("div",{staticClass:"docs-h1"},[t._v(t._s(t.selectBookData.title))]),t._v(" "),o("div",{staticClass:"docs-setting"},[o("Button",{on:{click:function(e){t.addSectionId=0,t.addSectionShow=!0}}},[t._v(t._s(t.$L("新增章节")))]),t._v(" "),o("Button",{on:{click:function(e){t.addBookId=t.selectBookData.id,t.addBookShow=!0}}},[t._v(t._s(t.$L("修改标题")))]),t._v(" "),o("Button",{on:{click:t.showShare}},[t._v(t._s(t.$L("分享")))]),t._v(" "),o("Button",{on:{click:function(e){t.settingDrawerShow=!0,t.settingDrawerTab="setting"}}},[t._v(t._s(t.$L("设置")))]),t._v(" "),o("Button",{attrs:{type:"warning",ghost:""},on:{click:function(e){return t.onBookDelete(t.selectBookData.id)}}},[t._v(t._s(t.$L("删除")))])],1)]),t._v(" "),o("div",{staticClass:"docs-section"},[o("nested-draggable",{attrs:{lists:t.sectionLists,disabled:t.sortDisabled},on:{change:t.handleSection}}),t._v(" "),0==t.sectionLists.length?o("div",{staticClass:"none"},[t._v(t._s(t.sectionNoDataText))]):t._e()],1)]):t._e()])])])]),t._v(" "),o("Modal",{attrs:{title:t.$L(t.addBookId>0?"修改标题":"新建知识库"),closable:!1,"mask-closable":!1,"class-name":"simple-modal"},model:{value:t.addBookShow,callback:function(e){t.addBookShow=e},expression:"addBookShow"}},[o("Form",{ref:"bookAdd",attrs:{model:t.formBookAdd,rules:t.ruleBookAdd,"label-width":110},nativeOn:{submit:function(t){t.preventDefault()}}},[o("FormItem",{staticStyle:{"margin-right":"28px"},attrs:{prop:"title",label:t.$L("知识库名称")}},[o("Input",{attrs:{type:"text",maxlength:32},model:{value:t.formBookAdd.title,callback:function(e){t.$set(t.formBookAdd,"title",e)},expression:"formBookAdd.title"}})],1)],1),t._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("Button",{attrs:{type:"default"},on:{click:function(e){t.addBookShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),o("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onBookAdd}},[t._v(t._s(t.$L(t.addBookId>0?"提交":"添加")))])],1)],1),t._v(" "),o("Modal",{attrs:{title:t.$L(t.addSectionId>0?"修改文档标题":"新建文档"),closable:!1,"mask-closable":!1,"class-name":"simple-modal"},model:{value:t.addSectionShow,callback:function(e){t.addSectionShow=e},expression:"addSectionShow"}},[o("Form",{ref:"sectionAdd",attrs:{model:t.formSectionAdd,rules:t.ruleSectionAdd,"label-width":110},nativeOn:{submit:function(t){t.preventDefault()}}},[o("FormItem",{staticStyle:{"margin-right":"28px"},attrs:{prop:"title",label:t.$L("文档标题")}},[o("Input",{attrs:{type:"text",maxlength:32},model:{value:t.formSectionAdd.title,callback:function(e){t.$set(t.formSectionAdd,"title",e)},expression:"formSectionAdd.title"}})],1),t._v(" "),t.addSectionId<=0?o("FormItem",{staticStyle:{"margin-right":"28px"},attrs:{prop:"type",label:t.$L("文档类型")}},[o("ButtonGroup",t._l(t.sectionTypeLists,function(e,i){return o("Button",{key:i,attrs:{type:t.formSectionAdd.type==e.value?"primary":"default"},on:{click:function(o){t.formSectionAdd.type=e.value}}},[t._v(t._s(e.text))])}),1)],1):t._e()],1),t._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("Button",{attrs:{type:"default"},on:{click:function(e){t.addSectionShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),o("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onSectionAdd}},[t._v(t._s(t.$L(t.addSectionId>0?"提交":"添加")))])],1)],1),t._v(" "),o("WDrawer",{attrs:{maxWidth:"750"},model:{value:t.settingDrawerShow,callback:function(e){t.settingDrawerShow=e},expression:"settingDrawerShow"}},[t.settingDrawerShow?o("Tabs",{model:{value:t.settingDrawerTab,callback:function(e){t.settingDrawerTab=e},expression:"settingDrawerTab"}},[o("TabPane",{attrs:{label:t.$L("文档设置"),name:"setting"}},[o("book-setting",{attrs:{canload:t.settingDrawerShow&&"setting"==t.settingDrawerTab,id:t.selectBookData.id},on:{"on-setting-callback":t.settingCallback}})],1),t._v(" "),o("TabPane",{attrs:{label:t.$L("文档成员"),name:"member"}},[o("book-users",{attrs:{canload:t.settingDrawerShow&&"member"==t.settingDrawerTab,id:t.selectBookData.id}})],1)],1):t._e()],1)],1)},staticRenderFns:[]}},866:function(t,e,o){var i=o(2)(o(788),o(799),!1,function(t){o(786)},"data-v-216f7e72",null);t.exports=i.exports}});
|