123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- webpackJsonp([2],{
- /***/ 178:
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- 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; };
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /* harmony default export */ __webpack_exports__["default"] = ({
- data: function data() {
- return {
- isCollapsed: false,
- menuActiveName: "list", // active-name
- menuData: [],
- breadcrumb: []
- };
- },
- components: {},
- mounted: function mounted() {
- var _this = this;
- this.menuData = __webpack_require__(234);
- this.$nextTick(function () {
- _this.menuActiveName = _this.$route.path.slice(1);
- _this.$refs.leftMenu.updateActiveName(); // 手动更新当前选择项,注意要在 $nextTick 里调用
- });
- this.bindBreadcrumb(this.$route.matched[this.$route.matched.length - 1].name);
- },
- computed: {
- rotateIcon: function rotateIcon() {
- return ["menu-icon", this.isCollapsed ? "rotate-icon" : ""];
- },
- menuitemClasses: function menuitemClasses() {
- return ["menu-item", this.isCollapsed ? "collapsed-menu" : ""];
- }
- },
- watch: {
- $route: function $route(val) {
- this.bindBreadcrumb(val.matched[val.matched.length - 1].name);
- }
- },
- methods: {
- // 面包屑导航
- bindBreadcrumb: function bindBreadcrumb(name) {
- var array = this.menuData;
- var ret = [];
- for (var index = 0; index < array.length; index++) {
- var element = array[index];
- ret = [element];
- if (element.name == name) {
- break;
- }
- var childrens = element.children;
- if (childrens) {
- for (var j = 0; j < childrens.length; j++) {
- var item = childrens[j];
- if (item.name == name) {
- // let put = Object.assign({}, item);
- // let put = JSON.parse(JSON.stringify(item));
- var put = _extends({}, item);
- /* if (
- item.name == "新建任务" &&
- window.location.href.indexOf("id") != -1
- ) {
- put.name = put.name.replace("新建", "编辑");
- } */
- ret.push(put);
- break;
- }
- }
- }
- if (ret.length > 1) {
- break;
- }
- }
- this.breadcrumb = ret;
- },
- // 控制菜单缩放
- collapsedSider: function collapsedSider() {
- this.$refs.side1.toggleCollapse();
- },
- // 退出登录
- signOut: function signOut() {
- var _this2 = this;
- this.$Modal.warning({
- title: '温馨提示',
- content: '确定要退出当前账户么?',
- onOk: function onOk() {
- _this2.$tools.delCookie('token');
- _this2.$router.push({
- path: '/login'
- });
- }
- });
- }
- }
- });
- /***/ }),
- /***/ 195:
- /***/ (function(module, exports) {
- // removed by extract-text-webpack-plugin
- /***/ }),
- /***/ 229:
- /***/ (function(module, exports, __webpack_require__) {
- module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
- return _c('div', {
- staticClass: "layout"
- }, [_c('Layout', [_c('Header', {
- staticStyle: {
- "padding-right": "0"
- }
- }, [_c('Menu', {
- attrs: {
- "mode": "horizontal",
- "theme": "dark",
- "active-name": "1",
- "width": "auto"
- }
- }, [_c('div', {
- staticClass: "layout-logo"
- }, [_vm._v("\n\t\t\t\t\t\tCrontab\n\t\t\t\t\t")]), _vm._v(" "), _c('Icon', {
- class: _vm.rotateIcon,
- style: ({
- margin: '18px 20px 0 44px',
- color: '#fff',
- float: 'left'
- }),
- attrs: {
- "type": "md-menu",
- "size": "24"
- },
- nativeOn: {
- "click": function($event) {
- return _vm.collapsedSider($event)
- }
- }
- }), _vm._v(" "), _c('div', {
- staticClass: "layout-nav"
- }, [_c('MenuItem', {
- staticClass: "fr",
- attrs: {
- "name": "1"
- },
- nativeOn: {
- "click": function($event) {
- return _vm.signOut($event)
- }
- }
- }, [_c('Icon', {
- attrs: {
- "type": "ios-navigate"
- }
- }), _vm._v("\n 退出\n ")], 1)], 1)], 1)], 1), _vm._v(" "), _c('Layout', [_c('Sider', {
- ref: "side1",
- style: ({
- background: '#fff'
- }),
- attrs: {
- "hide-trigger": "",
- "collapsible": "",
- "collapsed-width": 78
- },
- model: {
- value: (_vm.isCollapsed),
- callback: function($$v) {
- _vm.isCollapsed = $$v
- },
- expression: "isCollapsed"
- }
- }, [_c('Menu', {
- ref: "leftMenu",
- class: _vm.menuitemClasses,
- attrs: {
- "active-name": _vm.menuActiveName,
- "theme": "light",
- "width": "auto"
- }
- }, _vm._l((_vm.menuData), function(item, index) {
- return _c('MenuItem', {
- key: item.path,
- attrs: {
- "name": item.path.substr(1),
- "to": item.path
- }
- }, [_c('Icon', {
- attrs: {
- "type": item.icon
- }
- }), _vm._v(" "), _c('span', [_vm._v(_vm._s(item.name))])], 1)
- }))], 1), _vm._v(" "), _c('Layout', {
- style: ({
- padding: '0 24px 24px'
- })
- }, [_c('Breadcrumb', {
- style: ({
- margin: '24px 0'
- })
- }, _vm._l((_vm.breadcrumb), function(item, index) {
- return _c('BreadcrumbItem', {
- key: item.name,
- attrs: {
- "to": item.path
- }
- }, [_vm._v(_vm._s(item.name))])
- })), _vm._v(" "), _c('Content', {
- style: ({
- padding: '10px',
- minHeight: '280px',
- background: '#fff'
- })
- }, [_c('router-view')], 1)], 1)], 1)], 1)], 1)
- },staticRenderFns: []}
- module.exports.render._withStripped = true
- if (false) {
- module.hot.accept()
- if (module.hot.data) {
- require("vue-loader/node_modules/vue-hot-reload-api").rerender("data-v-6bfcf060", module.exports)
- }
- }
- /***/ }),
- /***/ 234:
- /***/ (function(module, exports) {
- module.exports = [{"name":"任务列表","icon":"md-list-box","path":"/list","children":[{"name":"列表2","path":"/list2"}]}]
- /***/ }),
- /***/ 32:
- /***/ (function(module, exports, __webpack_require__) {
- /* styles */
- __webpack_require__(195)
- var Component = __webpack_require__(16)(
- /* script */
- __webpack_require__(178),
- /* template */
- __webpack_require__(229),
- /* scopeId */
- "data-v-6bfcf060",
- /* cssModules */
- null
- )
- Component.options.__file = "D:\\workarea\\normal\\crontab\\src\\views\\index.vue"
- 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.")}
- if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}
- /* hot reload */
- if (false) {(function () {
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
- hotAPI.install(require("vue"), false)
- if (!hotAPI.compatible) return
- module.hot.accept()
- if (!module.hot.data) {
- hotAPI.createRecord("data-v-6bfcf060", Component.options)
- } else {
- hotAPI.reload("data-v-6bfcf060", Component.options)
- }
- })()}
- module.exports = Component.exports
- /***/ })
- });
|