6.js 93 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967
  1. webpackJsonp([6,12],{
  2. /***/ 292:
  3. /***/ (function(module, exports, __webpack_require__) {
  4. var disposed = false
  5. function injectStyle (ssrContext) {
  6. if (disposed) return
  7. __webpack_require__(843)
  8. }
  9. var normalizeComponent = __webpack_require__(2)
  10. /* script */
  11. var __vue_script__ = __webpack_require__(845)
  12. /* template */
  13. var __vue_template__ = __webpack_require__(856)
  14. /* template functional */
  15. var __vue_template_functional__ = false
  16. /* styles */
  17. var __vue_styles__ = injectStyle
  18. /* scopeId */
  19. var __vue_scopeId__ = "data-v-0172190c"
  20. /* moduleIdentifier (server only) */
  21. var __vue_module_identifier__ = null
  22. var Component = normalizeComponent(
  23. __vue_script__,
  24. __vue_template__,
  25. __vue_template_functional__,
  26. __vue_styles__,
  27. __vue_scopeId__,
  28. __vue_module_identifier__
  29. )
  30. Component.options.__file = "resources/assets/js/main/pages/docs.vue"
  31. /* hot reload */
  32. if (false) {(function () {
  33. var hotAPI = require("vue-hot-reload-api")
  34. hotAPI.install(require("vue"), false)
  35. if (!hotAPI.compatible) return
  36. module.hot.accept()
  37. if (!module.hot.data) {
  38. hotAPI.createRecord("data-v-0172190c", Component.options)
  39. } else {
  40. hotAPI.reload("data-v-0172190c", Component.options)
  41. }
  42. module.hot.dispose(function (data) {
  43. disposed = true
  44. })
  45. })()}
  46. module.exports = Component.exports
  47. /***/ }),
  48. /***/ 307:
  49. /***/ (function(module, exports, __webpack_require__) {
  50. var disposed = false
  51. function injectStyle (ssrContext) {
  52. if (disposed) return
  53. __webpack_require__(308)
  54. }
  55. var normalizeComponent = __webpack_require__(2)
  56. /* script */
  57. var __vue_script__ = __webpack_require__(310)
  58. /* template */
  59. var __vue_template__ = __webpack_require__(311)
  60. /* template functional */
  61. var __vue_template_functional__ = false
  62. /* styles */
  63. var __vue_styles__ = injectStyle
  64. /* scopeId */
  65. var __vue_scopeId__ = "data-v-35be3d57"
  66. /* moduleIdentifier (server only) */
  67. var __vue_module_identifier__ = null
  68. var Component = normalizeComponent(
  69. __vue_script__,
  70. __vue_template__,
  71. __vue_template_functional__,
  72. __vue_styles__,
  73. __vue_scopeId__,
  74. __vue_module_identifier__
  75. )
  76. Component.options.__file = "resources/assets/js/main/components/WContent.vue"
  77. /* hot reload */
  78. if (false) {(function () {
  79. var hotAPI = require("vue-hot-reload-api")
  80. hotAPI.install(require("vue"), false)
  81. if (!hotAPI.compatible) return
  82. module.hot.accept()
  83. if (!module.hot.data) {
  84. hotAPI.createRecord("data-v-35be3d57", Component.options)
  85. } else {
  86. hotAPI.reload("data-v-35be3d57", Component.options)
  87. }
  88. module.hot.dispose(function (data) {
  89. disposed = true
  90. })
  91. })()}
  92. module.exports = Component.exports
  93. /***/ }),
  94. /***/ 308:
  95. /***/ (function(module, exports, __webpack_require__) {
  96. // style-loader: Adds some css to the DOM by adding a <style> tag
  97. // load the styles
  98. var content = __webpack_require__(309);
  99. if(typeof content === 'string') content = [[module.i, content, '']];
  100. if(content.locals) module.exports = content.locals;
  101. // add the styles to the DOM
  102. var update = __webpack_require__(1)("5ee96958", content, false, {});
  103. // Hot Module Replacement
  104. if(false) {
  105. // When the styles change, update the <style> tags
  106. if(!content.locals) {
  107. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-35be3d57\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WContent.vue", function() {
  108. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-35be3d57\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WContent.vue");
  109. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  110. update(newContent);
  111. });
  112. }
  113. // When the module is disposed, remove the <style> tags
  114. module.hot.dispose(function() { update(); });
  115. }
  116. /***/ }),
  117. /***/ 309:
  118. /***/ (function(module, exports, __webpack_require__) {
  119. exports = module.exports = __webpack_require__(0)(false);
  120. // imports
  121. // module
  122. exports.push([module.i, "\n.w-content[data-v-35be3d57] {\n position: absolute;\n top: 72px;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: auto;\n background-repeat: no-repeat;\n background-position: center;\n background-color: #EEEEEE;\n background-size: cover;\n}\n.w-content .w-container[data-v-35be3d57] {\n min-height: 500px;\n}\n", ""]);
  123. // exports
  124. /***/ }),
  125. /***/ 310:
  126. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  127. "use strict";
  128. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. //
  151. //
  152. //
  153. /* harmony default export */ __webpack_exports__["default"] = ({
  154. name: 'WContent',
  155. data: function data() {
  156. return {
  157. bgid: -1
  158. };
  159. },
  160. mounted: function mounted() {
  161. this.bgid = $A.runNum(this.usrInfo.bgid);
  162. },
  163. watch: {
  164. usrInfo: {
  165. handler: function handler(info) {
  166. this.bgid = $A.runNum(info.bgid);
  167. },
  168. deep: true
  169. }
  170. },
  171. methods: {
  172. getBgUrl: function getBgUrl(id, thumb) {
  173. if (id < 0) {
  174. return 'none';
  175. }
  176. id = Math.max(1, parseInt(id));
  177. return 'url(' + window.location.origin + '/images/bg/' + (thumb ? 'thumb/' : '') + id + '.jpg' + ')';
  178. }
  179. }
  180. });
  181. /***/ }),
  182. /***/ 311:
  183. /***/ (function(module, exports, __webpack_require__) {
  184. var render = function() {
  185. var _vm = this
  186. var _h = _vm.$createElement
  187. var _c = _vm._self._c || _h
  188. return _c(
  189. "div",
  190. {
  191. staticClass: "w-content",
  192. style: "background-image:" + _vm.getBgUrl(_vm.bgid)
  193. },
  194. [_vm._t("default")],
  195. 2
  196. )
  197. }
  198. var staticRenderFns = []
  199. render._withStripped = true
  200. module.exports = { render: render, staticRenderFns: staticRenderFns }
  201. if (false) {
  202. module.hot.accept()
  203. if (module.hot.data) {
  204. require("vue-hot-reload-api") .rerender("data-v-35be3d57", module.exports)
  205. }
  206. }
  207. /***/ }),
  208. /***/ 327:
  209. /***/ (function(module, exports, __webpack_require__) {
  210. var disposed = false
  211. function injectStyle (ssrContext) {
  212. if (disposed) return
  213. __webpack_require__(361)
  214. }
  215. var normalizeComponent = __webpack_require__(2)
  216. /* script */
  217. var __vue_script__ = __webpack_require__(363)
  218. /* template */
  219. var __vue_template__ = __webpack_require__(364)
  220. /* template functional */
  221. var __vue_template_functional__ = false
  222. /* styles */
  223. var __vue_styles__ = injectStyle
  224. /* scopeId */
  225. var __vue_scopeId__ = "data-v-455d3017"
  226. /* moduleIdentifier (server only) */
  227. var __vue_module_identifier__ = null
  228. var Component = normalizeComponent(
  229. __vue_script__,
  230. __vue_template__,
  231. __vue_template_functional__,
  232. __vue_styles__,
  233. __vue_scopeId__,
  234. __vue_module_identifier__
  235. )
  236. Component.options.__file = "resources/assets/js/main/components/docs/NestedDraggable.vue"
  237. /* hot reload */
  238. if (false) {(function () {
  239. var hotAPI = require("vue-hot-reload-api")
  240. hotAPI.install(require("vue"), false)
  241. if (!hotAPI.compatible) return
  242. module.hot.accept()
  243. if (!module.hot.data) {
  244. hotAPI.createRecord("data-v-455d3017", Component.options)
  245. } else {
  246. hotAPI.reload("data-v-455d3017", Component.options)
  247. }
  248. module.hot.dispose(function (data) {
  249. disposed = true
  250. })
  251. })()}
  252. module.exports = Component.exports
  253. /***/ }),
  254. /***/ 361:
  255. /***/ (function(module, exports, __webpack_require__) {
  256. // style-loader: Adds some css to the DOM by adding a <style> tag
  257. // load the styles
  258. var content = __webpack_require__(362);
  259. if(typeof content === 'string') content = [[module.i, content, '']];
  260. if(content.locals) module.exports = content.locals;
  261. // add the styles to the DOM
  262. var update = __webpack_require__(1)("02b85fe6", content, false, {});
  263. // Hot Module Replacement
  264. if(false) {
  265. // When the styles change, update the <style> tags
  266. if(!content.locals) {
  267. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-455d3017\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./NestedDraggable.vue", function() {
  268. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-455d3017\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./NestedDraggable.vue");
  269. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  270. update(newContent);
  271. });
  272. }
  273. // When the module is disposed, remove the <style> tags
  274. module.hot.dispose(function() { update(); });
  275. }
  276. /***/ }),
  277. /***/ 362:
  278. /***/ (function(module, exports, __webpack_require__) {
  279. exports = module.exports = __webpack_require__(0)(false);
  280. // imports
  281. // module
  282. exports.push([module.i, "\n.docs-group[data-v-455d3017] {\n cursor: move;\n}\n.docs-group.readonly[data-v-455d3017] {\n cursor: default;\n}\n.docs-group.hidden-children .docs-group[data-v-455d3017] {\n display: none;\n}\n.docs-group.hidden-children .item .together[data-v-455d3017] {\n display: block;\n}\n.docs-group .docs-group[data-v-455d3017] {\n padding-left: 14px;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+LUNEtwAAAEtJREFUSIntzzEVwAAMQkFSKfi3FKzQqQ5oJm5h5P3ZXQMYkrgwtk+OPo8kSzo7bGFcC+NaGNfCuBbGtTCuhXEtzB+SHAAGAEm/7wv2LKvDNoBjfgAAAABJRU5ErkJggg==) no-repeat -2px -9px;\n margin-left: 18px;\n border-left: 1px dotted #ddd;\n}\n.docs-group .item[data-v-455d3017] {\n padding: 4px 0 0 4px;\n background-color: #ffffff;\n border: solid 1px #ffffff;\n line-height: 24px;\n position: relative;\n}\n.docs-group .item .together[data-v-455d3017] {\n display: none;\n cursor: pointer;\n position: absolute;\n font-size: 12px;\n color: #ffb519;\n top: 50%;\n left: -2px;\n margin-top: 1px;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n z-index: 1;\n}\n.docs-group .item .dashed[data-v-455d3017] {\n position: absolute;\n margin: 0;\n padding: 0;\n top: 16px;\n right: 0;\n left: 20px;\n height: 2px;\n border-width: 0 0 1px 0;\n border-bottom: dashed 1px #eee;\n}\n.docs-group .item .header[data-v-455d3017] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n position: relative;\n background: #fff;\n padding: 0 8px;\n cursor: pointer;\n}\n.docs-group .item .header .tip[data-v-455d3017] {\n display: inline-block;\n position: relative;\n}\n.docs-group .item .header .tip > img[data-v-455d3017] {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-top: 5px;\n vertical-align: top;\n}\n.docs-group .item .header .title[data-v-455d3017] {\n display: inline-block;\n border-bottom: 1px solid transparent;\n cursor: pointer;\n padding: 0 3px 0 7px;\n color: #555555;\n word-break: break-all;\n}\n.docs-group .item .header .title.active[data-v-455d3017] {\n color: #0396f2;\n}\n.docs-group .item .info[data-v-455d3017] {\n position: absolute;\n background: #fff;\n padding-left: 12px;\n color: #666;\n right: 3px;\n top: 5px;\n}\n.docs-group .item .info > i[data-v-455d3017] {\n padding: 0 2px;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n cursor: pointer;\n}\n.docs-group .item .info > i[data-v-455d3017]:hover {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n", ""]);
  283. // exports
  284. /***/ }),
  285. /***/ 363:
  286. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  287. "use strict";
  288. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  289. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vuedraggable__ = __webpack_require__(51);
  290. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vuedraggable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vuedraggable__);
  291. //
  292. //
  293. //
  294. //
  295. //
  296. //
  297. //
  298. //
  299. //
  300. //
  301. //
  302. //
  303. //
  304. //
  305. //
  306. //
  307. //
  308. //
  309. //
  310. //
  311. //
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. //
  354. //
  355. //
  356. //
  357. //
  358. //
  359. //
  360. //
  361. //
  362. //
  363. //
  364. //
  365. //
  366. //
  367. //
  368. //
  369. //
  370. //
  371. //
  372. //
  373. //
  374. //
  375. //
  376. //
  377. //
  378. //
  379. //
  380. //
  381. //
  382. //
  383. //
  384. //
  385. //
  386. //
  387. //
  388. //
  389. //
  390. //
  391. //
  392. //
  393. //
  394. //
  395. //
  396. //
  397. //
  398. //
  399. //
  400. //
  401. //
  402. //
  403. //
  404. //
  405. //
  406. //
  407. //
  408. //
  409. //
  410. //
  411. //
  412. //
  413. //
  414. //
  415. //
  416. //
  417. //
  418. //
  419. //
  420. //
  421. //
  422. //
  423. //
  424. /* harmony default export */ __webpack_exports__["default"] = ({
  425. name: "NestedDraggable",
  426. props: {
  427. lists: {
  428. required: true,
  429. type: Array
  430. },
  431. isChildren: {
  432. type: Boolean,
  433. default: false
  434. },
  435. disabled: {
  436. type: Boolean,
  437. default: false
  438. },
  439. readonly: {
  440. type: Boolean,
  441. default: false
  442. },
  443. activeid: {
  444. default: ''
  445. }
  446. },
  447. data: function data() {
  448. return {
  449. listSortData: '',
  450. childrenHidden: false
  451. };
  452. },
  453. components: {
  454. draggable: __WEBPACK_IMPORTED_MODULE_0_vuedraggable___default.a
  455. },
  456. mounted: function mounted() {
  457. this.listSortData = this.getSort(this.lists);
  458. },
  459. methods: {
  460. getSort: function getSort(lists) {
  461. var _this = this;
  462. var parentid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  463. var sortData = "";
  464. lists.forEach(function (item) {
  465. sortData += item.id + ":" + parentid + ";" + _this.getSort(item.children, item.id);
  466. });
  467. return sortData;
  468. },
  469. handleClick: function handleClick(act, detail) {
  470. if (act == 'open') {
  471. if (detail.type == 'folder') {
  472. this.$set(detail, 'hiddenChildren', !detail.hiddenChildren);
  473. return;
  474. }
  475. }
  476. if (act == 'sort') {
  477. if (this.isChildren) {
  478. this.$emit("change", act, detail);
  479. } else {
  480. var tempSortData = this.getSort(this.lists);
  481. if (tempSortData != this.listSortData) {
  482. this.listSortData = tempSortData;
  483. this.$emit("change", act, tempSortData);
  484. }
  485. }
  486. return;
  487. }
  488. this.$emit("change", act, detail);
  489. }
  490. }
  491. });
  492. /***/ }),
  493. /***/ 364:
  494. /***/ (function(module, exports, __webpack_require__) {
  495. var render = function() {
  496. var _vm = this
  497. var _h = _vm.$createElement
  498. var _c = _vm._self._c || _h
  499. return _c(
  500. "draggable",
  501. {
  502. attrs: {
  503. tag: "div",
  504. list: _vm.lists,
  505. group: { name: "docs-nested" },
  506. animation: 150,
  507. disabled: _vm.disabled || _vm.readonly
  508. },
  509. on: {
  510. sort: function($event) {
  511. return _vm.handleClick("sort")
  512. }
  513. }
  514. },
  515. _vm._l(_vm.lists, function(detail) {
  516. return _c(
  517. "div",
  518. {
  519. key: detail.id,
  520. staticClass: "docs-group",
  521. class: {
  522. readonly: _vm.readonly,
  523. "hidden-children": detail.hiddenChildren === true
  524. }
  525. },
  526. [
  527. _c(
  528. "div",
  529. { staticClass: "item" },
  530. [
  531. _c("Icon", {
  532. staticClass: "together",
  533. attrs: { type: "md-add" },
  534. on: {
  535. click: function($event) {
  536. return _vm.handleClick("open", detail)
  537. }
  538. }
  539. }),
  540. _vm._v(" "),
  541. _c("div", { staticClass: "dashed" }),
  542. _vm._v(" "),
  543. _c("div", { staticClass: "header" }, [
  544. _c("div", { staticClass: "tip" }, [
  545. _c("img", { attrs: { src: detail.icon } })
  546. ]),
  547. _vm._v(" "),
  548. _c(
  549. "div",
  550. {
  551. staticClass: "title",
  552. class: { active: _vm.activeid == detail.id },
  553. on: {
  554. click: function($event) {
  555. return _vm.handleClick("open", detail)
  556. }
  557. }
  558. },
  559. [_vm._v(_vm._s(detail.title))]
  560. )
  561. ]),
  562. _vm._v(" "),
  563. !_vm.readonly
  564. ? _c(
  565. "div",
  566. { staticClass: "info" },
  567. [
  568. _c("Icon", {
  569. attrs: { type: "md-create" },
  570. on: {
  571. click: function($event) {
  572. return _vm.handleClick("edit", detail)
  573. }
  574. }
  575. }),
  576. _vm._v(" "),
  577. _c("Icon", {
  578. attrs: { type: "md-add" },
  579. on: {
  580. click: function($event) {
  581. return _vm.handleClick("add", detail)
  582. }
  583. }
  584. }),
  585. _vm._v(" "),
  586. _c("Icon", {
  587. attrs: { type: "md-trash" },
  588. on: {
  589. click: function($event) {
  590. return _vm.handleClick("delete", detail)
  591. }
  592. }
  593. })
  594. ],
  595. 1
  596. )
  597. : _vm._e()
  598. ],
  599. 1
  600. ),
  601. _vm._v(" "),
  602. typeof detail.children === "object" && detail.children !== null
  603. ? _c("nested-draggable", {
  604. attrs: {
  605. lists: detail.children,
  606. isChildren: true,
  607. disabled: _vm.disabled,
  608. readonly: _vm.readonly,
  609. activeid: _vm.activeid
  610. },
  611. on: { change: _vm.handleClick }
  612. })
  613. : _vm._e()
  614. ],
  615. 1
  616. )
  617. }),
  618. 0
  619. )
  620. }
  621. var staticRenderFns = []
  622. render._withStripped = true
  623. module.exports = { render: render, staticRenderFns: staticRenderFns }
  624. if (false) {
  625. module.hot.accept()
  626. if (module.hot.data) {
  627. require("vue-hot-reload-api") .rerender("data-v-455d3017", module.exports)
  628. }
  629. }
  630. /***/ }),
  631. /***/ 843:
  632. /***/ (function(module, exports, __webpack_require__) {
  633. // style-loader: Adds some css to the DOM by adding a <style> tag
  634. // load the styles
  635. var content = __webpack_require__(844);
  636. if(typeof content === 'string') content = [[module.i, content, '']];
  637. if(content.locals) module.exports = content.locals;
  638. // add the styles to the DOM
  639. var update = __webpack_require__(1)("529cbb4f", content, false, {});
  640. // Hot Module Replacement
  641. if(false) {
  642. // When the styles change, update the <style> tags
  643. if(!content.locals) {
  644. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0172190c\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./docs.vue", function() {
  645. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0172190c\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./docs.vue");
  646. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  647. update(newContent);
  648. });
  649. }
  650. // When the module is disposed, remove the <style> tags
  651. module.hot.dispose(function() { update(); });
  652. }
  653. /***/ }),
  654. /***/ 844:
  655. /***/ (function(module, exports, __webpack_require__) {
  656. exports = module.exports = __webpack_require__(0)(false);
  657. // imports
  658. // module
  659. exports.push([module.i, "\n.docs .docs-main[data-v-0172190c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 100%;\n min-width: 1024px;\n height: 100%;\n padding: 15px;\n}\n.docs .docs-main .docs-body[data-v-0172190c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n width: 100%;\n height: 100%;\n min-height: 500px;\n}\n.docs .docs-main .docs-body .docs-menu[data-v-0172190c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 230px;\n border-radius: 3px 0 0 3px;\n background: rgba(255, 255, 255, 0.8);\n}\n.docs .docs-main .docs-body .docs-menu h3[data-v-0172190c] {\n font-size: 18px;\n font-weight: normal;\n padding: 10px 12px;\n color: #333333;\n}\n.docs .docs-main .docs-body .docs-menu ul[data-v-0172190c] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n overflow: auto;\n}\n.docs .docs-main .docs-body .docs-menu ul li[data-v-0172190c] {\n padding: 12px;\n cursor: pointer;\n}\n.docs .docs-main .docs-body .docs-menu ul li.more[data-v-0172190c] {\n text-align: center;\n color: #555555;\n margin-bottom: 6px;\n}\n.docs .docs-main .docs-body .docs-menu ul li.more[data-v-0172190c]:hover {\n color: #333333;\n}\n.docs .docs-main .docs-body .docs-menu ul li.load[data-v-0172190c] {\n text-align: center;\n height: 42px;\n margin-bottom: 9px;\n}\n.docs .docs-main .docs-body .docs-menu ul li.none[data-v-0172190c] {\n background-color: transparent;\n text-align: center;\n color: #666666;\n padding: 8px 18px;\n}\n.docs .docs-main .docs-body .docs-menu ul li.active[data-v-0172190c] {\n background-color: #ffffff;\n}\n.docs .docs-main .docs-body .docs-menu ul li .docs-title[data-v-0172190c] {\n color: #242424;\n font-size: 13px;\n}\n.docs .docs-main .docs-body .docs-menu ul li .docs-time[data-v-0172190c] {\n display: block;\n color: #999;\n font-size: 12px;\n margin-top: 2px;\n position: relative;\n}\n.docs .docs-main .docs-body .docs-container[data-v-0172190c] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n background-color: #ffffff;\n border-radius: 0 3px 3px 0;\n}\n.docs .docs-main .docs-body .docs-container .docs-box[data-v-0172190c] {\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.docs .docs-main .docs-body .docs-container .docs-header[data-v-0172190c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n margin: 6px 24px 0;\n padding: 12px 0;\n border-bottom: 1px solid #eeeeee;\n}\n.docs .docs-main .docs-body .docs-container .docs-header .docs-h1[data-v-0172190c] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n font-size: 16px;\n white-space: nowrap;\n}\n.docs .docs-main .docs-body .docs-container .docs-header .docs-setting[data-v-0172190c] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.docs .docs-main .docs-body .docs-container .docs-header .docs-setting > button[data-v-0172190c] {\n margin: 0 6px;\n}\n.docs .docs-main .docs-body .docs-container .docs-header .docs-setting > button[data-v-0172190c]:last-child {\n margin-right: 0;\n}\n.docs .docs-main .docs-body .docs-container .docs-section[data-v-0172190c] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 12px 26px;\n overflow: auto;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n}\n.docs .docs-main .docs-body .docs-container .docs-section .none[data-v-0172190c] {\n background-color: transparent;\n text-align: center;\n color: #666666;\n padding: 48px 24px;\n}\n", ""]);
  660. // exports
  661. /***/ }),
  662. /***/ 845:
  663. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  664. "use strict";
  665. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  666. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_WContent__ = __webpack_require__(307);
  667. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_WContent___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__components_WContent__);
  668. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_docs_NestedDraggable__ = __webpack_require__(327);
  669. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_docs_NestedDraggable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__components_docs_NestedDraggable__);
  670. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_docs_setting__ = __webpack_require__(846);
  671. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_docs_setting___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__components_docs_setting__);
  672. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_docs_users__ = __webpack_require__(851);
  673. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_docs_users___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__components_docs_users__);
  674. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_iview_WDrawer__ = __webpack_require__(49);
  675. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_iview_WDrawer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__components_iview_WDrawer__);
  676. //
  677. //
  678. //
  679. //
  680. //
  681. //
  682. //
  683. //
  684. //
  685. //
  686. //
  687. //
  688. //
  689. //
  690. //
  691. //
  692. //
  693. //
  694. //
  695. //
  696. //
  697. //
  698. //
  699. //
  700. //
  701. //
  702. //
  703. //
  704. //
  705. //
  706. //
  707. //
  708. //
  709. //
  710. //
  711. //
  712. //
  713. //
  714. //
  715. //
  716. //
  717. //
  718. //
  719. //
  720. //
  721. //
  722. //
  723. //
  724. //
  725. //
  726. //
  727. //
  728. //
  729. //
  730. //
  731. //
  732. //
  733. //
  734. //
  735. //
  736. //
  737. //
  738. //
  739. //
  740. //
  741. //
  742. //
  743. //
  744. //
  745. //
  746. //
  747. //
  748. //
  749. //
  750. //
  751. //
  752. //
  753. //
  754. //
  755. //
  756. //
  757. //
  758. //
  759. //
  760. //
  761. //
  762. //
  763. //
  764. //
  765. //
  766. //
  767. //
  768. //
  769. //
  770. //
  771. //
  772. //
  773. //
  774. //
  775. //
  776. //
  777. //
  778. //
  779. //
  780. //
  781. //
  782. //
  783. //
  784. //
  785. //
  786. //
  787. //
  788. //
  789. //
  790. //
  791. //
  792. //
  793. //
  794. //
  795. //
  796. //
  797. //
  798. //
  799. //
  800. //
  801. //
  802. //
  803. //
  804. //
  805. //
  806. //
  807. //
  808. //
  809. //
  810. //
  811. //
  812. //
  813. //
  814. //
  815. //
  816. //
  817. //
  818. //
  819. //
  820. //
  821. //
  822. //
  823. //
  824. //
  825. //
  826. //
  827. //
  828. //
  829. //
  830. //
  831. //
  832. //
  833. //
  834. //
  835. //
  836. //
  837. //
  838. //
  839. //
  840. //
  841. //
  842. //
  843. //
  844. //
  845. //
  846. //
  847. //
  848. //
  849. //
  850. //
  851. //
  852. //
  853. //
  854. //
  855. //
  856. //
  857. //
  858. //
  859. //
  860. //
  861. //
  862. //
  863. //
  864. //
  865. //
  866. //
  867. //
  868. //
  869. //
  870. //
  871. //
  872. //
  873. //
  874. //
  875. //
  876. //
  877. //
  878. //
  879. //
  880. //
  881. //
  882. //
  883. //
  884. //
  885. //
  886. //
  887. //
  888. //
  889. //
  890. //
  891. //
  892. //
  893. //
  894. //
  895. //
  896. //
  897. //
  898. //
  899. //
  900. //
  901. //
  902. //
  903. //
  904. /* harmony default export */ __webpack_exports__["default"] = ({
  905. components: { WDrawer: __WEBPACK_IMPORTED_MODULE_4__components_iview_WDrawer___default.a, BookUsers: __WEBPACK_IMPORTED_MODULE_3__components_docs_users___default.a, BookSetting: __WEBPACK_IMPORTED_MODULE_2__components_docs_setting___default.a, NestedDraggable: __WEBPACK_IMPORTED_MODULE_1__components_docs_NestedDraggable___default.a, WContent: __WEBPACK_IMPORTED_MODULE_0__components_WContent___default.a },
  906. data: function data() {
  907. return {
  908. loadIng: 0,
  909. bookLists: [],
  910. bookListPage: 1,
  911. bookListTotal: 0,
  912. bookLoading: false,
  913. bookHasMorePages: false,
  914. bookNoDataText: "",
  915. addBookId: 0,
  916. addBookShow: false,
  917. formBookAdd: {
  918. title: ''
  919. },
  920. ruleBookAdd: {},
  921. selectBookData: {},
  922. sectionLists: [],
  923. sectionNoDataText: "",
  924. addSectionId: 0,
  925. addSectionShow: false,
  926. formSectionAdd: {
  927. title: '',
  928. type: 'document'
  929. },
  930. ruleSectionAdd: {},
  931. sectionTypeLists: [],
  932. sortDisabled: false,
  933. settingDrawerShow: false,
  934. settingDrawerTab: 'setting'
  935. };
  936. },
  937. mounted: function mounted() {
  938. this.getBookLists(true);
  939. },
  940. deactivated: function deactivated() {
  941. this.addBookShow = false;
  942. this.addSectionShow = false;
  943. },
  944. computed: {},
  945. watch: {
  946. usrName: function usrName() {
  947. this.usrLogin && this.getBookLists(true);
  948. },
  949. addBookShow: function addBookShow(val) {
  950. var _this = this;
  951. if (val && this.addBookId > 0) {
  952. var tempLists = this.bookLists.filter(function (res) {
  953. return res.id == _this.addBookId;
  954. });
  955. if (tempLists.length === 1) {
  956. this.$set(this.formBookAdd, 'title', tempLists[0].title);
  957. } else {
  958. this.$set(this.formBookAdd, 'title', '');
  959. }
  960. }
  961. },
  962. addSectionShow: function addSectionShow(val) {
  963. var _this2 = this;
  964. if (val && this.addSectionId > 0) {
  965. var tempLists = this.children2lists(this.sectionLists).filter(function (res) {
  966. return res.id == _this2.addSectionId;
  967. });
  968. if (tempLists.length === 1) {
  969. this.$set(this.formSectionAdd, 'title', tempLists[0].title);
  970. } else {
  971. this.$set(this.formSectionAdd, 'title', '');
  972. }
  973. }
  974. }
  975. },
  976. methods: {
  977. initLanguage: function initLanguage() {
  978. this.bookNoDataText = this.$L("数据加载中.....");
  979. this.sectionNoDataText = this.$L("数据加载中.....");
  980. 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("目录") }];
  981. this.ruleBookAdd = {
  982. title: [{ required: true, message: this.$L('请填写知识库名称!'), trigger: 'change' }, { type: 'string', min: 2, message: this.$L('知识库名称长度至少2位!'), trigger: 'change' }]
  983. };
  984. this.ruleSectionAdd = {
  985. title: [{ required: true, message: this.$L('请填写文档标题!'), trigger: 'change' }, { type: 'string', min: 2, message: this.$L('文档标题长度至少2位!'), trigger: 'change' }],
  986. type: [{ required: true }]
  987. };
  988. },
  989. children2lists: function children2lists(lists) {
  990. var _this3 = this;
  991. var array = [];
  992. lists.forEach(function (item) {
  993. array.push({
  994. id: item.id,
  995. title: item.title
  996. });
  997. array = array.concat(_this3.children2lists(item.children));
  998. });
  999. return array;
  1000. },
  1001. getBookLists: function getBookLists(resetLoad) {
  1002. var _this4 = this;
  1003. if (resetLoad === true) {
  1004. this.bookListPage = 1;
  1005. } else {
  1006. if (this.bookHasMorePages === false) {
  1007. return;
  1008. }
  1009. this.bookListPage++;
  1010. }
  1011. this.bookLoading = true;
  1012. this.bookNoDataText = this.$L("数据加载中.....");
  1013. this.bookHasMorePages = false;
  1014. $A.apiAjax({
  1015. url: 'docs/book/lists',
  1016. data: {
  1017. page: Math.max(this.bookListPage, 1),
  1018. pagesize: 20
  1019. },
  1020. complete: function complete() {
  1021. _this4.bookLoading = false;
  1022. },
  1023. error: function error() {
  1024. _this4.bookNoDataText = _this4.$L("数据加载失败!");
  1025. },
  1026. success: function success(res) {
  1027. if (res.ret === 1) {
  1028. res.data.lists.forEach(function (item) {
  1029. var find = _this4.bookLists.find(function (t) {
  1030. return t.id == item.id;
  1031. });
  1032. if (!find) {
  1033. _this4.bookLists.push(item);
  1034. }
  1035. });
  1036. _this4.bookListTotal = res.data.total;
  1037. _this4.bookNoDataText = _this4.$L("没有相关的数据");
  1038. _this4.bookHasMorePages = res.data.hasMorePages;
  1039. if (typeof _this4.selectBookData.id === "undefined") {
  1040. _this4.selectBookData = _this4.bookLists[0];
  1041. _this4.getSectionLists();
  1042. }
  1043. } else {
  1044. _this4.bookLists = [];
  1045. _this4.bookListTotal = 0;
  1046. _this4.bookNoDataText = res.msg;
  1047. }
  1048. }
  1049. });
  1050. },
  1051. onBookAdd: function onBookAdd() {
  1052. var _this5 = this;
  1053. this.$refs.bookAdd.validate(function (valid) {
  1054. if (valid) {
  1055. _this5.loadIng++;
  1056. $A.apiAjax({
  1057. url: 'docs/book/add',
  1058. data: Object.assign(_this5.formBookAdd, { id: _this5.addBookId }),
  1059. complete: function complete() {
  1060. _this5.loadIng--;
  1061. },
  1062. success: function success(res) {
  1063. if (res.ret === 1) {
  1064. _this5.addBookShow = false;
  1065. _this5.$Message.success(res.msg);
  1066. _this5.$refs.bookAdd.resetFields();
  1067. //
  1068. if (_this5.addBookId > 0) {
  1069. _this5.bookLists.some(function (item) {
  1070. if (item.id == _this5.addBookId) {
  1071. _this5.$set(item, 'title', res.data.title);
  1072. return true;
  1073. }
  1074. });
  1075. } else {
  1076. _this5.bookLists.unshift(res.data);
  1077. _this5.selectBookData = _this5.bookLists[0];
  1078. _this5.getSectionLists();
  1079. }
  1080. } else {
  1081. _this5.$Modal.error({ title: _this5.$L('温馨提示'), content: res.msg });
  1082. }
  1083. }
  1084. });
  1085. }
  1086. });
  1087. },
  1088. onBookDelete: function onBookDelete(bookId) {
  1089. var _this6 = this;
  1090. this.$Modal.confirm({
  1091. title: this.$L('删除知识库'),
  1092. content: this.$L('你确定要删除此知识库吗?'),
  1093. loading: true,
  1094. onOk: function onOk() {
  1095. $A.apiAjax({
  1096. url: 'docs/book/delete',
  1097. data: {
  1098. id: bookId
  1099. },
  1100. error: function error() {
  1101. _this6.$Modal.remove();
  1102. alert(_this6.$L('网络繁忙,请稍后再试!'));
  1103. },
  1104. success: function success(res) {
  1105. _this6.$Modal.remove();
  1106. _this6.bookLists.some(function (item, index) {
  1107. if (item.id == bookId) {
  1108. _this6.bookLists.splice(index, 1);
  1109. return true;
  1110. }
  1111. });
  1112. _this6.selectBookData = _this6.bookLists.length > 0 ? _this6.bookLists[0] : {};
  1113. _this6.getSectionLists();
  1114. //
  1115. setTimeout(function () {
  1116. if (res.ret === 1) {
  1117. _this6.$Message.success(res.msg);
  1118. } else {
  1119. _this6.$Modal.error({ title: _this6.$L('温馨提示'), content: res.msg });
  1120. }
  1121. }, 350);
  1122. }
  1123. });
  1124. }
  1125. });
  1126. },
  1127. getSectionLists: function getSectionLists(isClear) {
  1128. var _this7 = this;
  1129. if (isClear === true) {
  1130. this.sectionLists = [];
  1131. }
  1132. var bookid = this.selectBookData.id;
  1133. this.loadIng++;
  1134. this.sectionNoDataText = this.$L("数据加载中.....");
  1135. $A.apiAjax({
  1136. url: 'docs/section/lists',
  1137. data: {
  1138. act: 'edit',
  1139. bookid: bookid
  1140. },
  1141. complete: function complete() {
  1142. _this7.loadIng--;
  1143. },
  1144. error: function error() {
  1145. if (bookid != _this7.selectBookData.id) {
  1146. return;
  1147. }
  1148. _this7.sectionNoDataText = _this7.$L("数据加载失败!");
  1149. },
  1150. success: function success(res) {
  1151. if (bookid != _this7.selectBookData.id) {
  1152. return;
  1153. }
  1154. if (res.ret === 1) {
  1155. _this7.sectionLists = res.data.tree;
  1156. _this7.sectionNoDataText = _this7.$L("没有相关的数据");
  1157. } else {
  1158. _this7.sectionLists = [];
  1159. _this7.sectionNoDataText = res.msg;
  1160. }
  1161. }
  1162. });
  1163. },
  1164. onSectionAdd: function onSectionAdd() {
  1165. var _this8 = this;
  1166. this.$refs.sectionAdd.validate(function (valid) {
  1167. if (valid) {
  1168. _this8.loadIng++;
  1169. var bookid = _this8.selectBookData.id;
  1170. $A.apiAjax({
  1171. url: 'docs/section/add',
  1172. data: Object.assign(_this8.formSectionAdd, {
  1173. id: _this8.addSectionId,
  1174. bookid: bookid
  1175. }),
  1176. complete: function complete() {
  1177. _this8.loadIng--;
  1178. },
  1179. success: function success(res) {
  1180. if (bookid != _this8.selectBookData.id) {
  1181. return;
  1182. }
  1183. if (res.ret === 1) {
  1184. _this8.addSectionShow = false;
  1185. _this8.$Message.success(res.msg);
  1186. _this8.$refs.sectionAdd.resetFields();
  1187. //
  1188. _this8.getSectionLists();
  1189. } else {
  1190. _this8.$Modal.error({ title: _this8.$L('温馨提示'), content: res.msg });
  1191. }
  1192. }
  1193. });
  1194. }
  1195. });
  1196. },
  1197. onSectionDelete: function onSectionDelete(detail) {
  1198. var _this9 = this;
  1199. var sectionType = this.sectionTypeLists.find(function (item) {
  1200. return item.value == detail.type;
  1201. });
  1202. this.$Modal.confirm({
  1203. title: this.$L('删除文档'),
  1204. content: this.$L('你确定要删除%【%】吗?', sectionType ? sectionType.text : '', detail.title),
  1205. loading: true,
  1206. onOk: function onOk() {
  1207. $A.apiAjax({
  1208. url: 'docs/section/delete',
  1209. data: {
  1210. id: detail.id
  1211. },
  1212. error: function error() {
  1213. _this9.$Modal.remove();
  1214. alert(_this9.$L('网络繁忙,请稍后再试!'));
  1215. },
  1216. success: function success(res) {
  1217. _this9.$Modal.remove();
  1218. _this9.getSectionLists();
  1219. //
  1220. setTimeout(function () {
  1221. if (res.ret === 1) {
  1222. _this9.$Message.success(res.msg);
  1223. } else {
  1224. _this9.$Modal.error({ title: _this9.$L('温馨提示'), content: res.msg });
  1225. }
  1226. }, 350);
  1227. }
  1228. });
  1229. }
  1230. });
  1231. },
  1232. handleSection: function handleSection(act, detail) {
  1233. var _this10 = this;
  1234. switch (act) {
  1235. case 'open':
  1236. this.goForward({ name: 'docs-edit', params: { sid: detail.id, other: detail || {} } });
  1237. break;
  1238. case 'edit':
  1239. this.addSectionId = detail.id;
  1240. this.addSectionShow = true;
  1241. break;
  1242. case 'add':
  1243. this.addSectionId = detail.id * -1;
  1244. this.addSectionShow = true;
  1245. break;
  1246. case 'delete':
  1247. if (this.sortDisabled) {
  1248. this.$Modal.warning({
  1249. title: this.$L('温馨提示'),
  1250. content: this.$L('正在进行其他操作,请稍后重试...')
  1251. });
  1252. return;
  1253. }
  1254. this.onSectionDelete(detail);
  1255. break;
  1256. case 'sort':
  1257. this.sortDisabled = true;
  1258. this.loadIng++;
  1259. $A.apiAjax({
  1260. url: 'docs/section/sort',
  1261. data: {
  1262. bookid: this.selectBookData.id,
  1263. newsort: detail
  1264. },
  1265. complete: function complete() {
  1266. _this10.sortDisabled = false;
  1267. _this10.loadIng--;
  1268. },
  1269. error: function error() {
  1270. _this10.getSectionLists();
  1271. alert(_this10.$L('网络繁忙,请稍后再试!'));
  1272. },
  1273. success: function success(res) {
  1274. if (res.ret === 1) {
  1275. _this10.$Message.success(res.msg);
  1276. } else {
  1277. _this10.getSectionLists();
  1278. _this10.$Modal.error({ title: _this10.$L('温馨提示'), content: res.msg });
  1279. }
  1280. }
  1281. });
  1282. break;
  1283. }
  1284. },
  1285. showShare: function showShare() {
  1286. var _this11 = this;
  1287. this.$Modal.confirm({
  1288. render: function render(h) {
  1289. return h('div', [h('div', {
  1290. style: {
  1291. fontSize: '16px',
  1292. fontWeight: '500',
  1293. marginBottom: '20px'
  1294. }
  1295. }, _this11.$L('文档链接')), h('Input', {
  1296. props: {
  1297. value: $A.webUrl('docs/view/b' + _this11.selectBookData.id),
  1298. readonly: true
  1299. }
  1300. })]);
  1301. }
  1302. });
  1303. },
  1304. settingCallback: function settingCallback(data) {
  1305. var _this12 = this;
  1306. var tmpData = this.bookLists.find(function (_ref) {
  1307. var id = _ref.id;
  1308. return id == data.id;
  1309. });
  1310. if (tmpData) {
  1311. $A.each(data, function (key, val) {
  1312. _this12.$set(tmpData, key, val);
  1313. });
  1314. }
  1315. }
  1316. }
  1317. });
  1318. /***/ }),
  1319. /***/ 846:
  1320. /***/ (function(module, exports, __webpack_require__) {
  1321. var disposed = false
  1322. function injectStyle (ssrContext) {
  1323. if (disposed) return
  1324. __webpack_require__(847)
  1325. }
  1326. var normalizeComponent = __webpack_require__(2)
  1327. /* script */
  1328. var __vue_script__ = __webpack_require__(849)
  1329. /* template */
  1330. var __vue_template__ = __webpack_require__(850)
  1331. /* template functional */
  1332. var __vue_template_functional__ = false
  1333. /* styles */
  1334. var __vue_styles__ = injectStyle
  1335. /* scopeId */
  1336. var __vue_scopeId__ = "data-v-b2d13f9e"
  1337. /* moduleIdentifier (server only) */
  1338. var __vue_module_identifier__ = null
  1339. var Component = normalizeComponent(
  1340. __vue_script__,
  1341. __vue_template__,
  1342. __vue_template_functional__,
  1343. __vue_styles__,
  1344. __vue_scopeId__,
  1345. __vue_module_identifier__
  1346. )
  1347. Component.options.__file = "resources/assets/js/main/components/docs/setting.vue"
  1348. /* hot reload */
  1349. if (false) {(function () {
  1350. var hotAPI = require("vue-hot-reload-api")
  1351. hotAPI.install(require("vue"), false)
  1352. if (!hotAPI.compatible) return
  1353. module.hot.accept()
  1354. if (!module.hot.data) {
  1355. hotAPI.createRecord("data-v-b2d13f9e", Component.options)
  1356. } else {
  1357. hotAPI.reload("data-v-b2d13f9e", Component.options)
  1358. }
  1359. module.hot.dispose(function (data) {
  1360. disposed = true
  1361. })
  1362. })()}
  1363. module.exports = Component.exports
  1364. /***/ }),
  1365. /***/ 847:
  1366. /***/ (function(module, exports, __webpack_require__) {
  1367. // style-loader: Adds some css to the DOM by adding a <style> tag
  1368. // load the styles
  1369. var content = __webpack_require__(848);
  1370. if(typeof content === 'string') content = [[module.i, content, '']];
  1371. if(content.locals) module.exports = content.locals;
  1372. // add the styles to the DOM
  1373. var update = __webpack_require__(1)("94f30462", content, false, {});
  1374. // Hot Module Replacement
  1375. if(false) {
  1376. // When the styles change, update the <style> tags
  1377. if(!content.locals) {
  1378. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-b2d13f9e\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./setting.vue", function() {
  1379. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-b2d13f9e\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./setting.vue");
  1380. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  1381. update(newContent);
  1382. });
  1383. }
  1384. // When the module is disposed, remove the <style> tags
  1385. module.hot.dispose(function() { update(); });
  1386. }
  1387. /***/ }),
  1388. /***/ 848:
  1389. /***/ (function(module, exports, __webpack_require__) {
  1390. exports = module.exports = __webpack_require__(0)(false);
  1391. // imports
  1392. // module
  1393. exports.push([module.i, "\n.book-setting[data-v-b2d13f9e] {\n padding: 0 12px;\n}\n.book-setting .form-title[data-v-b2d13f9e] {\n font-weight: bold;\n}\n.book-setting .form-link[data-v-b2d13f9e] {\n text-decoration: underline;\n}\n.book-setting .form-placeholder[data-v-b2d13f9e] {\n font-size: 12px;\n color: #999999;\n}\n.book-setting .form-placeholder[data-v-b2d13f9e]:hover {\n color: #000000;\n}\n", ""]);
  1394. // exports
  1395. /***/ }),
  1396. /***/ 849:
  1397. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1398. "use strict";
  1399. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  1400. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__ = __webpack_require__(7);
  1401. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__);
  1402. //
  1403. //
  1404. //
  1405. //
  1406. //
  1407. //
  1408. //
  1409. //
  1410. //
  1411. //
  1412. //
  1413. //
  1414. //
  1415. //
  1416. //
  1417. //
  1418. //
  1419. //
  1420. //
  1421. //
  1422. //
  1423. //
  1424. //
  1425. //
  1426. //
  1427. //
  1428. //
  1429. //
  1430. //
  1431. //
  1432. //
  1433. //
  1434. //
  1435. //
  1436. //
  1437. //
  1438. //
  1439. //
  1440. //
  1441. //
  1442. //
  1443. //
  1444. //
  1445. //
  1446. //
  1447. //
  1448. //
  1449. //
  1450. //
  1451. //
  1452. //
  1453. //
  1454. //
  1455. //
  1456. //
  1457. //
  1458. //
  1459. //
  1460. //
  1461. //
  1462. //
  1463. //
  1464. //
  1465. //
  1466. //
  1467. //
  1468. //
  1469. //
  1470. //
  1471. //
  1472. //
  1473. //
  1474. //
  1475. //
  1476. //
  1477. //
  1478. //
  1479. //
  1480. //
  1481. //
  1482. //
  1483. //
  1484. //
  1485. //
  1486. //
  1487. //
  1488. //
  1489. //
  1490. //
  1491. //
  1492. //
  1493. //
  1494. //
  1495. //
  1496. //
  1497. //
  1498. //
  1499. //
  1500. //
  1501. //
  1502. //
  1503. //
  1504. //
  1505. //
  1506. //
  1507. //
  1508. //
  1509. //
  1510. //
  1511. //
  1512. //
  1513. //
  1514. //
  1515. //
  1516. //
  1517. //
  1518. //
  1519. //
  1520. //
  1521. //
  1522. /* harmony default export */ __webpack_exports__["default"] = ({
  1523. name: 'BookSetting',
  1524. components: { DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default.a },
  1525. props: {
  1526. id: {
  1527. default: 0
  1528. },
  1529. canload: {
  1530. type: Boolean,
  1531. default: true
  1532. }
  1533. },
  1534. data: function data() {
  1535. return {
  1536. loadYet: false,
  1537. loadIng: 0,
  1538. formSystem: {}
  1539. };
  1540. },
  1541. mounted: function mounted() {
  1542. if (this.canload) {
  1543. this.loadYet = true;
  1544. this.getSetting();
  1545. }
  1546. },
  1547. watch: {
  1548. id: function id() {
  1549. if (this.loadYet) {
  1550. this.getSetting();
  1551. }
  1552. },
  1553. canload: function canload(val) {
  1554. if (val && !this.loadYet) {
  1555. this.loadYet = true;
  1556. this.getSetting();
  1557. }
  1558. }
  1559. },
  1560. methods: {
  1561. getSetting: function getSetting(save) {
  1562. var _this = this;
  1563. this.loadIng++;
  1564. $A.apiAjax({
  1565. url: 'docs/book/setting?type=' + (save ? 'save' : 'get'),
  1566. data: Object.assign(this.formSystem, {
  1567. id: this.id
  1568. }),
  1569. complete: function complete() {
  1570. _this.loadIng--;
  1571. },
  1572. success: function success(res) {
  1573. if (res.ret === 1) {
  1574. var data = res.data;
  1575. data.role_edit = data.role_edit || 'reg';
  1576. data.role_look = data.role_look || 'edit';
  1577. data.role_view = data.role_view || 'all';
  1578. _this.formSystem = data;
  1579. _this.formSystem__reset = $A.cloneData(_this.formSystem);
  1580. if (save) {
  1581. _this.$emit('on-setting-callback', Object.assign(data, {
  1582. id: _this.id
  1583. }));
  1584. _this.$Message.success(_this.$L('修改成功'));
  1585. }
  1586. } else {
  1587. if (save) {
  1588. _this.$Modal.error({ title: _this.$L('温馨提示'), content: res.msg });
  1589. }
  1590. }
  1591. }
  1592. });
  1593. },
  1594. handleSubmit: function handleSubmit(name) {
  1595. var _this2 = this;
  1596. this.$refs[name].validate(function (valid) {
  1597. if (valid) {
  1598. switch (name) {
  1599. case "formSystem":
  1600. {
  1601. _this2.getSetting(true);
  1602. break;
  1603. }
  1604. }
  1605. }
  1606. });
  1607. },
  1608. handleReset: function handleReset(name) {
  1609. if (typeof this[name + '__reset'] !== "undefined") {
  1610. this[name] = $A.cloneData(this[name + '__reset']);
  1611. return;
  1612. }
  1613. this.$refs[name].resetFields();
  1614. }
  1615. }
  1616. });
  1617. /***/ }),
  1618. /***/ 850:
  1619. /***/ (function(module, exports, __webpack_require__) {
  1620. var render = function() {
  1621. var _vm = this
  1622. var _h = _vm.$createElement
  1623. var _c = _vm._self._c || _h
  1624. return _c("drawer-tabs-container", [
  1625. _c(
  1626. "div",
  1627. { staticClass: "book-setting" },
  1628. [
  1629. _c(
  1630. "Form",
  1631. {
  1632. ref: "formSystem",
  1633. attrs: { model: _vm.formSystem, "label-width": 80 },
  1634. nativeOn: {
  1635. submit: function($event) {
  1636. $event.preventDefault()
  1637. }
  1638. }
  1639. },
  1640. [
  1641. _c("FormItem", { attrs: { label: _vm.$L("文档链接") } }, [
  1642. _c(
  1643. "a",
  1644. {
  1645. staticClass: "form-link",
  1646. attrs: {
  1647. target: "_blank",
  1648. href: _vm.$A.webUrl("docs/view/b" + this.id)
  1649. }
  1650. },
  1651. [_vm._v(_vm._s(_vm.$A.webUrl("docs/view/b" + this.id)))]
  1652. )
  1653. ]),
  1654. _vm._v(" "),
  1655. _c("FormItem", { attrs: { label: _vm.$L("管理权限") } }, [
  1656. _c("div", [
  1657. _c(
  1658. "div",
  1659. [
  1660. _c(
  1661. "RadioGroup",
  1662. {
  1663. model: {
  1664. value: _vm.formSystem.role_edit,
  1665. callback: function($$v) {
  1666. _vm.$set(_vm.formSystem, "role_edit", $$v)
  1667. },
  1668. expression: "formSystem.role_edit"
  1669. }
  1670. },
  1671. [
  1672. _c("Radio", { attrs: { label: "private" } }, [
  1673. _vm._v(_vm._s(_vm.$L("私有文库")))
  1674. ]),
  1675. _vm._v(" "),
  1676. _c("Radio", { attrs: { label: "member" } }, [
  1677. _vm._v(_vm._s(_vm.$L("成员开放")))
  1678. ]),
  1679. _vm._v(" "),
  1680. _c("Radio", { attrs: { label: "reg" } }, [
  1681. _vm._v(_vm._s(_vm.$L("注册会员")))
  1682. ])
  1683. ],
  1684. 1
  1685. )
  1686. ],
  1687. 1
  1688. ),
  1689. _vm._v(" "),
  1690. _vm.formSystem.role_edit == "private"
  1691. ? _c("div", { staticClass: "form-placeholder" }, [
  1692. _vm._v(
  1693. "\n " +
  1694. _vm._s(_vm.$L("仅作者可以修改。")) +
  1695. "\n "
  1696. )
  1697. ])
  1698. : _vm.formSystem.role_edit == "member"
  1699. ? _c("div", { staticClass: "form-placeholder" }, [
  1700. _vm._v(
  1701. "\n " +
  1702. _vm._s(_vm.$L("仅作者和文档成员可以修改。")) +
  1703. "\n "
  1704. )
  1705. ])
  1706. : _vm.formSystem.role_edit == "reg"
  1707. ? _c("div", { staticClass: "form-placeholder" }, [
  1708. _vm._v(
  1709. "\n " +
  1710. _vm._s(_vm.$L("所有会员都可以修改。")) +
  1711. "\n "
  1712. )
  1713. ])
  1714. : _vm._e()
  1715. ])
  1716. ]),
  1717. _vm._v(" "),
  1718. _c("FormItem", { attrs: { label: _vm.$L("阅读权限") } }, [
  1719. _c(
  1720. "div",
  1721. [
  1722. _c(
  1723. "RadioGroup",
  1724. {
  1725. model: {
  1726. value: _vm.formSystem.role_view,
  1727. callback: function($$v) {
  1728. _vm.$set(_vm.formSystem, "role_view", $$v)
  1729. },
  1730. expression: "formSystem.role_view"
  1731. }
  1732. },
  1733. [
  1734. _c("Radio", { attrs: { label: "private" } }, [
  1735. _vm._v(_vm._s(_vm.$L("私有文库")))
  1736. ]),
  1737. _vm._v(" "),
  1738. _c("Radio", { attrs: { label: "member" } }, [
  1739. _vm._v(_vm._s(_vm.$L("成员开放")))
  1740. ]),
  1741. _vm._v(" "),
  1742. _c("Radio", { attrs: { label: "reg" } }, [
  1743. _vm._v(_vm._s(_vm.$L("注册会员")))
  1744. ]),
  1745. _vm._v(" "),
  1746. _c("Radio", { attrs: { label: "all" } }, [
  1747. _vm._v(_vm._s(_vm.$L("完全开放")))
  1748. ])
  1749. ],
  1750. 1
  1751. )
  1752. ],
  1753. 1
  1754. ),
  1755. _vm._v(" "),
  1756. _vm.formSystem.role_view == "private"
  1757. ? _c("div", { staticClass: "form-placeholder" }, [
  1758. _vm._v(
  1759. "\n " +
  1760. _vm._s(_vm.$L("仅作者可以阅读分享地址。")) +
  1761. "\n "
  1762. )
  1763. ])
  1764. : _vm.formSystem.role_view == "member"
  1765. ? _c("div", { staticClass: "form-placeholder" }, [
  1766. _vm._v(
  1767. "\n " +
  1768. _vm._s(_vm.$L("仅作者和文档成员可以阅读分享地址。")) +
  1769. "\n "
  1770. )
  1771. ])
  1772. : _vm.formSystem.role_view == "reg"
  1773. ? _c("div", { staticClass: "form-placeholder" }, [
  1774. _vm._v(
  1775. "\n " +
  1776. _vm._s(_vm.$L("所有会员都可以阅读分享地址。")) +
  1777. "\n "
  1778. )
  1779. ])
  1780. : _vm.formSystem.role_view == "all"
  1781. ? _c("div", { staticClass: "form-placeholder" }, [
  1782. _vm._v(
  1783. "\n " +
  1784. _vm._s(_vm.$L("所有人(含游客)都可以阅读分享地址。")) +
  1785. "\n "
  1786. )
  1787. ])
  1788. : _vm._e()
  1789. ]),
  1790. _vm._v(" "),
  1791. _c(
  1792. "FormItem",
  1793. [
  1794. _c(
  1795. "Button",
  1796. {
  1797. attrs: { loading: _vm.loadIng > 0, type: "primary" },
  1798. on: {
  1799. click: function($event) {
  1800. return _vm.handleSubmit("formSystem")
  1801. }
  1802. }
  1803. },
  1804. [_vm._v(_vm._s(_vm.$L("提交")))]
  1805. ),
  1806. _vm._v(" "),
  1807. _c(
  1808. "Button",
  1809. {
  1810. staticStyle: { "margin-left": "8px" },
  1811. attrs: { loading: _vm.loadIng > 0 },
  1812. on: {
  1813. click: function($event) {
  1814. return _vm.handleReset("formSystem")
  1815. }
  1816. }
  1817. },
  1818. [_vm._v(_vm._s(_vm.$L("重置")))]
  1819. )
  1820. ],
  1821. 1
  1822. )
  1823. ],
  1824. 1
  1825. )
  1826. ],
  1827. 1
  1828. )
  1829. ])
  1830. }
  1831. var staticRenderFns = []
  1832. render._withStripped = true
  1833. module.exports = { render: render, staticRenderFns: staticRenderFns }
  1834. if (false) {
  1835. module.hot.accept()
  1836. if (module.hot.data) {
  1837. require("vue-hot-reload-api") .rerender("data-v-b2d13f9e", module.exports)
  1838. }
  1839. }
  1840. /***/ }),
  1841. /***/ 851:
  1842. /***/ (function(module, exports, __webpack_require__) {
  1843. var disposed = false
  1844. function injectStyle (ssrContext) {
  1845. if (disposed) return
  1846. __webpack_require__(852)
  1847. }
  1848. var normalizeComponent = __webpack_require__(2)
  1849. /* script */
  1850. var __vue_script__ = __webpack_require__(854)
  1851. /* template */
  1852. var __vue_template__ = __webpack_require__(855)
  1853. /* template functional */
  1854. var __vue_template_functional__ = false
  1855. /* styles */
  1856. var __vue_styles__ = injectStyle
  1857. /* scopeId */
  1858. var __vue_scopeId__ = "data-v-df98fbae"
  1859. /* moduleIdentifier (server only) */
  1860. var __vue_module_identifier__ = null
  1861. var Component = normalizeComponent(
  1862. __vue_script__,
  1863. __vue_template__,
  1864. __vue_template_functional__,
  1865. __vue_styles__,
  1866. __vue_scopeId__,
  1867. __vue_module_identifier__
  1868. )
  1869. Component.options.__file = "resources/assets/js/main/components/docs/users.vue"
  1870. /* hot reload */
  1871. if (false) {(function () {
  1872. var hotAPI = require("vue-hot-reload-api")
  1873. hotAPI.install(require("vue"), false)
  1874. if (!hotAPI.compatible) return
  1875. module.hot.accept()
  1876. if (!module.hot.data) {
  1877. hotAPI.createRecord("data-v-df98fbae", Component.options)
  1878. } else {
  1879. hotAPI.reload("data-v-df98fbae", Component.options)
  1880. }
  1881. module.hot.dispose(function (data) {
  1882. disposed = true
  1883. })
  1884. })()}
  1885. module.exports = Component.exports
  1886. /***/ }),
  1887. /***/ 852:
  1888. /***/ (function(module, exports, __webpack_require__) {
  1889. // style-loader: Adds some css to the DOM by adding a <style> tag
  1890. // load the styles
  1891. var content = __webpack_require__(853);
  1892. if(typeof content === 'string') content = [[module.i, content, '']];
  1893. if(content.locals) module.exports = content.locals;
  1894. // add the styles to the DOM
  1895. var update = __webpack_require__(1)("136d5f94", content, false, {});
  1896. // Hot Module Replacement
  1897. if(false) {
  1898. // When the styles change, update the <style> tags
  1899. if(!content.locals) {
  1900. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-df98fbae\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./users.vue", function() {
  1901. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-df98fbae\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./users.vue");
  1902. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  1903. update(newContent);
  1904. });
  1905. }
  1906. // When the module is disposed, remove the <style> tags
  1907. module.hot.dispose(function() { update(); });
  1908. }
  1909. /***/ }),
  1910. /***/ 853:
  1911. /***/ (function(module, exports, __webpack_require__) {
  1912. exports = module.exports = __webpack_require__(0)(false);
  1913. // imports
  1914. // module
  1915. exports.push([module.i, "\n.book-users[data-v-df98fbae] {\n padding: 0 12px;\n}\n.book-users .tableFill[data-v-df98fbae] {\n margin: 12px 0 20px;\n}\n", ""]);
  1916. // exports
  1917. /***/ }),
  1918. /***/ 854:
  1919. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1920. "use strict";
  1921. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  1922. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__ = __webpack_require__(7);
  1923. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__);
  1924. //
  1925. //
  1926. //
  1927. //
  1928. //
  1929. //
  1930. //
  1931. //
  1932. //
  1933. //
  1934. //
  1935. //
  1936. //
  1937. //
  1938. //
  1939. //
  1940. //
  1941. //
  1942. //
  1943. //
  1944. //
  1945. /* harmony default export */ __webpack_exports__["default"] = ({
  1946. name: 'BookUsers',
  1947. components: { DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default.a },
  1948. props: {
  1949. id: {
  1950. default: 0
  1951. },
  1952. canload: {
  1953. type: Boolean,
  1954. default: true
  1955. }
  1956. },
  1957. data: function data() {
  1958. return {
  1959. loadYet: false,
  1960. loadIng: 0,
  1961. columns: [],
  1962. lists: [],
  1963. listPage: 1,
  1964. listTotal: 0,
  1965. noDataText: ""
  1966. };
  1967. },
  1968. mounted: function mounted() {
  1969. if (this.canload) {
  1970. this.loadYet = true;
  1971. this.getLists(true);
  1972. }
  1973. },
  1974. watch: {
  1975. id: function id() {
  1976. if (this.loadYet) {
  1977. this.getLists(true);
  1978. }
  1979. },
  1980. canload: function canload(val) {
  1981. if (val && !this.loadYet) {
  1982. this.loadYet = true;
  1983. this.getLists(true);
  1984. }
  1985. }
  1986. },
  1987. methods: {
  1988. initLanguage: function initLanguage() {
  1989. var _this = this;
  1990. this.noDataText = this.$L("数据加载中.....");
  1991. this.columns = [{
  1992. "title": this.$L("头像"),
  1993. "minWidth": 60,
  1994. "maxWidth": 100,
  1995. render: function render(h, params) {
  1996. return h('UserImg', {
  1997. props: {
  1998. info: params.row
  1999. },
  2000. style: {
  2001. width: "30px",
  2002. height: "30px",
  2003. fontSize: "16px",
  2004. lineHeight: "30px",
  2005. borderRadius: "15px",
  2006. verticalAlign: "middle"
  2007. }
  2008. });
  2009. }
  2010. }, {
  2011. "title": this.$L("用户名"),
  2012. "key": 'username',
  2013. "minWidth": 80,
  2014. "ellipsis": true
  2015. }, {
  2016. "title": this.$L("昵称"),
  2017. "minWidth": 80,
  2018. "ellipsis": true,
  2019. render: function render(h, params) {
  2020. return h('span', params.row.nickname || '-');
  2021. }
  2022. }, {
  2023. "title": this.$L("职位/职称"),
  2024. "minWidth": 100,
  2025. "ellipsis": true,
  2026. render: function render(h, params) {
  2027. return h('span', params.row.profession || '-');
  2028. }
  2029. }, {
  2030. "title": this.$L("加入时间"),
  2031. "width": 160,
  2032. render: function render(h, params) {
  2033. return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
  2034. }
  2035. }, {
  2036. "title": this.$L("操作"),
  2037. "key": 'action',
  2038. "width": 80,
  2039. "align": 'center',
  2040. render: function render(h, params) {
  2041. return h('Button', {
  2042. props: {
  2043. type: 'primary',
  2044. size: 'small'
  2045. },
  2046. style: {
  2047. fontSize: '12px'
  2048. },
  2049. on: {
  2050. click: function click() {
  2051. _this.$Modal.confirm({
  2052. title: _this.$L('移出成员'),
  2053. content: _this.$L('你确定要将此成员移出项目吗?'),
  2054. loading: true,
  2055. onOk: function onOk() {
  2056. $A.apiAjax({
  2057. url: 'docs/users/join',
  2058. data: {
  2059. act: 'delete',
  2060. id: params.row.bookid,
  2061. username: params.row.username
  2062. },
  2063. error: function error() {
  2064. _this.$Modal.remove();
  2065. alert(_this.$L('网络繁忙,请稍后再试!'));
  2066. },
  2067. success: function success(res) {
  2068. _this.$Modal.remove();
  2069. _this.getLists();
  2070. setTimeout(function () {
  2071. if (res.ret === 1) {
  2072. _this.$Message.success(res.msg);
  2073. } else {
  2074. _this.$Modal.error({ title: _this.$L('温馨提示'), content: res.msg });
  2075. }
  2076. }, 350);
  2077. }
  2078. });
  2079. }
  2080. });
  2081. }
  2082. }
  2083. }, _this.$L('删除'));
  2084. }
  2085. }];
  2086. },
  2087. setPage: function setPage(page) {
  2088. this.listPage = page;
  2089. this.getLists();
  2090. },
  2091. setPageSize: function setPageSize(size) {
  2092. if (Math.max($A.runNum(this.listPageSize), 10) != size) {
  2093. this.listPageSize = size;
  2094. this.getLists();
  2095. }
  2096. },
  2097. getLists: function getLists(resetLoad) {
  2098. var _this2 = this;
  2099. if (resetLoad === true) {
  2100. this.listPage = 1;
  2101. }
  2102. if (this.id == 0) {
  2103. this.lists = [];
  2104. this.listTotal = 0;
  2105. this.noDataText = this.$L("没有相关的数据");
  2106. return;
  2107. }
  2108. this.loadIng++;
  2109. this.noDataText = this.$L("数据加载中.....");
  2110. $A.apiAjax({
  2111. url: 'docs/users/lists',
  2112. data: {
  2113. page: Math.max(this.listPage, 1),
  2114. pagesize: Math.max($A.runNum(this.listPageSize), 10),
  2115. id: this.id
  2116. },
  2117. complete: function complete() {
  2118. _this2.loadIng--;
  2119. },
  2120. error: function error() {
  2121. _this2.noDataText = _this2.$L("数据加载失败!");
  2122. },
  2123. success: function success(res) {
  2124. if (res.ret === 1) {
  2125. _this2.lists = res.data.lists;
  2126. _this2.listTotal = res.data.total;
  2127. _this2.noDataText = _this2.$L("没有相关的数据");
  2128. } else {
  2129. _this2.lists = [];
  2130. _this2.listTotal = 0;
  2131. _this2.noDataText = res.msg;
  2132. }
  2133. }
  2134. });
  2135. },
  2136. addUser: function addUser() {
  2137. var _this3 = this;
  2138. this.userValue = "";
  2139. this.$Modal.confirm({
  2140. render: function render(h) {
  2141. return h('div', [h('div', {
  2142. style: {
  2143. fontSize: '16px',
  2144. fontWeight: '500',
  2145. marginBottom: '20px'
  2146. }
  2147. }, _this3.$L('添加成员')), h('UserInput', {
  2148. props: {
  2149. value: _this3.userValue,
  2150. multiple: true,
  2151. nousername: _this3.usrName,
  2152. nobookid: _this3.id,
  2153. placeholder: _this3.$L('请输入昵称/用户名搜索')
  2154. },
  2155. on: {
  2156. input: function input(val) {
  2157. _this3.userValue = val;
  2158. }
  2159. }
  2160. })]);
  2161. },
  2162. loading: true,
  2163. onOk: function onOk() {
  2164. if (_this3.userValue) {
  2165. var username = _this3.userValue;
  2166. $A.apiAjax({
  2167. url: 'docs/users/join',
  2168. data: {
  2169. act: 'join',
  2170. id: _this3.id,
  2171. username: username
  2172. },
  2173. error: function error() {
  2174. _this3.$Modal.remove();
  2175. alert(_this3.$L('网络繁忙,请稍后再试!'));
  2176. },
  2177. success: function success(res) {
  2178. _this3.$Modal.remove();
  2179. _this3.getLists();
  2180. setTimeout(function () {
  2181. if (res.ret === 1) {
  2182. _this3.$Message.success(res.msg);
  2183. } else {
  2184. _this3.$Modal.error({ title: _this3.$L('温馨提示'), content: res.msg });
  2185. }
  2186. }, 350);
  2187. }
  2188. });
  2189. } else {
  2190. _this3.$Modal.remove();
  2191. }
  2192. }
  2193. });
  2194. }
  2195. }
  2196. });
  2197. /***/ }),
  2198. /***/ 855:
  2199. /***/ (function(module, exports, __webpack_require__) {
  2200. var render = function() {
  2201. var _vm = this
  2202. var _h = _vm.$createElement
  2203. var _c = _vm._self._c || _h
  2204. return _c("drawer-tabs-container", [
  2205. _c(
  2206. "div",
  2207. { staticClass: "book-users" },
  2208. [
  2209. _c(
  2210. "Button",
  2211. {
  2212. attrs: {
  2213. loading: _vm.loadIng > 0,
  2214. type: "primary",
  2215. icon: "md-add"
  2216. },
  2217. on: { click: _vm.addUser }
  2218. },
  2219. [_vm._v(_vm._s(_vm.$L("添加成员")))]
  2220. ),
  2221. _vm._v(" "),
  2222. _c("Table", {
  2223. ref: "tableRef",
  2224. staticClass: "tableFill",
  2225. attrs: {
  2226. columns: _vm.columns,
  2227. data: _vm.lists,
  2228. loading: _vm.loadIng > 0,
  2229. "no-data-text": _vm.noDataText,
  2230. stripe: ""
  2231. }
  2232. }),
  2233. _vm._v(" "),
  2234. _c("Page", {
  2235. staticClass: "pageBox",
  2236. attrs: {
  2237. total: _vm.listTotal,
  2238. current: _vm.listPage,
  2239. disabled: _vm.loadIng > 0,
  2240. "page-size-opts": [10, 20, 30, 50, 100],
  2241. placement: "top",
  2242. "show-elevator": "",
  2243. "show-sizer": "",
  2244. "show-total": "",
  2245. transfer: "",
  2246. simple: _vm.windowMax768
  2247. },
  2248. on: {
  2249. "on-change": _vm.setPage,
  2250. "on-page-size-change": _vm.setPageSize
  2251. }
  2252. })
  2253. ],
  2254. 1
  2255. )
  2256. ])
  2257. }
  2258. var staticRenderFns = []
  2259. render._withStripped = true
  2260. module.exports = { render: render, staticRenderFns: staticRenderFns }
  2261. if (false) {
  2262. module.hot.accept()
  2263. if (module.hot.data) {
  2264. require("vue-hot-reload-api") .rerender("data-v-df98fbae", module.exports)
  2265. }
  2266. }
  2267. /***/ }),
  2268. /***/ 856:
  2269. /***/ (function(module, exports, __webpack_require__) {
  2270. var render = function() {
  2271. var _vm = this
  2272. var _h = _vm.$createElement
  2273. var _c = _vm._self._c || _h
  2274. return _c(
  2275. "div",
  2276. { staticClass: "w-main docs" },
  2277. [
  2278. _c("v-title", [_vm._v(_vm._s(_vm.$L("知识库")))]),
  2279. _vm._v(" "),
  2280. _c("div", { staticClass: "w-nav" }, [
  2281. _c("div", { staticClass: "nav-row" }, [
  2282. _c("div", { staticClass: "w-nav-left" }, [
  2283. _c("div", { staticClass: "page-nav-left" }, [
  2284. _c(
  2285. "span",
  2286. {
  2287. staticClass: "hover",
  2288. on: {
  2289. click: function($event) {
  2290. ;[(_vm.addBookId = 0), (_vm.addBookShow = true)]
  2291. }
  2292. }
  2293. },
  2294. [
  2295. _c("i", { staticClass: "ft icon" }, [_vm._v("")]),
  2296. _vm._v(" " + _vm._s(_vm.$L("新建知识库")))
  2297. ]
  2298. ),
  2299. _vm._v(" "),
  2300. _vm.loadIng > 0
  2301. ? _c(
  2302. "div",
  2303. { staticClass: "page-nav-loading" },
  2304. [_c("w-loading")],
  2305. 1
  2306. )
  2307. : _c("div", { staticClass: "page-nav-refresh" }, [
  2308. _c(
  2309. "em",
  2310. {
  2311. on: {
  2312. click: function($event) {
  2313. return _vm.getBookLists(true)
  2314. }
  2315. }
  2316. },
  2317. [_vm._v(_vm._s(_vm.$L("刷新")))]
  2318. )
  2319. ])
  2320. ])
  2321. ]),
  2322. _vm._v(" "),
  2323. _c("div", { staticClass: "w-nav-flex" })
  2324. ])
  2325. ]),
  2326. _vm._v(" "),
  2327. _c("w-content", [
  2328. _c("div", { staticClass: "docs-main" }, [
  2329. _c("div", { staticClass: "docs-body" }, [
  2330. _c("div", { staticClass: "docs-menu" }, [
  2331. _c("h3", [_vm._v(_vm._s(_vm.$L("我的知识库")))]),
  2332. _vm._v(" "),
  2333. _c(
  2334. "ul",
  2335. [
  2336. _vm._l(_vm.bookLists, function(book) {
  2337. return _c(
  2338. "li",
  2339. {
  2340. class: { active: book.id == _vm.selectBookData.id },
  2341. on: {
  2342. click: function($event) {
  2343. ;[
  2344. (_vm.selectBookData = book),
  2345. _vm.getSectionLists(true)
  2346. ]
  2347. }
  2348. }
  2349. },
  2350. [
  2351. _c("div", { staticClass: "docs-title" }, [
  2352. _vm._v(_vm._s(book.title))
  2353. ]),
  2354. _vm._v(" "),
  2355. _c("div", { staticClass: "docs-time" }, [
  2356. _vm._v(
  2357. _vm._s(
  2358. _vm.$A.formatDate("Y-m-d H:i:s", book.indate)
  2359. )
  2360. )
  2361. ])
  2362. ]
  2363. )
  2364. }),
  2365. _vm._v(" "),
  2366. _vm.bookHasMorePages
  2367. ? _c(
  2368. "li",
  2369. {
  2370. staticClass: "more",
  2371. on: { click: _vm.getBookLists }
  2372. },
  2373. [_vm._v(_vm._s(_vm.$L("加载下一页...")))]
  2374. )
  2375. : _vm.bookLoading
  2376. ? _c("li", { staticClass: "load" }, [_c("WLoading")], 1)
  2377. : _vm.bookLists.length == 0
  2378. ? _c("li", { staticClass: "none" }, [
  2379. _vm._v(_vm._s(_vm.bookNoDataText))
  2380. ])
  2381. : _vm._e()
  2382. ],
  2383. 2
  2384. )
  2385. ]),
  2386. _vm._v(" "),
  2387. _c("div", { staticClass: "docs-container" }, [
  2388. _vm.selectBookData.id > 0
  2389. ? _c("div", { staticClass: "docs-box" }, [
  2390. _c("div", { staticClass: "docs-header" }, [
  2391. _c("div", { staticClass: "docs-h1" }, [
  2392. _vm._v(_vm._s(_vm.selectBookData.title))
  2393. ]),
  2394. _vm._v(" "),
  2395. _c(
  2396. "div",
  2397. { staticClass: "docs-setting" },
  2398. [
  2399. _c(
  2400. "Button",
  2401. {
  2402. on: {
  2403. click: function($event) {
  2404. ;[
  2405. (_vm.addSectionId = 0),
  2406. (_vm.addSectionShow = true)
  2407. ]
  2408. }
  2409. }
  2410. },
  2411. [_vm._v(_vm._s(_vm.$L("新增章节")))]
  2412. ),
  2413. _vm._v(" "),
  2414. _c(
  2415. "Button",
  2416. {
  2417. on: {
  2418. click: function($event) {
  2419. ;[
  2420. (_vm.addBookId = _vm.selectBookData.id),
  2421. (_vm.addBookShow = true)
  2422. ]
  2423. }
  2424. }
  2425. },
  2426. [_vm._v(_vm._s(_vm.$L("修改标题")))]
  2427. ),
  2428. _vm._v(" "),
  2429. _c("Button", { on: { click: _vm.showShare } }, [
  2430. _vm._v(_vm._s(_vm.$L("分享")))
  2431. ]),
  2432. _vm._v(" "),
  2433. _c(
  2434. "Button",
  2435. {
  2436. on: {
  2437. click: function($event) {
  2438. ;[
  2439. (_vm.settingDrawerShow = true),
  2440. (_vm.settingDrawerTab = "setting")
  2441. ]
  2442. }
  2443. }
  2444. },
  2445. [_vm._v(_vm._s(_vm.$L("设置")))]
  2446. ),
  2447. _vm._v(" "),
  2448. _c(
  2449. "Button",
  2450. {
  2451. attrs: { type: "warning", ghost: "" },
  2452. on: {
  2453. click: function($event) {
  2454. return _vm.onBookDelete(_vm.selectBookData.id)
  2455. }
  2456. }
  2457. },
  2458. [_vm._v(_vm._s(_vm.$L("删除")))]
  2459. )
  2460. ],
  2461. 1
  2462. )
  2463. ]),
  2464. _vm._v(" "),
  2465. _c(
  2466. "div",
  2467. { staticClass: "docs-section" },
  2468. [
  2469. _c("nested-draggable", {
  2470. attrs: {
  2471. lists: _vm.sectionLists,
  2472. disabled: _vm.sortDisabled
  2473. },
  2474. on: { change: _vm.handleSection }
  2475. }),
  2476. _vm._v(" "),
  2477. _vm.sectionLists.length == 0
  2478. ? _c("div", { staticClass: "none" }, [
  2479. _vm._v(_vm._s(_vm.sectionNoDataText))
  2480. ])
  2481. : _vm._e()
  2482. ],
  2483. 1
  2484. )
  2485. ])
  2486. : _vm._e()
  2487. ])
  2488. ])
  2489. ])
  2490. ]),
  2491. _vm._v(" "),
  2492. _c(
  2493. "Modal",
  2494. {
  2495. attrs: {
  2496. title: _vm.$L(_vm.addBookId > 0 ? "修改标题" : "新建知识库"),
  2497. closable: false,
  2498. "mask-closable": false,
  2499. "class-name": "simple-modal"
  2500. },
  2501. model: {
  2502. value: _vm.addBookShow,
  2503. callback: function($$v) {
  2504. _vm.addBookShow = $$v
  2505. },
  2506. expression: "addBookShow"
  2507. }
  2508. },
  2509. [
  2510. _c(
  2511. "Form",
  2512. {
  2513. ref: "bookAdd",
  2514. attrs: {
  2515. model: _vm.formBookAdd,
  2516. rules: _vm.ruleBookAdd,
  2517. "label-width": 110
  2518. },
  2519. nativeOn: {
  2520. submit: function($event) {
  2521. $event.preventDefault()
  2522. }
  2523. }
  2524. },
  2525. [
  2526. _c(
  2527. "FormItem",
  2528. {
  2529. staticStyle: { "margin-right": "28px" },
  2530. attrs: { prop: "title", label: _vm.$L("知识库名称") }
  2531. },
  2532. [
  2533. _c("Input", {
  2534. attrs: { type: "text", maxlength: 32 },
  2535. model: {
  2536. value: _vm.formBookAdd.title,
  2537. callback: function($$v) {
  2538. _vm.$set(_vm.formBookAdd, "title", $$v)
  2539. },
  2540. expression: "formBookAdd.title"
  2541. }
  2542. })
  2543. ],
  2544. 1
  2545. )
  2546. ],
  2547. 1
  2548. ),
  2549. _vm._v(" "),
  2550. _c(
  2551. "div",
  2552. { attrs: { slot: "footer" }, slot: "footer" },
  2553. [
  2554. _c(
  2555. "Button",
  2556. {
  2557. attrs: { type: "default" },
  2558. on: {
  2559. click: function($event) {
  2560. _vm.addBookShow = false
  2561. }
  2562. }
  2563. },
  2564. [_vm._v(_vm._s(_vm.$L("取消")))]
  2565. ),
  2566. _vm._v(" "),
  2567. _c(
  2568. "Button",
  2569. {
  2570. attrs: { type: "primary", loading: _vm.loadIng > 0 },
  2571. on: { click: _vm.onBookAdd }
  2572. },
  2573. [_vm._v(_vm._s(_vm.$L(_vm.addBookId > 0 ? "提交" : "添加")))]
  2574. )
  2575. ],
  2576. 1
  2577. )
  2578. ],
  2579. 1
  2580. ),
  2581. _vm._v(" "),
  2582. _c(
  2583. "Modal",
  2584. {
  2585. attrs: {
  2586. title: _vm.$L(_vm.addSectionId > 0 ? "修改文档标题" : "新建文档"),
  2587. closable: false,
  2588. "mask-closable": false,
  2589. "class-name": "simple-modal"
  2590. },
  2591. model: {
  2592. value: _vm.addSectionShow,
  2593. callback: function($$v) {
  2594. _vm.addSectionShow = $$v
  2595. },
  2596. expression: "addSectionShow"
  2597. }
  2598. },
  2599. [
  2600. _c(
  2601. "Form",
  2602. {
  2603. ref: "sectionAdd",
  2604. attrs: {
  2605. model: _vm.formSectionAdd,
  2606. rules: _vm.ruleSectionAdd,
  2607. "label-width": 110
  2608. },
  2609. nativeOn: {
  2610. submit: function($event) {
  2611. $event.preventDefault()
  2612. }
  2613. }
  2614. },
  2615. [
  2616. _c(
  2617. "FormItem",
  2618. {
  2619. staticStyle: { "margin-right": "28px" },
  2620. attrs: { prop: "title", label: _vm.$L("文档标题") }
  2621. },
  2622. [
  2623. _c("Input", {
  2624. attrs: { type: "text", maxlength: 32 },
  2625. model: {
  2626. value: _vm.formSectionAdd.title,
  2627. callback: function($$v) {
  2628. _vm.$set(_vm.formSectionAdd, "title", $$v)
  2629. },
  2630. expression: "formSectionAdd.title"
  2631. }
  2632. })
  2633. ],
  2634. 1
  2635. ),
  2636. _vm._v(" "),
  2637. _vm.addSectionId <= 0
  2638. ? _c(
  2639. "FormItem",
  2640. {
  2641. staticStyle: { "margin-right": "28px" },
  2642. attrs: { prop: "type", label: _vm.$L("文档类型") }
  2643. },
  2644. [
  2645. _c(
  2646. "ButtonGroup",
  2647. _vm._l(_vm.sectionTypeLists, function(it, ik) {
  2648. return _c(
  2649. "Button",
  2650. {
  2651. key: ik,
  2652. attrs: {
  2653. type:
  2654. "" +
  2655. (_vm.formSectionAdd.type == it.value
  2656. ? "primary"
  2657. : "default")
  2658. },
  2659. on: {
  2660. click: function($event) {
  2661. _vm.formSectionAdd.type = it.value
  2662. }
  2663. }
  2664. },
  2665. [_vm._v(_vm._s(it.text))]
  2666. )
  2667. }),
  2668. 1
  2669. )
  2670. ],
  2671. 1
  2672. )
  2673. : _vm._e()
  2674. ],
  2675. 1
  2676. ),
  2677. _vm._v(" "),
  2678. _c(
  2679. "div",
  2680. { attrs: { slot: "footer" }, slot: "footer" },
  2681. [
  2682. _c(
  2683. "Button",
  2684. {
  2685. attrs: { type: "default" },
  2686. on: {
  2687. click: function($event) {
  2688. _vm.addSectionShow = false
  2689. }
  2690. }
  2691. },
  2692. [_vm._v(_vm._s(_vm.$L("取消")))]
  2693. ),
  2694. _vm._v(" "),
  2695. _c(
  2696. "Button",
  2697. {
  2698. attrs: { type: "primary", loading: _vm.loadIng > 0 },
  2699. on: { click: _vm.onSectionAdd }
  2700. },
  2701. [_vm._v(_vm._s(_vm.$L(_vm.addSectionId > 0 ? "提交" : "添加")))]
  2702. )
  2703. ],
  2704. 1
  2705. )
  2706. ],
  2707. 1
  2708. ),
  2709. _vm._v(" "),
  2710. _c(
  2711. "WDrawer",
  2712. {
  2713. attrs: { maxWidth: "750" },
  2714. model: {
  2715. value: _vm.settingDrawerShow,
  2716. callback: function($$v) {
  2717. _vm.settingDrawerShow = $$v
  2718. },
  2719. expression: "settingDrawerShow"
  2720. }
  2721. },
  2722. [
  2723. _vm.settingDrawerShow
  2724. ? _c(
  2725. "Tabs",
  2726. {
  2727. model: {
  2728. value: _vm.settingDrawerTab,
  2729. callback: function($$v) {
  2730. _vm.settingDrawerTab = $$v
  2731. },
  2732. expression: "settingDrawerTab"
  2733. }
  2734. },
  2735. [
  2736. _c(
  2737. "TabPane",
  2738. { attrs: { label: _vm.$L("文档设置"), name: "setting" } },
  2739. [
  2740. _c("book-setting", {
  2741. attrs: {
  2742. canload:
  2743. _vm.settingDrawerShow &&
  2744. _vm.settingDrawerTab == "setting",
  2745. id: _vm.selectBookData.id
  2746. },
  2747. on: { "on-setting-callback": _vm.settingCallback }
  2748. })
  2749. ],
  2750. 1
  2751. ),
  2752. _vm._v(" "),
  2753. _c(
  2754. "TabPane",
  2755. { attrs: { label: _vm.$L("文档成员"), name: "member" } },
  2756. [
  2757. _c("book-users", {
  2758. attrs: {
  2759. canload:
  2760. _vm.settingDrawerShow &&
  2761. _vm.settingDrawerTab == "member",
  2762. id: _vm.selectBookData.id
  2763. }
  2764. })
  2765. ],
  2766. 1
  2767. )
  2768. ],
  2769. 1
  2770. )
  2771. : _vm._e()
  2772. ],
  2773. 1
  2774. )
  2775. ],
  2776. 1
  2777. )
  2778. }
  2779. var staticRenderFns = []
  2780. render._withStripped = true
  2781. module.exports = { render: render, staticRenderFns: staticRenderFns }
  2782. if (false) {
  2783. module.hot.accept()
  2784. if (module.hot.data) {
  2785. require("vue-hot-reload-api") .rerender("data-v-0172190c", module.exports)
  2786. }
  2787. }
  2788. /***/ })
  2789. });