# demo **Repository Path**: changlingping/demo ## Basic Information - **Project Name**: demo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-08-27 - **Last Updated**: 2024-08-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 一、名称 > manager # 二、简介 > 系统管理,用于对账套,权限问题管理 # 三、命令介绍 > 介绍项目打包运行命令 ## 1、运行 >npm run dev ## 2、打包 >npm run build ## 3、依赖环境 > node版本12.16.1 # 四、文件结构 ``` eyun5-soma ├── build 配置文件 | ├── build.js | ├── check-versions.js | ├── logo.png | ├── utils.js | ├── vue-loader.conf.js | ├── webpack.base.conf.js webpack公共配置 | ├── webpack.dev.conf.js webpack测试环境配置 | └── webpack.prod.conf.js webpack正式环境配置 ├── config 测试环境和账号 | ├── dev.env.js 测试账号 | ├── index.js 测试地址以及跨域配置 | └── prod.env.js ├── index.html 工程入口 ├── package-lock.json 依赖包 ├── package.json 依赖包 ├── README.md ├── src 工程文件 | ├── AppFrame.vue 工程主文件 | ├── common 私有公共方法 | ├── components 工程代码 | ├── main.js | ├── mixins 混合方法以及参数 | └── store vuex数据引用 ├── static 静态资源 | ├── common.css 公共样式 | ├── element.css 针对element样式进行调整 | ├── favicon.png | ├── icons 静态icon资源 | ├── images 静态图片资源 | ├── theme-A.css 皮肤样式 | ├── theme-M.css 皮肤样式 | └── theme-W.css 皮肤样式 └── 系统管理 简易说明 ``` # 五 页面实例 参考ProjectManage.vue 1. 在config.js 中定义操作按钮 btns下: 其中 action中的值需在src/common/locales/zh_CN.json 的tags中配置才能显示 'ProjectManage': [ { action: 'add', icon: 'icon_add', type: 'primary', show: true, text: true }, { action: 'save', icon: 'icon_save', show: true, text: true }, { action: 'export', show: true, text: true }, // { action: 'none', line: true, show: true }, // { action: 'close', icon: 'icon_close', type: 'page-close', show: true }, ], 配置后在ProjectManage.vue 中的methods 定义对应的回调即可 例如 新增add ,action 中对应的key+'Action' 即可 export default { name:'ProjectManage', methods:{ addAction(){ } } } 2. 表格配置 commonTable 在 config.js 在 tableColumns中配置对应的列,如width不填写则表格自适应 tableColumns: { ProjectManage:[ { prop: 'prjNum', label: '项目编号', align: 'left' }, { prop: 'prjName', label: '项目名称',}, { prop: 'prjTime', label: '项目时间',}, { prop: 'prjState', label: '项目状态', with:140 }, { prop: 'prjCreate', label: '创建时间', }, ], ] 页面初始化回调函数为 onPageLoad(){} 3. 所有的页面均不能直接出现汉字,采用多语言配置,配置方法在 src/common/locales/zh_CN.json 中tags中配置值, 调用方法 在js中用 this.$t('key') ,在template中用 $t('key') 跳转路由的时候用的方法是this.showNewPath('/projModel')