构建框架
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import API from "@/api";
|
||||
|
||||
//文件选择器配置
|
||||
|
||||
export default {
|
||||
apiObj: API.common.upload,
|
||||
menuApiObj: API.common.file.menu,
|
||||
listApiObj: API.common.file.list,
|
||||
successCode: 200,
|
||||
maxSize: 30,
|
||||
max: 99,
|
||||
uploadParseData: function (res) {
|
||||
return {
|
||||
id: res.data.id,
|
||||
fileName: res.data.fileName,
|
||||
url: res.data.src
|
||||
}
|
||||
},
|
||||
listParseData: function (res) {
|
||||
return {
|
||||
rows: res.data.rows,
|
||||
total: res.data.total,
|
||||
msg: res.message,
|
||||
code: res.code
|
||||
}
|
||||
},
|
||||
request: {
|
||||
page: 'page',
|
||||
pageSize: 'pageSize',
|
||||
keyword: 'keyword',
|
||||
menuKey: 'groupId'
|
||||
},
|
||||
menuProps: {
|
||||
key: 'id',
|
||||
label: 'label',
|
||||
children: 'children'
|
||||
},
|
||||
fileProps: {
|
||||
key: 'id',
|
||||
fileName: 'fileName',
|
||||
url: 'url'
|
||||
},
|
||||
files: {
|
||||
doc: {
|
||||
icon: 'sc-icon-file-word-2-fill',
|
||||
color: '#409eff'
|
||||
},
|
||||
docx: {
|
||||
icon: 'sc-icon-file-word-2-fill',
|
||||
color: '#409eff'
|
||||
},
|
||||
xls: {
|
||||
icon: 'sc-icon-file-excel-2-fill',
|
||||
color: '#67C23A'
|
||||
},
|
||||
xlsx: {
|
||||
icon: 'sc-icon-file-excel-2-fill',
|
||||
color: '#67C23A'
|
||||
},
|
||||
ppt: {
|
||||
icon: 'sc-icon-file-ppt-2-fill',
|
||||
color: '#F56C6C'
|
||||
},
|
||||
pptx: {
|
||||
icon: 'sc-icon-file-ppt-2-fill',
|
||||
color: '#F56C6C'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
export default {
|
||||
//运算符
|
||||
operator: [
|
||||
{
|
||||
label: '等于',
|
||||
value: '=',
|
||||
},
|
||||
{
|
||||
label: '不等于',
|
||||
value: '!=',
|
||||
},
|
||||
{
|
||||
label: '大于',
|
||||
value: '>',
|
||||
},
|
||||
{
|
||||
label: '大于等于',
|
||||
value: '>=',
|
||||
},
|
||||
{
|
||||
label: '小于',
|
||||
value: '<',
|
||||
},
|
||||
{
|
||||
label: '小于等于',
|
||||
value: '<=',
|
||||
},
|
||||
{
|
||||
label: '包含',
|
||||
value: 'include',
|
||||
},
|
||||
{
|
||||
label: '不包含',
|
||||
value: 'notinclude',
|
||||
}
|
||||
],
|
||||
//过滤结果运算符的分隔符
|
||||
separator: '|',
|
||||
//获取我的常用
|
||||
getMy: function (name) {
|
||||
return new Promise((resolve) => {
|
||||
console.log(`这里可以根据${name}参数请求接口`)
|
||||
var list = []
|
||||
setTimeout(()=>{
|
||||
resolve(list)
|
||||
},500)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 常用保存处理 返回resolve后继续操作
|
||||
* @name scFilterBar组件的props->filterName
|
||||
* @obj 过滤项整理好的对象
|
||||
*/
|
||||
saveMy: function (name, obj) {
|
||||
return new Promise((resolve) => {
|
||||
console.log(name, obj)
|
||||
setTimeout(()=>{
|
||||
resolve(true)
|
||||
},500)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 常用删除处理 返回resolve后继续操作
|
||||
* @name scFilterBar组件的props->filterName
|
||||
*/
|
||||
delMy: function (name) {
|
||||
return new Promise((resolve) => {
|
||||
console.log(name)
|
||||
setTimeout(()=>{
|
||||
resolve(true)
|
||||
},500)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
//图标选择器配置
|
||||
export default {
|
||||
icons: [{
|
||||
name: '默认',
|
||||
icons: [
|
||||
"el-icon-add-location",
|
||||
"el-icon-aim",
|
||||
"el-icon-alarm-clock",
|
||||
"el-icon-apple",
|
||||
"el-icon-arrow-down",
|
||||
"el-icon-arrow-down-bold",
|
||||
"el-icon-arrow-left",
|
||||
"el-icon-arrow-left-bold",
|
||||
"el-icon-arrow-right",
|
||||
"el-icon-arrow-right-bold",
|
||||
"el-icon-arrow-up",
|
||||
"el-icon-arrow-up-bold",
|
||||
"el-icon-avatar",
|
||||
"el-icon-back",
|
||||
"el-icon-baseball",
|
||||
"el-icon-basketball",
|
||||
"el-icon-bell",
|
||||
"el-icon-bell-filled",
|
||||
"el-icon-bicycle",
|
||||
"el-icon-bottom",
|
||||
"el-icon-bottom-left",
|
||||
"el-icon-bottom-right",
|
||||
"el-icon-bowl",
|
||||
"el-icon-box",
|
||||
"el-icon-briefcase",
|
||||
"el-icon-brush",
|
||||
"el-icon-brush-filled",
|
||||
"el-icon-burger",
|
||||
"el-icon-calendar",
|
||||
"el-icon-camera",
|
||||
"el-icon-camera-filled",
|
||||
"el-icon-caret-bottom",
|
||||
"el-icon-caret-left",
|
||||
"el-icon-caret-right",
|
||||
"el-icon-caret-top",
|
||||
"el-icon-cellphone",
|
||||
"el-icon-chat-dot-round",
|
||||
"el-icon-chat-dot-square",
|
||||
"el-icon-chat-line-round",
|
||||
"el-icon-chat-line-square",
|
||||
"el-icon-chat-round",
|
||||
"el-icon-chat-square",
|
||||
"el-icon-check",
|
||||
"el-icon-checked",
|
||||
"el-icon-cherry",
|
||||
"el-icon-chicken",
|
||||
"el-icon-circle-check",
|
||||
"el-icon-circle-check-filled",
|
||||
"el-icon-circle-close",
|
||||
"el-icon-circle-close-filled",
|
||||
"el-icon-circle-plus",
|
||||
"el-icon-circle-plus-filled",
|
||||
"el-icon-clock",
|
||||
"el-icon-close",
|
||||
"el-icon-close-bold",
|
||||
"el-icon-cloudy",
|
||||
"el-icon-coffee",
|
||||
"el-icon-coffee-cup",
|
||||
"el-icon-coin",
|
||||
"el-icon-cold-drink",
|
||||
"el-icon-collection",
|
||||
"el-icon-collection-tag",
|
||||
"el-icon-comment",
|
||||
"el-icon-compass",
|
||||
"el-icon-connection",
|
||||
"el-icon-coordinate",
|
||||
"el-icon-copy-document",
|
||||
"el-icon-cpu",
|
||||
"el-icon-credit-card",
|
||||
"el-icon-crop",
|
||||
"el-icon-d-arrow-left",
|
||||
"el-icon-d-arrow-right",
|
||||
"el-icon-d-caret",
|
||||
"el-icon-data-analysis",
|
||||
"el-icon-data-board",
|
||||
"el-icon-data-line",
|
||||
"el-icon-delete",
|
||||
"el-icon-delete-filled",
|
||||
"el-icon-delete-location",
|
||||
"el-icon-dessert",
|
||||
"el-icon-discount",
|
||||
"el-icon-dish",
|
||||
"el-icon-dish-dot",
|
||||
"el-icon-document",
|
||||
"el-icon-document-add",
|
||||
"el-icon-document-checked",
|
||||
"el-icon-document-copy",
|
||||
"el-icon-document-delete",
|
||||
"el-icon-document-remove",
|
||||
"el-icon-download",
|
||||
"el-icon-drizzling",
|
||||
"el-icon-edit",
|
||||
"el-icon-edit-pen",
|
||||
"el-icon-eleme",
|
||||
"el-icon-eleme-filled",
|
||||
"el-icon-element-plus",
|
||||
"el-icon-expand",
|
||||
"el-icon-failed",
|
||||
"el-icon-female",
|
||||
"el-icon-files",
|
||||
"el-icon-film",
|
||||
"el-icon-filter",
|
||||
"el-icon-finished",
|
||||
"el-icon-first-aid-kit",
|
||||
"el-icon-flag",
|
||||
"el-icon-fold",
|
||||
"el-icon-folder",
|
||||
"el-icon-folder-add",
|
||||
"el-icon-folder-checked",
|
||||
"el-icon-folder-delete",
|
||||
"el-icon-folder-opened",
|
||||
"el-icon-folder-remove",
|
||||
"el-icon-food",
|
||||
"el-icon-football",
|
||||
"el-icon-fork-spoon",
|
||||
"el-icon-fries",
|
||||
"el-icon-full-screen",
|
||||
"el-icon-goblet",
|
||||
"el-icon-goblet-full",
|
||||
"el-icon-goblet-square",
|
||||
"el-icon-goblet-square-full",
|
||||
"el-icon-goods",
|
||||
"el-icon-goods-filled",
|
||||
"el-icon-grape",
|
||||
"el-icon-grid",
|
||||
"el-icon-guide",
|
||||
"el-icon-headset",
|
||||
"el-icon-help",
|
||||
"el-icon-help-filled",
|
||||
"el-icon-hide",
|
||||
"el-icon-histogram",
|
||||
"el-icon-home-filled",
|
||||
"el-icon-hot-water",
|
||||
"el-icon-house",
|
||||
"el-icon-ice-cream",
|
||||
"el-icon-ice-cream-round",
|
||||
"el-icon-ice-cream-square",
|
||||
"el-icon-ice-drink",
|
||||
"el-icon-ice-tea",
|
||||
"el-icon-info-filled",
|
||||
"el-icon-iphone",
|
||||
"el-icon-key",
|
||||
"el-icon-knife-fork",
|
||||
"el-icon-lightning",
|
||||
"el-icon-link",
|
||||
"el-icon-list",
|
||||
"el-icon-loading",
|
||||
"el-icon-location",
|
||||
"el-icon-location-filled",
|
||||
"el-icon-location-information",
|
||||
"el-icon-lock",
|
||||
"el-icon-lollipop",
|
||||
"el-icon-magic-stick",
|
||||
"el-icon-magnet",
|
||||
"el-icon-male",
|
||||
"el-icon-management",
|
||||
"el-icon-map-location",
|
||||
"el-icon-medal",
|
||||
"el-icon-menu",
|
||||
"el-icon-message",
|
||||
"el-icon-message-box",
|
||||
"el-icon-mic",
|
||||
"el-icon-microphone",
|
||||
"el-icon-milk-tea",
|
||||
"el-icon-minus",
|
||||
"el-icon-money",
|
||||
"el-icon-monitor",
|
||||
"el-icon-moon",
|
||||
"el-icon-moon-night",
|
||||
"el-icon-more",
|
||||
"el-icon-more-filled",
|
||||
"el-icon-mostly-cloudy",
|
||||
"el-icon-mouse",
|
||||
"el-icon-mug",
|
||||
"el-icon-mute",
|
||||
"el-icon-mute-notification",
|
||||
"el-icon-no-smoking",
|
||||
"el-icon-notebook",
|
||||
"el-icon-notification",
|
||||
"el-icon-odometer",
|
||||
"el-icon-office-building",
|
||||
"el-icon-open",
|
||||
"el-icon-operation",
|
||||
"el-icon-opportunity",
|
||||
"el-icon-orange",
|
||||
"el-icon-paperclip",
|
||||
"el-icon-partly-cloudy",
|
||||
"el-icon-pear",
|
||||
"el-icon-phone",
|
||||
"el-icon-phone-filled",
|
||||
"el-icon-picture",
|
||||
"el-icon-picture-filled",
|
||||
"el-icon-picture-rounded",
|
||||
"el-icon-pie-chart",
|
||||
"el-icon-place",
|
||||
"el-icon-platform",
|
||||
"el-icon-plus",
|
||||
"el-icon-pointer",
|
||||
"el-icon-position",
|
||||
"el-icon-postcard",
|
||||
"el-icon-pouring",
|
||||
"el-icon-present",
|
||||
"el-icon-price-tag",
|
||||
"el-icon-printer",
|
||||
"el-icon-promotion",
|
||||
"el-icon-question-filled",
|
||||
"el-icon-rank",
|
||||
"el-icon-reading",
|
||||
"el-icon-reading-lamp",
|
||||
"el-icon-refresh",
|
||||
"el-icon-refresh-left",
|
||||
"el-icon-refresh-right",
|
||||
"el-icon-refrigerator",
|
||||
"el-icon-remove",
|
||||
"el-icon-remove-filled",
|
||||
"el-icon-right",
|
||||
"el-icon-scale-to-original",
|
||||
"el-icon-school",
|
||||
"el-icon-scissor",
|
||||
"el-icon-search",
|
||||
"el-icon-select",
|
||||
"el-icon-sell",
|
||||
"el-icon-semi-select",
|
||||
"el-icon-service",
|
||||
"el-icon-set-up",
|
||||
"el-icon-setting",
|
||||
"el-icon-share",
|
||||
"el-icon-ship",
|
||||
"el-icon-shop",
|
||||
"el-icon-shopping-bag",
|
||||
"el-icon-shopping-cart",
|
||||
"el-icon-shopping-cart-full",
|
||||
"el-icon-smoking",
|
||||
"el-icon-soccer",
|
||||
"el-icon-sold-out",
|
||||
"el-icon-sort",
|
||||
"el-icon-sort-down",
|
||||
"el-icon-sort-up",
|
||||
"el-icon-stamp",
|
||||
"el-icon-star",
|
||||
"el-icon-star-filled",
|
||||
"el-icon-stopwatch",
|
||||
"el-icon-success-filled",
|
||||
"el-icon-sugar",
|
||||
"el-icon-suitcase",
|
||||
"el-icon-sunny",
|
||||
"el-icon-sunrise",
|
||||
"el-icon-sunset",
|
||||
"el-icon-switch",
|
||||
"el-icon-switch-button",
|
||||
"el-icon-takeaway-box",
|
||||
"el-icon-ticket",
|
||||
"el-icon-tickets",
|
||||
"el-icon-timer",
|
||||
"el-icon-toilet-paper",
|
||||
"el-icon-tools",
|
||||
"el-icon-top",
|
||||
"el-icon-top-left",
|
||||
"el-icon-top-right",
|
||||
"el-icon-trend-charts",
|
||||
"el-icon-trophy",
|
||||
"el-icon-turn-off",
|
||||
"el-icon-umbrella",
|
||||
"el-icon-unlock",
|
||||
"el-icon-upload",
|
||||
"el-icon-upload-filled",
|
||||
"el-icon-user",
|
||||
"el-icon-user-filled",
|
||||
"el-icon-van",
|
||||
"el-icon-video-camera",
|
||||
"el-icon-video-camera-filled",
|
||||
"el-icon-video-pause",
|
||||
"el-icon-video-play",
|
||||
"el-icon-view",
|
||||
"el-icon-wallet",
|
||||
"el-icon-wallet-filled",
|
||||
"el-icon-warning",
|
||||
"el-icon-warning-filled",
|
||||
"el-icon-watch",
|
||||
"el-icon-watermelon",
|
||||
"el-icon-wind-power",
|
||||
"el-icon-zoom-in",
|
||||
"el-icon-zoom-out"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '扩展',
|
||||
icons: [
|
||||
'sc-icon-vue',
|
||||
'sc-icon-code',
|
||||
'sc-icon-wechat',
|
||||
'sc-icon-bug-fill',
|
||||
'sc-icon-bug-line',
|
||||
'sc-icon-file-word',
|
||||
'sc-icon-file-excel',
|
||||
'sc-icon-file-ppt',
|
||||
'sc-icon-organization',
|
||||
'sc-icon-upload',
|
||||
'sc-icon-download'
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
const DEFAULT_CONFIG = {
|
||||
//标题
|
||||
APP_NAME: process.env.VUE_APP_TITLE,
|
||||
|
||||
//首页地址
|
||||
DASHBOARD_URL: "/dashboard",
|
||||
|
||||
//版本号
|
||||
APP_VER: "1.6.9",
|
||||
|
||||
//内核版本号
|
||||
CORE_VER: "1.6.9",
|
||||
|
||||
//接口地址
|
||||
API_URL:
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.VUE_APP_API_BASEURL
|
||||
: process.env.VUE_APP_API_DEV,
|
||||
|
||||
//WS接口地址
|
||||
WS_URL:
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.VUE_APP_WS_URL
|
||||
: process.env.VUE_APP_WSS_URL,
|
||||
|
||||
//请求超时
|
||||
TIMEOUT: 10000,
|
||||
|
||||
//TokenName
|
||||
TOKEN_NAME: "Authorization",
|
||||
|
||||
//Token前缀,注意最后有个空格,如不需要需设置空字符串
|
||||
TOKEN_PREFIX: "Bearer ",
|
||||
|
||||
//追加其他头
|
||||
HEADERS: {},
|
||||
|
||||
//请求是否开启缓存
|
||||
REQUEST_CACHE: false,
|
||||
|
||||
//布局 默认:default | 通栏:header | 经典:menu | 功能坞:dock
|
||||
//dock将关闭标签和面包屑栏
|
||||
LAYOUT: "default",
|
||||
|
||||
//菜单是否折叠
|
||||
MENU_IS_COLLAPSE: false,
|
||||
|
||||
//菜单是否启用手风琴效果
|
||||
MENU_UNIQUE_OPENED: false,
|
||||
|
||||
//是否开启多标签
|
||||
LAYOUT_TAGS: true,
|
||||
|
||||
//语言
|
||||
LANG: "zh-cn",
|
||||
|
||||
//主题颜色
|
||||
COLOR: "",
|
||||
|
||||
//是否加密localStorage, 为空不加密,可填写AES(模式ECB,移位Pkcs7)加密
|
||||
LS_ENCRYPTION: "",
|
||||
|
||||
//localStorageAES加密秘钥,位数建议填写8的倍数
|
||||
LS_ENCRYPTION_key: "2XNN4K8LC0ELVWN4",
|
||||
|
||||
//控制台首页默认布局
|
||||
DEFAULT_GRID: {
|
||||
//默认分栏数量和宽度 例如 [24] [18,6] [8,8,8] [6,12,6]
|
||||
layout: [12, 6, 6],
|
||||
//小组件分布,com取值:views/home/components 文件名
|
||||
copmsList: [["welcome"], ["about", "ver"], ["time", "progress"]],
|
||||
},
|
||||
};
|
||||
|
||||
//合并业务配置
|
||||
import MY_CONFIG from "./myConfig";
|
||||
Object.assign(DEFAULT_CONFIG, MY_CONFIG);
|
||||
|
||||
// 如果生产模式,就合并动态的APP_CONFIG
|
||||
// public/config.js
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
Object.assign(DEFAULT_CONFIG, APP_CONFIG);
|
||||
}
|
||||
|
||||
export default DEFAULT_CONFIG;
|
||||
@@ -0,0 +1,10 @@
|
||||
//业务配置
|
||||
//会合并至this.$CONFIG
|
||||
//生产模式 public/config.js 同名key会覆盖这里的配置从而实现打包后的热更新
|
||||
//为避免和SCUI框架配置混淆建议添加前缀 MY_
|
||||
//全局可使用 this.$CONFIG.MY_KEY 访问
|
||||
|
||||
export default {
|
||||
//是否显示第三方授权登录
|
||||
MY_SHOW_LOGIN_OAUTH: true
|
||||
}
|
||||
@@ -0,0 +1,728 @@
|
||||
// 静态路由配置
|
||||
// 书写格式与动态路由格式一致,全部经由框架统一转换
|
||||
// 比较动态路由在meta中多加入了role角色权限,为数组类型。一个菜单是否有权限显示,取决于它以及后代菜单是否有权限。
|
||||
// routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
|
||||
// 示例如下
|
||||
|
||||
const routes = [
|
||||
{
|
||||
name: "home",
|
||||
path: "/home",
|
||||
meta: {
|
||||
icon: "sc-icon-Home",
|
||||
title: "首页",
|
||||
},
|
||||
children: [{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
component: "home",
|
||||
meta: {
|
||||
icon: "sc-icon-Console",
|
||||
title: "控制台",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "个人信息",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "文档管理",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "预警管理",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "我的邮件",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "order",
|
||||
path: "/order",
|
||||
meta: {
|
||||
icon: "sc-icon-Home",
|
||||
title: "维保工单",
|
||||
},
|
||||
children: [{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
component: "home",
|
||||
meta: {
|
||||
icon: "sc-icon-Console",
|
||||
title: "维保工单",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "维保计划",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "数据确认",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "stock",
|
||||
path: "/stock",
|
||||
meta: {
|
||||
icon: "sc-icon-Home",
|
||||
title: "库存管理",
|
||||
},
|
||||
children: [{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
component: "home",
|
||||
meta: {
|
||||
icon: "sc-icon-Console",
|
||||
title: "库存列表",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "库存统计",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "出入记录",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "sell",
|
||||
path: "/sell",
|
||||
meta: {
|
||||
icon: "sc-icon-Home",
|
||||
title: "出货管理",
|
||||
},
|
||||
children: [{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
component: "home",
|
||||
meta: {
|
||||
icon: "sc-icon-Console",
|
||||
title: "出货清单",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "出货统计",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "数据确认",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "finance",
|
||||
path: "/finance",
|
||||
meta: {
|
||||
icon: "sc-icon-Home",
|
||||
title: "财务管理",
|
||||
},
|
||||
children: [{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
component: "home",
|
||||
meta: {
|
||||
icon: "sc-icon-Console",
|
||||
title: "费用成本",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "成本汇总",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "report",
|
||||
path: "/report",
|
||||
meta: {
|
||||
icon: "sc-icon-Home",
|
||||
title: "报表统计",
|
||||
},
|
||||
children: [{
|
||||
name: "dashboard",
|
||||
path: "/dashboard",
|
||||
component: "home",
|
||||
meta: {
|
||||
icon: "sc-icon-Console",
|
||||
title: "维保报表",
|
||||
}
|
||||
},{
|
||||
name: "usercenter",
|
||||
path: "/usercenter",
|
||||
component: "userCenter",
|
||||
meta: {
|
||||
icon: "sc-icon-UserInfo",
|
||||
title: "出货报表",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "setting",
|
||||
path: "/setting",
|
||||
meta: {
|
||||
icon: "sc-icon-Setup",
|
||||
title: "系统设置",
|
||||
},
|
||||
children: [{
|
||||
name: "system",
|
||||
path: "/setting/system",
|
||||
component: "setting/system",
|
||||
meta: {
|
||||
icon: "sc-icon-System",
|
||||
title: "系统设置",
|
||||
}
|
||||
},{
|
||||
name: "user",
|
||||
path: "/setting/user",
|
||||
component: "setting/user",
|
||||
meta: {
|
||||
icon: "sc-icon-UserManage",
|
||||
title: "用户管理",
|
||||
}
|
||||
},{
|
||||
name: "role",
|
||||
path: "/setting/role",
|
||||
component: "setting/role",
|
||||
meta: {
|
||||
icon: "sc-icon-RoleManage",
|
||||
title: "角色管理",
|
||||
}
|
||||
},{
|
||||
name: "dept",
|
||||
path: "/setting/dept",
|
||||
component: "setting/dept",
|
||||
meta: {
|
||||
icon: "sc-icon-DeptManage",
|
||||
title: "部门管理",
|
||||
}
|
||||
},{
|
||||
name: "log",
|
||||
path: "/setting/log",
|
||||
component: "setting/log",
|
||||
meta: {
|
||||
icon: "sc-icon-Log",
|
||||
title: "系统日志",
|
||||
}
|
||||
},{
|
||||
name: "client",
|
||||
path: "/setting/client",
|
||||
component: "setting/client",
|
||||
meta: {
|
||||
icon: "sc-icon-Application",
|
||||
title: "应用管理",
|
||||
}
|
||||
},{
|
||||
name: "dic",
|
||||
path: "/setting/dic",
|
||||
component: "setting/dic",
|
||||
meta: {
|
||||
icon: "sc-icon-Dictionary",
|
||||
title: "字典管理",
|
||||
}
|
||||
},{
|
||||
name: "menu",
|
||||
path: "/setting/menu",
|
||||
component: "setting/menu",
|
||||
meta: {
|
||||
icon: "sc-icon-MenuManage",
|
||||
title: "菜单管理",
|
||||
}
|
||||
},{
|
||||
name: "table",
|
||||
path: "/setting/table",
|
||||
component: "setting/table",
|
||||
meta: {
|
||||
icon: "sc-icon-TableManage",
|
||||
title: "表格管理",
|
||||
}
|
||||
},{
|
||||
name: "task",
|
||||
path: "/setting/task",
|
||||
component: "setting/task",
|
||||
meta: {
|
||||
icon: "sc-icon-TaskManage",
|
||||
title: "任务管理",
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "other",
|
||||
path: "/other",
|
||||
meta: {
|
||||
icon: "sc-icon-Other",
|
||||
title: "其他",
|
||||
hidden:true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "about",
|
||||
path: "/other/about",
|
||||
component: "other/about",
|
||||
meta: {
|
||||
icon: "sc-icon-AboutSet",
|
||||
title: "关于设置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "directive",
|
||||
path: "/other/directive",
|
||||
component: "other/directive",
|
||||
meta: {
|
||||
icon: "sc-icon-Instruct",
|
||||
title: "指令设置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "fullpage",
|
||||
path: "/other/fullpage",
|
||||
component: "other/fullpage",
|
||||
meta: {
|
||||
icon: "sc-icon-Page",
|
||||
title: "页面设置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "loadJS",
|
||||
path: "/other/loadJS",
|
||||
component: "other/loadJS",
|
||||
meta: {
|
||||
icon: "sc-icon-Loading",
|
||||
title: "加载设置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "verificate",
|
||||
path: "/other/verificate",
|
||||
component: "other/verificate",
|
||||
meta: {
|
||||
icon: "sc-icon-Authentication",
|
||||
title: "认证设置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "viewTags",
|
||||
path: "/other/viewTags",
|
||||
component: "other/viewTags",
|
||||
meta: {
|
||||
icon: "sc-icon-Tags",
|
||||
title: "切换设置",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "template",
|
||||
path: "/template",
|
||||
meta: {
|
||||
icon: "sc-icon-TemplateTest",
|
||||
title: "模版",
|
||||
hidden:true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "son",
|
||||
path: "/template/list/son",
|
||||
component: "template/list/son",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "列表管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "tab",
|
||||
path: "/template/list/tab",
|
||||
component: "template/list/tab",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "模块管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "tree",
|
||||
path: "/template/list/tree",
|
||||
component: "template/list/tree",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "树块管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "width",
|
||||
path: "/template/list/width",
|
||||
component: "template/list/width",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "宽度管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "other",
|
||||
path: "/template/other/stepform",
|
||||
component: "template/other/stepform",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "步骤管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "blank",
|
||||
path: "/template/layout/blank",
|
||||
component: "template/layout/blank",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "空白管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "layoutLCR",
|
||||
path: "/template/layout/layout-lcr",
|
||||
component: "template/layout/layoutLCR",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "模块lcr管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "layoutTCB",
|
||||
path: "/template/layout/layout-tcb",
|
||||
component: "template/layout/layoutTCB",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "模块tcb管理",
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "vab",
|
||||
path: "/vab",
|
||||
meta: {
|
||||
icon: "sc-icon-Function",
|
||||
title: "功能",
|
||||
hidden:true
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name:"chart",
|
||||
path: "/vab/chart",
|
||||
component: "vab/chart",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "图表管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"codeeditor",
|
||||
path: "/vab/codeeditor",
|
||||
component: "vab/codeeditor",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "编辑管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"contextmenu",
|
||||
path: "/vab/contextmenu",
|
||||
component: "vab/contextmenu",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "菜单管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"cron",
|
||||
path: "/vab/cron",
|
||||
component: "vab/cron",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "时间规则",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"cropper",
|
||||
path: "/vab/cropper",
|
||||
component: "vab/cropper",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "图片裁剪",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"drag",
|
||||
path: "/vab/drag",
|
||||
component: "vab/drag",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "拖拽管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"editor",
|
||||
path: "/vab/editor",
|
||||
component: "vab/editor",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "编辑器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"fileselect",
|
||||
path: "/vab/fileselect",
|
||||
component: "vab/fileselect",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "文件选择器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"filterBar",
|
||||
path: "/vab/filterBar",
|
||||
component: "vab/filterBar",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "过滤器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"form",
|
||||
path: "/vab/form",
|
||||
component: "vab/form",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "提交表格",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"formtable",
|
||||
path: "/vab/formtable",
|
||||
component: "vab/formtable",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "表格切换",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"iconfont",
|
||||
path: "/vab/iconfont",
|
||||
component: "vab/iconfont",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "图标",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"iconselect",
|
||||
path: "/vab/iconselect",
|
||||
component: "vab/iconselect",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "图标选择",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"importexport",
|
||||
path: "/vab/importexport",
|
||||
component: "vab/importexport",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "导入管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"mini",
|
||||
path: "/vab/mini",
|
||||
component: "vab/mini",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "迷你器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"print",
|
||||
path: "/vab/print",
|
||||
component: "vab/print",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "打印管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"qrcode",
|
||||
path: "/vab/qrcode",
|
||||
component: "vab/qrcode",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "二维码",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"select",
|
||||
path: "/vab/select",
|
||||
component: "vab/select",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "选择器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"selectFilter",
|
||||
path: "/vab/selectFilter",
|
||||
component: "vab/selectFilter",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "选择过滤器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"statistic",
|
||||
path: "/vab/statistic",
|
||||
component: "vab/statistic",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "合计卡片",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"tableselect",
|
||||
path: "/vab/tableselect",
|
||||
component: "vab/tableselect",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "表格选择器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"upload",
|
||||
path: "/vab/upload",
|
||||
component: "vab/upload",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "上传器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"video",
|
||||
path: "/vab/video",
|
||||
component: "vab/video",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "视频器",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"watermark",
|
||||
path: "/vab/watermark",
|
||||
component: "vab/watermark",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "水印",
|
||||
}
|
||||
},
|
||||
{
|
||||
name:"workflow",
|
||||
path: "/vab/workflow",
|
||||
component: "vab/workflow",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "审核流程",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "dialog",
|
||||
path: "/vab/dialog/index",
|
||||
component: "vab/dialog/index",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "弹窗管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "base",
|
||||
path: "/vab/table/base",
|
||||
component: "vab/table/base",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "表格管理",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "column",
|
||||
path: "/vab/table/column",
|
||||
component: "vab/table/column",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "列配置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "remote",
|
||||
path: "/vab/table/remote",
|
||||
component: "vab/table/remote",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "远程配置",
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "thead",
|
||||
path: "/vab/table/thead",
|
||||
component: "vab/table/thead",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "表头配置",
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
// const routes = []
|
||||
|
||||
export default routes;
|
||||
@@ -0,0 +1,21 @@
|
||||
import API from "@/api";
|
||||
|
||||
//字典选择器配置
|
||||
|
||||
export default {
|
||||
dicApiObj: API.system.dic.get, //获取字典接口对象
|
||||
parseData: function (res) {
|
||||
return {
|
||||
data: res.data, //分析行数据字段结构
|
||||
msg: res.message, //分析描述字段结构
|
||||
code: res.code //分析状态字段结构
|
||||
}
|
||||
},
|
||||
request: {
|
||||
name: 'name' //规定搜索字段
|
||||
},
|
||||
props: {
|
||||
label: 'label', //映射label显示字段
|
||||
value: 'value', //映射value值字段
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
//数据表格配置
|
||||
|
||||
import tool from '@/utils/tool'
|
||||
|
||||
export default {
|
||||
successCode: 200, //请求完成代码
|
||||
pageSize: 20, //表格每一页条数
|
||||
pageSizes: [10, 20, 30, 40, 50], //表格可设置的一页条数
|
||||
paginationLayout: "total, sizes, prev, pager, next, jumper", //表格分页布局,可设置"total, sizes, prev, pager, next, jumper"
|
||||
parseData: function (res) { //数据分析
|
||||
return {
|
||||
data: res.data, //分析无分页的数据字段结构
|
||||
rows: res.data.rows, //分析行数据字段结构
|
||||
total: res.data.total, //分析总数字段结构
|
||||
summary: res.data.summary, //分析合计行字段结构
|
||||
msg: res.message, //分析描述字段结构
|
||||
code: res.code //分析状态字段结构
|
||||
}
|
||||
},
|
||||
request: { //请求规定字段
|
||||
page: 'page', //规定当前分页字段
|
||||
pageSize: 'pageSize', //规定一页条数字段
|
||||
prop: 'prop', //规定排序字段名字段
|
||||
order: 'order' //规定排序规格字段
|
||||
},
|
||||
/**
|
||||
* 自定义列保存处理
|
||||
* @tableName scTable组件的props->tableName
|
||||
* @column 用户配置好的列
|
||||
*/
|
||||
columnSettingSave: function (tableName, column) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(()=>{
|
||||
//这里为了演示使用了session和setTimeout演示,开发时应用数据请求
|
||||
tool.session.set(tableName, column)
|
||||
resolve(true)
|
||||
},1000)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取自定义列
|
||||
* @tableName scTable组件的props->tableName
|
||||
* @column 组件接受到的props->column
|
||||
*/
|
||||
columnSettingGet: function (tableName, column) {
|
||||
return new Promise((resolve) => {
|
||||
//这里为了演示使用了session和setTimeout演示,开发时应用数据请求
|
||||
const userColumn = tool.session.get(tableName)
|
||||
if(userColumn){
|
||||
resolve(userColumn)
|
||||
}else{
|
||||
resolve(column)
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 重置自定义列
|
||||
* @tableName scTable组件的props->tableName
|
||||
* @column 组件接受到的props->column
|
||||
*/
|
||||
columnSettingReset: function (tableName, column) {
|
||||
return new Promise((resolve) => {
|
||||
//这里为了演示使用了session和setTimeout演示,开发时应用数据请求
|
||||
setTimeout(()=>{
|
||||
tool.session.remove(tableName)
|
||||
resolve(column)
|
||||
},1000)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
//表格选择器配置
|
||||
|
||||
export default {
|
||||
pageSize: 20, //表格每一页条数
|
||||
parseData: function (res) {
|
||||
return {
|
||||
data: res.data,
|
||||
rows: res.data.rows, //分析行数据字段结构
|
||||
total: res.data.total, //分析总数字段结构
|
||||
msg: res.message, //分析描述字段结构
|
||||
code: res.code //分析状态字段结构
|
||||
}
|
||||
},
|
||||
request: {
|
||||
page: 'page', //规定当前分页字段
|
||||
pageSize: 'pageSize', //规定一页条数字段
|
||||
keyword: 'keyword' //规定搜索字段
|
||||
},
|
||||
props: {
|
||||
label: 'label', //映射label显示字段
|
||||
value: 'value', //映射value值字段
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import API from "@/api";
|
||||
|
||||
//上传配置
|
||||
|
||||
export default {
|
||||
apiObj: API.common.upload, //上传请求API对象
|
||||
filename: "file", //form请求时文件的key
|
||||
successCode: 200, //请求完成代码
|
||||
maxSize: 10, //最大文件大小 默认10MB
|
||||
parseData: function (res) {
|
||||
return {
|
||||
code: res.code, //分析状态字段结构
|
||||
fileName: res.data.fileName,//分析文件名称
|
||||
src: res.data.src, //分析图片远程地址结构
|
||||
msg: res.message //分析描述字段结构
|
||||
}
|
||||
},
|
||||
apiObjFile: API.common.uploadFile, //附件上传请求API对象
|
||||
maxSizeFile: 10 //最大文件大小 默认10MB
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
import API from "@/api";
|
||||
|
||||
//审批工作流人员/组织选择器配置
|
||||
|
||||
export default {
|
||||
//配置接口正常返回代码
|
||||
successCode: 200,
|
||||
//配置组织
|
||||
group: {
|
||||
//请求接口对象
|
||||
apiObj: API.system.dept.list,
|
||||
//接受数据字段映射
|
||||
parseData: function (res) {
|
||||
return {
|
||||
rows: res.data,
|
||||
msg: res.message,
|
||||
code: res.code
|
||||
}
|
||||
},
|
||||
//显示数据字段映射
|
||||
props: {
|
||||
key: 'id',
|
||||
label: 'label',
|
||||
children: 'children'
|
||||
}
|
||||
},
|
||||
//配置用户
|
||||
user: {
|
||||
apiObj: API.demo.page,
|
||||
pageSize: 20,
|
||||
parseData: function (res) {
|
||||
return {
|
||||
rows: res.data.rows,
|
||||
total: res.data.total,
|
||||
msg: res.message,
|
||||
code: res.code
|
||||
}
|
||||
},
|
||||
props: {
|
||||
key: 'id',
|
||||
label: 'user',
|
||||
},
|
||||
request: {
|
||||
page: 'page',
|
||||
pageSize: 'pageSize',
|
||||
groupId: 'groupId',
|
||||
keyword: 'keyword'
|
||||
}
|
||||
},
|
||||
//配置角色
|
||||
role: {
|
||||
//请求接口对象
|
||||
apiObj: API.system.dept.list,
|
||||
//接受数据字段映射
|
||||
parseData: function (res) {
|
||||
return {
|
||||
rows: res.data,
|
||||
msg: res.message,
|
||||
code: res.code
|
||||
}
|
||||
},
|
||||
//显示数据字段映射
|
||||
props: {
|
||||
key: 'id',
|
||||
label: 'label',
|
||||
children: 'children'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user