diff --git a/src/config/router.config.js b/src/config/router.config.js index decece2..d99b53c 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -20,29 +20,29 @@ export const asyncRouterMap = [ { path: 'index', component: () => import(/* webpackChunkName: "store" */ '@/views/store/index'), - meta: { title: '商城列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] }, + meta: { title: '商城列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] } }, { path: 'auth', component: () => import(/* webpackChunkName: "store" */ '@/views/store/auth'), - meta: { title: '授权列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] }, + meta: { title: '授权列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] } }, { path: 'draft', component: () => import(/* webpackChunkName: "store" */ '@/views/store/draft'), - meta: { title: '草稿列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] }, + meta: { title: '草稿列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] } }, { path: 'template', component: () => import(/* webpackChunkName: "store" */ '@/views/store/template'), - meta: { title: '模板列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] }, + meta: { title: '模板列表', keepAlive: true, hiddenHeaderContent: false, permission: ['store'] } }, { path: '/store/recycle', component: () => import(/* webpackChunkName: "store" */ '@/views/store/recycle'), - meta: { title: '回收站', keepAlive: true, permission: ['store'] }, - }, - ], + meta: { title: '回收站', keepAlive: true, permission: ['store'] } + } + ] }, { @@ -55,14 +55,14 @@ export const asyncRouterMap = [ { path: '/menu/index', component: () => import(/* webpackChunkName: "menu" */ '@/views/menu/index'), - meta: { title: '菜单列表', keepAlive: true, permission: ['access'] }, + meta: { title: '菜单列表', keepAlive: true, permission: ['access'] } }, { path: '/menu/access/index', component: () => import(/* webpackChunkName: "menu" */ '@/views/menu/access/index'), - meta: { title: 'API权限', keepAlive: true, permission: ['access'] }, - }, - ], + meta: { title: 'API权限', keepAlive: true, permission: ['access'] } + } + ] }, { name: 'dataCenter', @@ -79,37 +79,37 @@ export const asyncRouterMap = [ { path: '/goods/index', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/Index'), - meta: { title: '商品列表', keepAlive: false, permission: ['access'] }, + meta: { title: '商品列表', keepAlive: false, permission: ['access'] } }, { path: '/goods/create', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/Create'), meta: { title: '创建商品', keepAlive: false }, - hidden: true, + hidden: true }, { path: '/goods/update', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/Update'), meta: { title: '编辑商品', keepAlive: false }, - hidden: true, + hidden: true }, { path: '/goods/modify', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/modify'), meta: { title: '批量修改', keepAlive: false }, - hidden: true, + hidden: true }, { path: '/goods/copy', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/Copy'), meta: { title: '复制商品', keepAlive: false }, hidden: true, - moduleKey: 'goods-copy', + moduleKey: 'goods-copy' }, { path: '/goods/category/index', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/category/Index'), - meta: { title: '商品分类', keepAlive: false }, + meta: { title: '商品分类', keepAlive: false } }, { @@ -118,19 +118,19 @@ export const asyncRouterMap = [ meta: { title: '商品导入', pageTitle: '商品导入记录', - keepAlive: false, + keepAlive: false }, moduleKey: 'goods-import', // 访问其他页面时激活该菜单(router-link-active) - activePath: ['/goods/import/batch'], + activePath: ['/goods/import/batch'] }, { path: '/goods/import/batch', component: () => import(/* webpackChunkName: "goods" */ '@/views/dataCenter/goods/import/Batch'), meta: { title: '商品导入', pageTitle: '商品批量导入', keepAlive: false }, - hidden: true, - }, - ], + hidden: true + } + ] }, { @@ -143,45 +143,45 @@ export const asyncRouterMap = [ { path: '/setting/cache', component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/cache'), - meta: { title: '清理缓存', keepAlive: false, permission: ['setting'] }, + meta: { title: '清理缓存', keepAlive: false, permission: ['setting'] } }, { path: '/setting/science', component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/science'), - meta: { title: '环境检测', keepAlive: false, permission: ['setting'] }, + meta: { title: '环境检测', keepAlive: false, permission: ['setting'] } }, { path: '/setting/timer', component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/timer'), - meta: { title: '定时任务', keepAlive: false, permission: ['setting'] }, + meta: { title: '定时任务', keepAlive: false, permission: ['setting'] } }, { path: '/setting/queue', component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/queue'), - meta: { title: '队列服务', keepAlive: false, permission: ['setting'] }, - }, - ], + meta: { title: '队列服务', keepAlive: false, permission: ['setting'] } + } + ] }, - { - name: 'Cloud', - path: 'cloud', - redirect: '/cloud/authorize', - component: PageView, - meta: { title: '云服务', keepAlive: false, icon: Icon['access'], permission: ['cloud'] }, - children: [ - // { - // path: '/cloud/upgrade', - // component: () => import(/* webpackChunkName: "cloud" */ '@/views/cloud/upgrade'), - // meta: { title: '在线更新', keepAlive: false, permission: ['cloud'] } - // }, - { - path: '/cloud/authorize', - component: () => import(/* webpackChunkName: "cloud" */ '@/views/cloud/authorize'), - meta: { title: '商业授权', keepAlive: false, permission: ['cloud'] }, - }, - ], - }, + // { + // name: 'Cloud', + // path: 'cloud', + // redirect: '/cloud/authorize', + // component: PageView, + // meta: { title: '云服务', keepAlive: false, icon: Icon['access'], permission: ['cloud'] }, + // children: [ + // // { + // // path: '/cloud/upgrade', + // // component: () => import(/* webpackChunkName: "cloud" */ '@/views/cloud/upgrade'), + // // meta: { title: '在线更新', keepAlive: false, permission: ['cloud'] } + // // }, + // { + // path: '/cloud/authorize', + // component: () => import(/* webpackChunkName: "cloud" */ '@/views/cloud/authorize'), + // meta: { title: '商业授权', keepAlive: false, permission: ['cloud'] }, + // }, + // ], + // }, { name: 'Manage', @@ -194,18 +194,18 @@ export const asyncRouterMap = [ { // name: 'Renew', path: 'renew', - component: () => import(/* webpackChunkName: "user" */ '@/views/manage/renew'), - }, - ], - }, - ], + component: () => import(/* webpackChunkName: "user" */ '@/views/manage/renew') + } + ] + } + ] }, { path: '*', redirect: '/404', - hidden: true, - }, + hidden: true + } ] /** @@ -223,13 +223,13 @@ export const constantRouterMap = [ // name: 'Login', path: 'login', meta: { title: '超级管理后台' }, - component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login'), - }, - ], + component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login') + } + ] }, { path: '/404', - component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'), - }, + component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404') + } ] diff --git a/src/views/store/draft.vue b/src/views/store/draft.vue index 6e00b74..5d04284 100644 --- a/src/views/store/draft.vue +++ b/src/views/store/draft.vue @@ -33,34 +33,34 @@ const columns = [ { title: 'ID', dataIndex: 'id', - ellipsis: true, + ellipsis: true }, { title: '版本号', dataIndex: 'user_version', - ellipsis: true, + ellipsis: true }, { title: '版本描述', dataIndex: 'user_desc', - ellipsis: true, + ellipsis: true }, { title: '提交时间', - dataIndex: 'create_time', + dataIndex: 'create_time' }, { title: '操作', - scopedSlots: { customRender: 'action' }, - }, + scopedSlots: { customRender: 'action' } + } ] export default { name: 'Templatedraftlist', components: { ContentHeader, - STable, + STable }, - data() { + data () { return { // 正在加载 isLoading: false, @@ -72,50 +72,50 @@ export default { list: [], // 查询参数 queryParam: { - type: 0, - }, + type: 0 + } } }, - created() { + created () { // 默认的查询参数 this.fetchData() }, computed: { - rowSelection() { + rowSelection () { return { selectedRowKeys: this.selectedRowKeys, - onChange: this.onSelectChange, + onChange: this.onSelectChange } - }, + } }, methods: { // 选中项发生变化时的回调 - onSelectChange(selectedRowKeys) { + onSelectChange (selectedRowKeys) { this.selectedRowKeys = selectedRowKeys }, // 添加记录 - handleAdd(draft_id) { + handleAdd (draft_id) { const self = this const modal = this.$confirm({ title: '您确定要添加到模板库吗?', content: '添加成功之后,您可以在模板标准库库中查看', - onOk() { + onOk () { return Api.addTotemplate({ draft_id: draft_id }) .then((result) => { self.$message.success(result.message, 1.5) self.handleRefresh() }) .finally(() => modal.destroy()) - }, + } }) }, // 确认搜索 - handleSearch() { + handleSearch () { this.queryParam.type = 1 this.fetchData() }, // 重置搜索表单 - fetchData() { + fetchData () { this.isLoading = true Api.templatedraftlist(this.queryParam) .then((result) => { @@ -124,18 +124,18 @@ export default { .finally(() => (this.isLoading = false)) }, // 重置搜索表单 - handleReset() { + handleReset () { this.searchForm.resetFields() }, /** * 刷新列表 * @param Boolean bool 强制刷新到第一页 */ - handleRefresh(bool = false) { + handleRefresh (bool = false) { this.selectedRowKeys = [] this.fetchData() - }, - }, + } + } }