2.a9923da8644e2650182c.chunk.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. webpackJsonp([2],{
  2. /***/ 178:
  3. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4. "use strict";
  5. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  6. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  7. //
  8. //
  9. //
  10. //
  11. //
  12. //
  13. //
  14. //
  15. //
  16. //
  17. //
  18. //
  19. //
  20. //
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. //
  39. //
  40. //
  41. //
  42. //
  43. //
  44. //
  45. //
  46. //
  47. //
  48. //
  49. //
  50. //
  51. //
  52. //
  53. //
  54. //
  55. //
  56. //
  57. //
  58. //
  59. //
  60. //
  61. //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. //
  69. //
  70. //
  71. //
  72. //
  73. //
  74. //
  75. //
  76. //
  77. //
  78. //
  79. //
  80. //
  81. //
  82. //
  83. //
  84. //
  85. //
  86. //
  87. //
  88. //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. //
  95. //
  96. //
  97. //
  98. //
  99. //
  100. //
  101. //
  102. //
  103. //
  104. //
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. //
  124. //
  125. //
  126. //
  127. //
  128. //
  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. //
  154. //
  155. //
  156. //
  157. /* harmony default export */ __webpack_exports__["default"] = ({
  158. data: function data() {
  159. return {
  160. isCollapsed: false,
  161. menuActiveName: "list", // active-name
  162. menuData: [],
  163. breadcrumb: []
  164. };
  165. },
  166. components: {},
  167. mounted: function mounted() {
  168. var _this = this;
  169. this.menuData = __webpack_require__(234);
  170. this.$nextTick(function () {
  171. _this.menuActiveName = _this.$route.path.slice(1);
  172. _this.$refs.leftMenu.updateActiveName(); // 手动更新当前选择项,注意要在 $nextTick 里调用
  173. });
  174. this.bindBreadcrumb(this.$route.matched[this.$route.matched.length - 1].name);
  175. },
  176. computed: {
  177. rotateIcon: function rotateIcon() {
  178. return ["menu-icon", this.isCollapsed ? "rotate-icon" : ""];
  179. },
  180. menuitemClasses: function menuitemClasses() {
  181. return ["menu-item", this.isCollapsed ? "collapsed-menu" : ""];
  182. }
  183. },
  184. watch: {
  185. $route: function $route(val) {
  186. this.bindBreadcrumb(val.matched[val.matched.length - 1].name);
  187. }
  188. },
  189. methods: {
  190. // 面包屑导航
  191. bindBreadcrumb: function bindBreadcrumb(name) {
  192. var array = this.menuData;
  193. var ret = [];
  194. for (var index = 0; index < array.length; index++) {
  195. var element = array[index];
  196. ret = [element];
  197. if (element.name == name) {
  198. break;
  199. }
  200. var childrens = element.children;
  201. if (childrens) {
  202. for (var j = 0; j < childrens.length; j++) {
  203. var item = childrens[j];
  204. if (item.name == name) {
  205. // let put = Object.assign({}, item);
  206. // let put = JSON.parse(JSON.stringify(item));
  207. var put = _extends({}, item);
  208. /* if (
  209. item.name == "新建任务" &&
  210. window.location.href.indexOf("id") != -1
  211. ) {
  212. put.name = put.name.replace("新建", "编辑");
  213. } */
  214. ret.push(put);
  215. break;
  216. }
  217. }
  218. }
  219. if (ret.length > 1) {
  220. break;
  221. }
  222. }
  223. this.breadcrumb = ret;
  224. },
  225. // 控制菜单缩放
  226. collapsedSider: function collapsedSider() {
  227. this.$refs.side1.toggleCollapse();
  228. },
  229. // 退出登录
  230. signOut: function signOut() {
  231. var _this2 = this;
  232. this.$Modal.warning({
  233. title: '温馨提示',
  234. content: '确定要退出当前账户么?',
  235. onOk: function onOk() {
  236. _this2.$tools.delCookie('token');
  237. _this2.$router.push({
  238. path: '/login'
  239. });
  240. }
  241. });
  242. }
  243. }
  244. });
  245. /***/ }),
  246. /***/ 195:
  247. /***/ (function(module, exports) {
  248. // removed by extract-text-webpack-plugin
  249. /***/ }),
  250. /***/ 229:
  251. /***/ (function(module, exports, __webpack_require__) {
  252. module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  253. return _c('div', {
  254. staticClass: "layout"
  255. }, [_c('Layout', [_c('Header', {
  256. staticStyle: {
  257. "padding-right": "0"
  258. }
  259. }, [_c('Menu', {
  260. attrs: {
  261. "mode": "horizontal",
  262. "theme": "dark",
  263. "active-name": "1",
  264. "width": "auto"
  265. }
  266. }, [_c('div', {
  267. staticClass: "layout-logo"
  268. }, [_vm._v("\n\t\t\t\t\t\tCrontab\n\t\t\t\t\t")]), _vm._v(" "), _c('Icon', {
  269. class: _vm.rotateIcon,
  270. style: ({
  271. margin: '18px 20px 0 44px',
  272. color: '#fff',
  273. float: 'left'
  274. }),
  275. attrs: {
  276. "type": "md-menu",
  277. "size": "24"
  278. },
  279. nativeOn: {
  280. "click": function($event) {
  281. return _vm.collapsedSider($event)
  282. }
  283. }
  284. }), _vm._v(" "), _c('div', {
  285. staticClass: "layout-nav"
  286. }, [_c('MenuItem', {
  287. staticClass: "fr",
  288. attrs: {
  289. "name": "1"
  290. },
  291. nativeOn: {
  292. "click": function($event) {
  293. return _vm.signOut($event)
  294. }
  295. }
  296. }, [_c('Icon', {
  297. attrs: {
  298. "type": "ios-navigate"
  299. }
  300. }), _vm._v("\n 退出\n ")], 1)], 1)], 1)], 1), _vm._v(" "), _c('Layout', [_c('Sider', {
  301. ref: "side1",
  302. style: ({
  303. background: '#fff'
  304. }),
  305. attrs: {
  306. "hide-trigger": "",
  307. "collapsible": "",
  308. "collapsed-width": 78
  309. },
  310. model: {
  311. value: (_vm.isCollapsed),
  312. callback: function($$v) {
  313. _vm.isCollapsed = $$v
  314. },
  315. expression: "isCollapsed"
  316. }
  317. }, [_c('Menu', {
  318. ref: "leftMenu",
  319. class: _vm.menuitemClasses,
  320. attrs: {
  321. "active-name": _vm.menuActiveName,
  322. "theme": "light",
  323. "width": "auto"
  324. }
  325. }, _vm._l((_vm.menuData), function(item, index) {
  326. return _c('MenuItem', {
  327. key: item.path,
  328. attrs: {
  329. "name": item.path.substr(1),
  330. "to": item.path
  331. }
  332. }, [_c('Icon', {
  333. attrs: {
  334. "type": item.icon
  335. }
  336. }), _vm._v(" "), _c('span', [_vm._v(_vm._s(item.name))])], 1)
  337. }))], 1), _vm._v(" "), _c('Layout', {
  338. style: ({
  339. padding: '0 24px 24px'
  340. })
  341. }, [_c('Breadcrumb', {
  342. style: ({
  343. margin: '24px 0'
  344. })
  345. }, _vm._l((_vm.breadcrumb), function(item, index) {
  346. return _c('BreadcrumbItem', {
  347. key: item.name,
  348. attrs: {
  349. "to": item.path
  350. }
  351. }, [_vm._v(_vm._s(item.name))])
  352. })), _vm._v(" "), _c('Content', {
  353. style: ({
  354. padding: '10px',
  355. minHeight: '280px',
  356. background: '#fff'
  357. })
  358. }, [_c('router-view')], 1)], 1)], 1)], 1)], 1)
  359. },staticRenderFns: []}
  360. module.exports.render._withStripped = true
  361. if (false) {
  362. module.hot.accept()
  363. if (module.hot.data) {
  364. require("vue-loader/node_modules/vue-hot-reload-api").rerender("data-v-6bfcf060", module.exports)
  365. }
  366. }
  367. /***/ }),
  368. /***/ 234:
  369. /***/ (function(module, exports) {
  370. module.exports = [{"name":"任务列表","icon":"md-list-box","path":"/list","children":[{"name":"列表2","path":"/list2"}]}]
  371. /***/ }),
  372. /***/ 32:
  373. /***/ (function(module, exports, __webpack_require__) {
  374. /* styles */
  375. __webpack_require__(195)
  376. var Component = __webpack_require__(16)(
  377. /* script */
  378. __webpack_require__(178),
  379. /* template */
  380. __webpack_require__(229),
  381. /* scopeId */
  382. "data-v-6bfcf060",
  383. /* cssModules */
  384. null
  385. )
  386. Component.options.__file = "D:\\workarea\\normal\\crontab\\src\\views\\index.vue"
  387. if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")}
  388. if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}
  389. /* hot reload */
  390. if (false) {(function () {
  391. var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
  392. hotAPI.install(require("vue"), false)
  393. if (!hotAPI.compatible) return
  394. module.hot.accept()
  395. if (!module.hot.data) {
  396. hotAPI.createRecord("data-v-6bfcf060", Component.options)
  397. } else {
  398. hotAPI.reload("data-v-6bfcf060", Component.options)
  399. }
  400. })()}
  401. module.exports = Component.exports
  402. /***/ })
  403. });