guhongwei há 4 anos atrás
pai
commit
dddfc181e9

+ 38 - 14
src/components/common/Sidebar.vue

@@ -52,21 +52,45 @@ export default {
           title: '系统首页',
           title: '系统首页',
         },
         },
         {
         {
-          icon: 'el-icon-s-home',
-          index: 'test',
-          title: '测试菜单',
+          icon: 'el-icon-setting',
+          index: 'siteinfo',
+          title: '站点信息',
+        },
+        {
+          icon: 'el-icon-set-up',
+          index: '1',
+          title: '科技咨讯',
+          subs: [
+            {
+              index: 'concolumn',
+              title: '栏目管理',
+            },
+            {
+              index: 'connews',
+              title: '信息管理',
+            },
+          ],
+        },
+        {
+          icon: 'el-icon-edit-outline',
+          index: '2',
+          title: '科技培训',
+          subs: [
+            {
+              index: 'traincolumn',
+              title: '栏目管理',
+            },
+            {
+              index: 'trainnews',
+              title: '信息管理',
+            },
+          ],
+        },
+        {
+          icon: 'el-icon-help',
+          index: 'links',
+          title: '友情链接',
         },
         },
-        // {
-        //   icon: 'el-icon-s-home',
-        //   index: '1',
-        //   title: '测试菜单',
-        //   subs: [
-        //     {
-        //       index: 'test',
-        //       title: '测试菜单',
-        //     },
-        //   ],
-        // },
       ],
       ],
     };
     };
   },
   },

+ 28 - 3
src/router/index.js

@@ -21,9 +21,34 @@ export default new Router({
           meta: { title: '系统首页' },
           meta: { title: '系统首页' },
         },
         },
         {
         {
-          path: '/test',
-          component: () => import('../views/test/index.vue'),
-          meta: { title: '测试菜单' },
+          path: '/siteinfo',
+          component: () => import('../views/siteinfo/index.vue'),
+          meta: { title: '站点信息' },
+        },
+        {
+          path: '/concolumn',
+          component: () => import('../views/concolumn/index.vue'),
+          meta: { title: '科技咨讯-栏目' },
+        },
+        {
+          path: '/connews',
+          component: () => import('../views/connews/index.vue'),
+          meta: { title: '科技咨讯-信息' },
+        },
+        {
+          path: '/traincolumn',
+          component: () => import('../views/traincolumn/index.vue'),
+          meta: { title: '科技培训-栏目' },
+        },
+        {
+          path: '/trainnews',
+          component: () => import('../views/trainnews/index.vue'),
+          meta: { title: '科技培训-信息' },
+        },
+        {
+          path: '/links',
+          component: () => import('../views/links/index.vue'),
+          meta: { title: '友情链接' },
         },
         },
       ],
       ],
     },
     },

+ 54 - 0
src/store/concolumn.js

@@ -0,0 +1,54 @@
+//第一步
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  //接口地址
+  repair: `/api/servicealtai/concolumn`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  //查询列表 skip:第一页,limit:第一页显示的数据,info:其余查询参数
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    //连接接口。。。。
+    const res = await this.$axios.$get(`${api.repair}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    //把数据集合res返回
+    return res;
+  },
+  //创建数据  payload是添加form表单中的数据集合  创建数据的时候需要拿到form表单里面的数据
+  async create({ commit }, payload) {
+    //通过$axios提交post请求????
+    const res = await this.$axios.$post(`${api.repair}`, payload);
+    return res;
+  },
+  //查询详情,payload:参数位,一般传当前数据id
+  async fetch({ commit }, payload) {
+    //有/一般都是路径
+    const res = await this.$axios.$get(`${api.repair}/${payload}`);
+    return res;
+  },
+  //修改:id: 当前数据id, data: 当前修改数据的新form表单
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.repair}/update/${id}`, data);
+    return res;
+  },
+  //删除:payload:参数位,一般传当前数据id
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.repair}/${payload}`);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 6 - 6
src/store/car.js

@@ -5,7 +5,7 @@ import _ from 'lodash';
 Vue.use(Vuex);
 Vue.use(Vuex);
 const api = {
 const api = {
   //接口地址
   //接口地址
-  car: `/api/servicetest/carorder`,
+  repair: `/api/servicealtai/connews`,
 };
 };
 const state = () => ({});
 const state = () => ({});
 const mutations = {};
 const mutations = {};
@@ -14,7 +14,7 @@ const actions = {
   //查询列表 skip:第一页,limit:第一页显示的数据,info:其余查询参数
   //查询列表 skip:第一页,limit:第一页显示的数据,info:其余查询参数
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
   async query({ commit }, { skip = 0, limit, ...info } = {}) {
     //连接接口。。。。
     //连接接口。。。。
-    const res = await this.$axios.$get(`${api.car}`, {
+    const res = await this.$axios.$get(`${api.repair}`, {
       skip,
       skip,
       limit,
       limit,
       ...info,
       ...info,
@@ -25,23 +25,23 @@ const actions = {
   //创建数据  payload是添加form表单中的数据集合  创建数据的时候需要拿到form表单里面的数据
   //创建数据  payload是添加form表单中的数据集合  创建数据的时候需要拿到form表单里面的数据
   async create({ commit }, payload) {
   async create({ commit }, payload) {
     //通过$axios提交post请求????
     //通过$axios提交post请求????
-    const res = await this.$axios.$post(`${api.car}`, payload);
+    const res = await this.$axios.$post(`${api.repair}`, payload);
     return res;
     return res;
   },
   },
   //查询详情,payload:参数位,一般传当前数据id
   //查询详情,payload:参数位,一般传当前数据id
   async fetch({ commit }, payload) {
   async fetch({ commit }, payload) {
     //有/一般都是路径
     //有/一般都是路径
-    const res = await this.$axios.$get(`${api.car}/${payload}`);
+    const res = await this.$axios.$get(`${api.repair}/${payload}`);
     return res;
     return res;
   },
   },
   //修改:id: 当前数据id, data: 当前修改数据的新form表单
   //修改:id: 当前数据id, data: 当前修改数据的新form表单
   async update({ commit }, { id, ...data }) {
   async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.car}/update/${id}`, data);
+    const res = await this.$axios.$post(`${api.repair}/update/${id}`, data);
     return res;
     return res;
   },
   },
   //删除:payload:参数位,一般传当前数据id
   //删除:payload:参数位,一般传当前数据id
   async delete({ commit }, payload) {
   async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.car}/${payload}`);
+    const res = await this.$axios.$delete(`${api.repair}/${payload}`);
     return res;
     return res;
   },
   },
 };
 };

+ 12 - 4
src/store/index.js

@@ -3,8 +3,12 @@ import Vuex from 'vuex';
 import * as ustate from './user/state';
 import * as ustate from './user/state';
 import * as umutations from './user/mutations';
 import * as umutations from './user/mutations';
 import login from './login';
 import login from './login';
-import repair from './repair';
-import car from './car';
+import siteinfo from './siteinfo';
+import links from './links';
+import connews from './connews';
+import concolumn from './concolumn';
+import trainnews from './trainnews';
+import traincolumn from './traincolumn';
 
 
 Vue.use(Vuex);
 Vue.use(Vuex);
 
 
@@ -14,7 +18,11 @@ export default new Vuex.Store({
   actions: {},
   actions: {},
   modules: {
   modules: {
     login,
     login,
-    repair,
-    car,
+    siteinfo,
+    links,
+    connews,
+    concolumn,
+    trainnews,
+    traincolumn,
   },
   },
 });
 });

+ 1 - 1
src/store/repair.js

@@ -5,7 +5,7 @@ import _ from 'lodash';
 Vue.use(Vuex);
 Vue.use(Vuex);
 const api = {
 const api = {
   //接口地址
   //接口地址
-  repair: `/api/servicetest/repair`,
+  repair: `/api/servicealtai/links`,
 };
 };
 const state = () => ({});
 const state = () => ({});
 const mutations = {};
 const mutations = {};

+ 54 - 0
src/store/siteinfo.js

@@ -0,0 +1,54 @@
+//第一步
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  //接口地址
+  repair: `/api/servicealtai/siteinfo`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  //查询列表 skip:第一页,limit:第一页显示的数据,info:其余查询参数
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    //连接接口。。。。
+    const res = await this.$axios.$get(`${api.repair}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    //把数据集合res返回
+    return res;
+  },
+  //创建数据  payload是添加form表单中的数据集合  创建数据的时候需要拿到form表单里面的数据
+  async create({ commit }, payload) {
+    //通过$axios提交post请求????
+    const res = await this.$axios.$post(`${api.repair}`, payload);
+    return res;
+  },
+  //查询详情,payload:参数位,一般传当前数据id
+  async fetch({ commit }, payload) {
+    //有/一般都是路径
+    const res = await this.$axios.$get(`${api.repair}/${payload}`);
+    return res;
+  },
+  //修改:id: 当前数据id, data: 当前修改数据的新form表单
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.repair}/update/${id}`, data);
+    return res;
+  },
+  //删除:payload:参数位,一般传当前数据id
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.repair}/${payload}`);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 54 - 0
src/store/traincolumn.js

@@ -0,0 +1,54 @@
+//第一步
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  //接口地址
+  repair: `/api/servicealtai/traincolumn`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  //查询列表 skip:第一页,limit:第一页显示的数据,info:其余查询参数
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    //连接接口。。。。
+    const res = await this.$axios.$get(`${api.repair}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    //把数据集合res返回
+    return res;
+  },
+  //创建数据  payload是添加form表单中的数据集合  创建数据的时候需要拿到form表单里面的数据
+  async create({ commit }, payload) {
+    //通过$axios提交post请求????
+    const res = await this.$axios.$post(`${api.repair}`, payload);
+    return res;
+  },
+  //查询详情,payload:参数位,一般传当前数据id
+  async fetch({ commit }, payload) {
+    //有/一般都是路径
+    const res = await this.$axios.$get(`${api.repair}/${payload}`);
+    return res;
+  },
+  //修改:id: 当前数据id, data: 当前修改数据的新form表单
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.repair}/update/${id}`, data);
+    return res;
+  },
+  //删除:payload:参数位,一般传当前数据id
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.repair}/${payload}`);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 54 - 0
src/store/trainnews.js

@@ -0,0 +1,54 @@
+//第一步
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  //接口地址
+  repair: `/api/servicealtai/trainnews`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  //查询列表 skip:第一页,limit:第一页显示的数据,info:其余查询参数
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    //连接接口。。。。
+    const res = await this.$axios.$get(`${api.repair}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    //把数据集合res返回
+    return res;
+  },
+  //创建数据  payload是添加form表单中的数据集合  创建数据的时候需要拿到form表单里面的数据
+  async create({ commit }, payload) {
+    //通过$axios提交post请求????
+    const res = await this.$axios.$post(`${api.repair}`, payload);
+    return res;
+  },
+  //查询详情,payload:参数位,一般传当前数据id
+  async fetch({ commit }, payload) {
+    //有/一般都是路径
+    const res = await this.$axios.$get(`${api.repair}/${payload}`);
+    return res;
+  },
+  //修改:id: 当前数据id, data: 当前修改数据的新form表单
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.repair}/update/${id}`, data);
+    return res;
+  },
+  //删除:payload:参数位,一般传当前数据id
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.repair}/${payload}`);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 36 - 0
src/views/concolumn/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
+        <el-col :span="24" class="container"> </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import breadcrumb from '@c/common/breadcrumb.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+import bus from '@/components/common/bus';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    breadcrumb,
+  },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 36 - 0
src/views/connews/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
+        <el-col :span="24" class="container"> </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import breadcrumb from '@c/common/breadcrumb.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+import bus from '@/components/common/bus';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    breadcrumb,
+  },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 171 - 0
src/views/links/index.vue

@@ -0,0 +1,171 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
+        <el-col :span="24" class="container info">
+          <el-col :span="24" class="top">
+            <el-button type="primary" size="mini" @click="dialog = true">添加</el-button>
+          </el-col>
+          <el-col :span="24" class="list">
+            <data-table :fields="fields" :opera="opera" :data="list" :total="total" @edit="toEdit" @delete="toDelete" @query="search"></data-table>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+    <el-dialog :visible.sync="dialog" title="增加" @close="toClose" :destroy-on-close="true" width="50%">
+      <data-form :data="form" :fields="formFields" :rules="rules" @save="turnSave">
+        <template #custom="{item,form}">
+          <template v-if="item.model == 'pic'">
+            <upload :limit="1" :data="form.pic" type="pic" :url="'/files/pic/upload'" @upload="uploadSuccess"></upload>
+          </template>
+        </template>
+      </data-form>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import breadcrumb from '@c/common/breadcrumb.vue';
+import dataTable from '@/components/frame/filter-page-table.vue';
+import dataForm from '@/components/frame/form.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+import upload from '@/components/frame/uploadone.vue';
+const { mapActions: links } = createNamespacedHelpers('links');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    breadcrumb,
+    dataTable,
+    dataForm,
+    upload,
+  },
+  data: function() {
+    return {
+      opera: [
+        {
+          label: '修改',
+          icon: 'el-icon-edit',
+          method: 'edit',
+        },
+        {
+          label: '删除',
+          icon: 'el-icon-delete',
+          method: 'delete',
+        },
+      ],
+      fields: [
+        { label: '名称', prop: 'title', filter: 'input' },
+        { label: '链接地址', prop: 'url' },
+        { label: '图片', prop: 'pic' },
+      ],
+      list: [],
+      total: 0,
+      // 增加
+      dialog: false,
+      formFields: [
+        { label: '名称', required: true, model: 'title' },
+        { label: '图片', required: false, model: 'pic', custom: true },
+        { label: '链接地址', required: false, model: 'url' },
+      ],
+      form: {},
+      rules: {
+        title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
+      },
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...links(['query', 'fetch', 'create', 'update', 'delete']),
+    // 查询列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 修改
+    async toEdit({ data }) {
+      let res = await this.fetch(data.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+        this.dialog = true;
+      }
+    },
+    // 删除
+    async toDelete({ data }) {
+      this.$confirm('您确定要删除此信息吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(async () => {
+          const res = await this.delete(data.id);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '删除数据成功',
+              type: 'success',
+            });
+            this.search();
+          }
+        })
+        .catch(() => {});
+    },
+    // 增加
+    // 保存
+    async turnSave({ data }) {
+      if (data.id) {
+        let res = await this.update(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '修改数据成功',
+            type: 'success',
+          });
+          this.dialog = false;
+          this.search();
+        }
+      } else {
+        let res = await this.create(data);
+        if (this.$checkRes(res)) {
+          this.$message({
+            message: '添加数据成功',
+            type: 'success',
+          });
+          this.dialog = false;
+          this.search();
+        }
+      }
+    },
+    // 取消增加
+    toClose() {
+      this.form = {};
+      this.dialog = false;
+    },
+    // 图片
+    uploadSuccess({ type, data }) {
+      this.$set(this.form, `${type}`, data.uri);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .info {
+    .top {
+      text-align: right;
+      margin: 15px 0;
+    }
+  }
+}
+</style>

+ 36 - 0
src/views/siteinfo/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
+        <el-col :span="24" class="container"> </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import breadcrumb from '@c/common/breadcrumb.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+import bus from '@/components/common/bus';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    breadcrumb,
+  },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 0 - 125
src/views/test/index.vue

@@ -1,125 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24" class="main">
-        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
-        <el-col :span="24" class="container info">
-          <el-col :span="24" class="top">
-            <el-button type="primary" size="mini" @click="dialog = true">添加</el-button>
-          </el-col>
-          <el-col :span="24" class="list">
-            <data-table :fields="fields" :opera="opera" :data="list" :total="total" @edit="toEdit" @delete="toDelete" @query="search"></data-table>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-    <el-dialog :visible.sync="dialog" title="增加菜单" @close="toClose" :destroy-on-close="true" width="50%">
-      <data-form :data="form" :fields="formFields" :rules="rules" @save="turnSave">
-        <template #custom="{item}">
-          <template v-if="item.model == 'icon'">
-            <el-radio-group v-model="form.icon">
-              <el-radio v-for="(item, index) in iconlist" :key="index" :label="item.iconkey"><i :class="item.iconkey"></i></el-radio>
-            </el-radio-group>
-          </template>
-        </template>
-      </data-form>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { iconmenu } from '@/util/iconmenu';
-import breadcrumb from '@c/common/breadcrumb.vue';
-import dataTable from '@/components/frame/filter-page-table.vue';
-import dataForm from '@/components/frame/form.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-  name: 'index',
-  props: {},
-  components: {
-    breadcrumb,
-    dataTable,
-    dataForm,
-  },
-  data: function() {
-    return {
-      opera: [
-        {
-          label: '修改',
-          icon: 'el-icon-edit',
-          method: 'edit',
-        },
-        {
-          label: '删除',
-          icon: 'el-icon-delete',
-          method: 'delete',
-        },
-      ],
-      fields: [
-        { label: '菜单名称', prop: 'title' },
-        { label: '菜单地址', prop: 'index' },
-        { label: '菜单图标', prop: 'icon' },
-      ],
-      list: [],
-      total: 0,
-      // 增加菜单
-      dialog: false,
-      formFields: [
-        { label: '菜单名称', required: true, model: 'title' },
-        { label: '菜单地址', required: true, model: 'index' },
-        { label: '菜单图标', required: true, model: 'icon', custom: true },
-      ],
-      form: {},
-      rules: {
-        title: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }],
-        index: [{ required: true, message: '请输入菜单地址', trigger: 'blur' }],
-        icon: [{ required: true, message: '请输入菜单图标', trigger: 'blur' }],
-      },
-      // 图标
-      iconlist: iconmenu,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    // 查询列表
-    async search({ skip = 0, limit = 10, ...info } = {}) {},
-    // 修改
-    toEdit({ data }) {
-      console.log(data);
-    },
-    // 删除
-    toDelete({ data }) {
-      console.log(data);
-    },
-    // 增加菜单
-    // 保存
-    turnSave({ data }) {
-      console.log(data);
-    },
-    // 取消增加
-    toClose() {
-      this.form = {};
-      this.dialog = false;
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.main {
-  .info {
-    .top {
-      text-align: right;
-      margin: 15px 0;
-    }
-  }
-}
-</style>

+ 36 - 0
src/views/traincolumn/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
+        <el-col :span="24" class="container"> </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import breadcrumb from '@c/common/breadcrumb.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+import bus from '@/components/common/bus';
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'index',
+  props: {},
+  components: {
+    breadcrumb,
+  },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 10 - 6
src/views/test/detail.vue

@@ -1,22 +1,27 @@
 <template>
 <template>
-  <div id="detail">
+  <div id="index">
     <el-row>
     <el-row>
-      <el-col :span="24">
-        <p>detail</p>
+      <el-col :span="24" class="main">
+        <breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
+        <el-col :span="24" class="container"> </el-col>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import breadcrumb from '@c/common/breadcrumb.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
+import bus from '@/components/common/bus';
 export default {
 export default {
   metaInfo() {
   metaInfo() {
     return { title: this.$route.meta.title };
     return { title: this.$route.meta.title };
   },
   },
-  name: 'detail',
+  name: 'index',
   props: {},
   props: {},
-  components: {},
+  components: {
+    breadcrumb,
+  },
   data: function() {
   data: function() {
     return {};
     return {};
   },
   },
@@ -25,7 +30,6 @@ export default {
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),
   },
   },
-  watch: {},
 };
 };
 </script>
 </script>