修改组件
This commit is contained in:
parent
a986369529
commit
c53cb5bbd1
|
|
@ -15,7 +15,8 @@
|
|||
</a-col>
|
||||
<a-col :flex="$mk.config.ui.toolbarFlex">
|
||||
<!-- 工具条 -->
|
||||
<mk-toolbar :isShowAdd="options.disabledAdd !== true" @toolbarClick="toolbarClick"></mk-toolbar>
|
||||
<mk-toolbar :buttons="options.toolbarButtons" :isShowAdd="options.disabledAdd !== true"
|
||||
@toolbarClick="toolbarClick"></mk-toolbar>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
|
|
@ -441,6 +442,7 @@ export default {
|
|||
this.openSettingPage();
|
||||
|
||||
}
|
||||
this.$emit("toolbarClick", e)
|
||||
},
|
||||
openSettingPage() {
|
||||
this.$mk.dialog.open({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<basic-page-list :desc="desc" :options="pageOptions">
|
||||
<basic-page-list :desc="desc" :options="pageOptions" @toolbarClick="toolbarClick">
|
||||
<template v-slot:column1="{ row }">
|
||||
<img v-if="row && row.avatar" :src="row.avatar" style="width: 100px;" />
|
||||
</template>
|
||||
|
|
@ -43,7 +43,9 @@ export default {
|
|||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
toolbarClick(e) {
|
||||
console.log(e)
|
||||
},
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
|
@ -51,6 +53,9 @@ export default {
|
|||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MesStaff',
|
||||
|
||||
toolbarButtons: [
|
||||
{ name: 'aa', label: 'aa' }
|
||||
],
|
||||
addPageUrl: "/MesStaff/MesStaffAdd",
|
||||
editPageUrl: "/MesStaff/MesStaffUpdate/",
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ const view = {
|
|||
tabs: () => import('@/layouts/tabs'),
|
||||
blank: () => import('@/layouts/BlankView'),
|
||||
page: () => import('@/layouts/PageView')
|
||||
}
|
||||
}
|
||||
|
||||
// 路由组件注册
|
||||
const BaseRouterMap = {
|
||||
// 路由组件注册
|
||||
const BaseRouterMap = {
|
||||
login: {
|
||||
authority: '*',
|
||||
path: '/login',
|
||||
|
|
@ -30,7 +30,7 @@ const view = {
|
|||
},
|
||||
workplace: {
|
||||
name: '工作台',
|
||||
path:'/dashboard/workplace',
|
||||
path: '/dashboard/workplace',
|
||||
icon: 'idcard',
|
||||
component: () => import('@/pages/dashboard/workplace')
|
||||
},
|
||||
|
|
@ -59,113 +59,113 @@ const view = {
|
|||
},
|
||||
|
||||
|
||||
components: {
|
||||
name: '小组件',
|
||||
icon: 'appstore-o',
|
||||
component: view.page
|
||||
},
|
||||
taskCard: {
|
||||
name: '任务卡片',
|
||||
component: () => import('@/pages/base/components/TaskCard')
|
||||
},
|
||||
palette: {
|
||||
name: '颜色复选框',
|
||||
component: () => import('@/pages/base/components/Palette')
|
||||
},
|
||||
analysis: {
|
||||
name: '分析页',
|
||||
component: () => import('@/pages/dashboard/analysis')
|
||||
},
|
||||
form: {
|
||||
name: '表单页',
|
||||
icon: 'form',
|
||||
component: view.page
|
||||
},
|
||||
basicForm: {
|
||||
path: 'basic',
|
||||
name: '基础表单',
|
||||
component: () => import('@/pages/base/form/basic')
|
||||
},
|
||||
stepForm: {
|
||||
path: 'step',
|
||||
name: '分步表单',
|
||||
component: () => import('@/pages/base/form/step')
|
||||
},
|
||||
advanceForm: {
|
||||
path: 'advance',
|
||||
name: '高级表单',
|
||||
component: () => import('@/pages/base/form/advance')
|
||||
},
|
||||
list: {
|
||||
name: '列表页',
|
||||
icon: 'table',
|
||||
component: view.page
|
||||
},
|
||||
queryList: {
|
||||
path: 'query',
|
||||
name: '查询表格',
|
||||
component: () => import('@/pages/base/list/QueryList')
|
||||
},
|
||||
primaryList: {
|
||||
path: 'primary',
|
||||
name: '标准列表',
|
||||
component: () => import('@/pages/base/list/StandardList')
|
||||
},
|
||||
cardList: {
|
||||
path: 'card',
|
||||
name: '卡片列表',
|
||||
component: () => import('@/pages/base/list/CardList')
|
||||
},
|
||||
searchList: {
|
||||
path: 'search',
|
||||
name: '搜索列表',
|
||||
component: () => import('@/pages/base/list/search/SearchLayout')
|
||||
},
|
||||
article: {
|
||||
name: '文章',
|
||||
component: () => import('@/pages/base/list/search/ArticleList')
|
||||
},
|
||||
application: {
|
||||
name: '应用',
|
||||
component: () => import('@/pages/base/list/search/ApplicationList')
|
||||
},
|
||||
project: {
|
||||
name: '项目',
|
||||
component: () => import('@/pages/base/list/search/ProjectList')
|
||||
},
|
||||
details: {
|
||||
name: '详情页',
|
||||
icon: 'profile',
|
||||
component: view.blank
|
||||
},
|
||||
basicDetails: {
|
||||
path: 'basic',
|
||||
name: '基础详情页',
|
||||
component: () => import('@/pages/base/detail/BasicDetail')
|
||||
},
|
||||
advanceDetails: {
|
||||
path: 'advance',
|
||||
name: '高级详情页',
|
||||
component: () => import('@/pages/base/detail/AdvancedDetail')
|
||||
},
|
||||
result: {
|
||||
name: '结果页',
|
||||
icon: 'check-circle-o',
|
||||
component: view.page
|
||||
},
|
||||
success: {
|
||||
name: '成功',
|
||||
component: () => import('@/pages/base/result/Success')
|
||||
},
|
||||
error: {
|
||||
name: '失败',
|
||||
component: () => import('@/pages/base/result/Error')
|
||||
},
|
||||
exception: {
|
||||
name: '异常页',
|
||||
icon: 'warning',
|
||||
component: view.blank
|
||||
},
|
||||
// components: {
|
||||
// name: '小组件',
|
||||
// icon: 'appstore-o',
|
||||
// component: view.page
|
||||
// },
|
||||
// taskCard: {
|
||||
// name: '任务卡片',
|
||||
// component: () => import('@/pages/base/components/TaskCard')
|
||||
// },
|
||||
// palette: {
|
||||
// name: '颜色复选框',
|
||||
// component: () => import('@/pages/base/components/Palette')
|
||||
// },
|
||||
// analysis: {
|
||||
// name: '分析页',
|
||||
// component: () => import('@/pages/dashboard/analysis')
|
||||
// },
|
||||
// form: {
|
||||
// name: '表单页',
|
||||
// icon: 'form',
|
||||
// component: view.page
|
||||
// },
|
||||
// basicForm: {
|
||||
// path: 'basic',
|
||||
// name: '基础表单',
|
||||
// component: () => import('@/pages/base/form/basic')
|
||||
// },
|
||||
// stepForm: {
|
||||
// path: 'step',
|
||||
// name: '分步表单',
|
||||
// component: () => import('@/pages/base/form/step')
|
||||
// },
|
||||
// advanceForm: {
|
||||
// path: 'advance',
|
||||
// name: '高级表单',
|
||||
// component: () => import('@/pages/base/form/advance')
|
||||
// },
|
||||
// list: {
|
||||
// name: '列表页',
|
||||
// icon: 'table',
|
||||
// component: view.page
|
||||
// },
|
||||
// queryList: {
|
||||
// path: 'query',
|
||||
// name: '查询表格',
|
||||
// component: () => import('@/pages/base/list/QueryList')
|
||||
// },
|
||||
// primaryList: {
|
||||
// path: 'primary',
|
||||
// name: '标准列表',
|
||||
// component: () => import('@/pages/base/list/StandardList')
|
||||
// },
|
||||
// cardList: {
|
||||
// path: 'card',
|
||||
// name: '卡片列表',
|
||||
// component: () => import('@/pages/base/list/CardList')
|
||||
// },
|
||||
// searchList: {
|
||||
// path: 'search',
|
||||
// name: '搜索列表',
|
||||
// component: () => import('@/pages/base/list/search/SearchLayout')
|
||||
// },
|
||||
// article: {
|
||||
// name: '文章',
|
||||
// component: () => import('@/pages/base/list/search/ArticleList')
|
||||
// },
|
||||
// application: {
|
||||
// name: '应用',
|
||||
// component: () => import('@/pages/base/list/search/ApplicationList')
|
||||
// },
|
||||
// project: {
|
||||
// name: '项目',
|
||||
// component: () => import('@/pages/base/list/search/ProjectList')
|
||||
// },
|
||||
// details: {
|
||||
// name: '详情页',
|
||||
// icon: 'profile',
|
||||
// component: view.blank
|
||||
// },
|
||||
// basicDetails: {
|
||||
// path: 'basic',
|
||||
// name: '基础详情页',
|
||||
// component: () => import('@/pages/base/detail/BasicDetail')
|
||||
// },
|
||||
// advanceDetails: {
|
||||
// path: 'advance',
|
||||
// name: '高级详情页',
|
||||
// component: () => import('@/pages/base/detail/AdvancedDetail')
|
||||
// },
|
||||
// result: {
|
||||
// name: '结果页',
|
||||
// icon: 'check-circle-o',
|
||||
// component: view.page
|
||||
// },
|
||||
// success: {
|
||||
// name: '成功',
|
||||
// component: () => import('@/pages/base/result/Success')
|
||||
// },
|
||||
// error: {
|
||||
// name: '失败',
|
||||
// component: () => import('@/pages/base/result/Error')
|
||||
// },
|
||||
// exception: {
|
||||
// name: '异常页',
|
||||
// icon: 'warning',
|
||||
// component: view.blank
|
||||
// },
|
||||
|
||||
//================================================================================================================================
|
||||
// 以上为自动生成的路由,以下为手动添加的路由
|
||||
|
|
@ -180,30 +180,30 @@ const view = {
|
|||
// 以下为项目的路由
|
||||
//================================================================================================================================
|
||||
|
||||
TouchMesReporting : {
|
||||
TouchMesReporting: {
|
||||
name: '报工',
|
||||
path: '/touch/mesreporting',
|
||||
component: () => import('@/pages/Middle/Mes/MesReporting/MesReporting')
|
||||
},
|
||||
TouchMoldHome : {
|
||||
TouchMoldHome: {
|
||||
name: '触摸屏首页',
|
||||
path: '/touch/moldhome',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
|
||||
},
|
||||
TouchMoldReporting : {
|
||||
TouchMoldReporting: {
|
||||
name: '报工',
|
||||
path: '/touch/moldreporting',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
|
||||
},
|
||||
TouchMoldSend : {
|
||||
TouchMoldSend: {
|
||||
name: '发料',
|
||||
path: '/touch/moldsend',
|
||||
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(BaseRouterMap)
|
||||
|
||||
export default BaseRouterMap
|
||||
export default BaseRouterMap
|
||||
|
|
@ -37,7 +37,7 @@ function parseRoutes(routesConfig, routerMap) { // 解析路由
|
|||
router = routerMap[item] // 从 routerMap 中获取路由
|
||||
routeCfg = { path: (router && router.path) || item, router: item } // 路由配置获取路由的 path 和 router
|
||||
} else if (typeof item === 'object') { // 如果路由配置是对象
|
||||
if(!item.router){
|
||||
if (!item.router) {
|
||||
return;
|
||||
}
|
||||
router = routerMap[item.router] // 从 routerMap 中获取路由
|
||||
|
|
@ -196,7 +196,7 @@ function loadRoutes(routesConfig) { // 加载路由
|
|||
// console.log("=================routesConfig:", routesconfig)
|
||||
if (!routesconfig) {
|
||||
return;
|
||||
}else{
|
||||
} else {
|
||||
routesConfig = routesconfig
|
||||
}
|
||||
}
|
||||
|
|
@ -229,7 +229,6 @@ function loadRoutes(routesConfig) { // 加载路由
|
|||
formatRoutes(finalRoutes)
|
||||
|
||||
router.options = { ...router.options, routes: finalRoutes } // 路由配置
|
||||
|
||||
router.matcher = new Router({ ...router.options, routes: [] }).matcher // 重置路由
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue