KMS移动端代码提交

This commit is contained in:
zhaol 2025-07-07 13:59:58 +08:00
parent 44069342f3
commit eeb1f7ad5f
47 changed files with 23601 additions and 2278 deletions

View File

@ -0,0 +1,2 @@
BUILDPOPLIST=true
NODE_ENV='production'

View File

@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -0,0 +1,24 @@
# dataviewsetting
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@ -0,0 +1,26 @@
module.exports = {
AWSPortalUrl : "http://localhost:8088/portal/",//aws平台启动地址用于开发时获取平台静态资源请求数据等注意最后的/,不要删)
AWSReleasePath : "/Users/xwp/aws-workFile/aws6.2/apps/com.actionsoft.apps.kms/", //aws的平台路径暂时写绝对路径用于build生成的主文件位置注意最后的/,不要删)
moduleTemplateInAWS : "template/page/com.actionsoft.apps.kms.mobile.home.htm", //build后生成到平台的模板位置及名称
outputDir : "web/com.actionsoft.apps.kms/js/vue/mobile", //build后js或css生成到平台的位置
publicPath : "../apps/com.actionsoft.apps.kms/js/vue/mobile", //build到平台后生成到模板中引入js文件的相对平台的位置
AWSJSAndCSSImport : [ //引入平台的js或css在portal目录开始,开发或build通用
{
type : "js",
path : "commons/js/util/Base64.js"
},
{
type : "js",
path : "commons/js/aws.mobile.api.js"
},
{
type : "css",
path : "commons/css/font/iconfont.css"
},
],
devUserInfo : {//开发时通过用户名及密码获取sessionId前提必须需要安装并启动appcom.actionsoft.apps.getsession.app
userid: "admin", //具有后台管理的用户名
pwd: "123", //密码
deviceType: "pc",
}
}

View File

@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
{
"name": "KMS",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@vant/weapp": "^1.4.4",
"axios": "^0.19.2",
"core-js": "^3.1.4",
"npm": "^6.14.8",
"vant": "^2.10.2",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuex": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-router": "~4.4.0",
"@vue/cli-plugin-vuex": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<%= htmlWebpackPlugin.options.AWSJSAndCSSImport %>
<!--
其它的js或css引用方式示例<%= htmlWebpackPlugin.options.awsjsandcsspath%>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.AWSJSAndCSSPath%>apps/_bpm.platform/css/model/console.m.dw.design.css"/>
-->
<script>
const settingParam = <%= htmlWebpackPlugin.options.settingParam %>;
const axiosBaseUrl = "<%= htmlWebpackPlugin.options.axiosBaseUrl %>";
const production = <%= htmlWebpackPlugin.options.isproduction %>;
</script>
<% if(!htmlWebpackPlugin.options.isproduction) {%>
<script>
const devUserInfo = <%= JSON.stringify(htmlWebpackPlugin.options.devUserInfo) %>;
</script>
<% }%>
</head>
<body style="margin:0;">
<div id="app"></div>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,122 @@
const HtmlWebpackPlugin = require('html-webpack-plugin')
const AWSDevParams = require('./AWSDevParams');
const AWSReleasePath = AWSDevParams.AWSReleasePath;
const AWSPortalUrl = AWSDevParams.AWSPortalUrl;
//开发时通过用户名及密码获取sessionId
const devUserInfo =AWSDevParams.devUserInfo;
const AWSproxyPath = "/AWSDEVURL/r/"; //防止跨域的地址
const moduleTemplateInAWS = AWSDevParams.moduleTemplateInAWS;//平台的模板路径
const outputDir = AWSDevParams.outputDir;
const publicPath = AWSDevParams.publicPath;//决定生成在平台的js或css的相对路径,与build配置的路径要对应
//判断是否开发
const isproduction = process.env.NODE_ENV === 'production';
//开发时路径和build到平台路径
let AWSJSAndCSSPath = isproduction ? "../" : AWSproxyPath.replace("r/","");
let AWSJSAndCSSImport = AWSDevParams.AWSJSAndCSSImport == null ? [] : AWSDevParams.AWSJSAndCSSImport;
let AWSJSAndCSSImportArray = [];
for(let k of AWSJSAndCSSImport){
if(k.type == "css"){
AWSJSAndCSSImportArray.push("<link type=\"text/css\" rel=\"stylesheet\" href=\""+AWSJSAndCSSPath + k.path + "\"/>");
}else if(k.type == "js"){
AWSJSAndCSSImportArray.push("<script type=\"text/javascript\" src=\""+AWSJSAndCSSPath + k.path + "\"></script>");
}
}
const getAWSFileRelativePath = ()=>{
let index = "./";
if(isproduction){
index = publicPath;
}
return index;
}
const getIndexPath = ()=>{
let index = "index.html";
if(isproduction){
index = AWSReleasePath+moduleTemplateInAWS;
}
return index;
}
module.exports = {
// 基本路径 build后文件路径../apps/_bpm.platform/test2 ,开发运行时文件路径./
publicPath: getAWSFileRelativePath(),
//生成入口的html文件位置
indexPath: getIndexPath(),
outputDir : AWSReleasePath+outputDir,
// eslint-loader 是否在保存的时候检查
lintOnSave: true,
productionSourceMap: false, //打包不使用源码false后在平台无法调试
// use the full build with in-browser compiler?
// https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
// compiler: false,
// webpack配置
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
chainWebpack: (config) => {
config.plugin('html')
.tap(args => {
let buildVar = args[0];
buildVar.AWSJSAndCSSImport = AWSJSAndCSSImportArray.join("\n");
buildVar.AWSJSAndCSSPath = AWSJSAndCSSPath;
buildVar.devUserInfo = devUserInfo;
buildVar.isproduction = isproduction;
buildVar.axiosBaseUrl = isproduction ? "./" : AWSproxyPath;
buildVar.settingParam = isproduction ? "<#settingParam>" : "{}";
return args;
});
},
configureWebpack: config => {
if (isproduction) {
// 为生产环境修改配置...
config.mode = 'production'
} else {
// 为开发环境修改配置...
config.mode = 'development'
}
},
devServer: {
proxy: {
//配置跨域
"/AWSDEVURL": {
target: AWSPortalUrl,
ws: true,
changOrigin: true, //允许跨域
pathRewrite: {
"^/AWSDEVURL": "" //请求的时候使用这个URL就可以
}
}
}
},
// css相关配置
css: {
loaderOptions: {}
},
// 是否启用dll
// See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#dll-mode
// dll: false,
// PWA 插件相关配置
// see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
pwa: {},
// webpack-dev-server 相关配置
// devServer: {
// open: process.platform === 'darwin',
// disableHostCheck: true,
// host: 'www.test.com',//如果是真机测试就使用这个IP
// port: 1234,
// https: false,
// hotOnly: false,
// before: app => {}
// },
// 第三方插件配置
pluginOptions: {
}
}