Browse Source

Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	irbs.frontend/src/components/index.ts
main
chengjie 9 months ago
parent
commit
eac4851dcf
  1. 8
      app.irbs/build.gradle
  2. 52
      build.gradle
  3. 9
      gradle.properties
  4. 2
      irbs.cust.rating/build.gradle
  5. 45
      irbs.cust.rating/src/main/java/irbs/cust/rating/controller/HomeController.java
  6. 23
      irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/support/KeyValueWrapper.java
  7. 17
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/HomeService.java
  8. 52
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/HomeServiceImpl.java
  9. 2
      irbs.defaultManager/build.gradle
  10. 4
      irbs.frontend/.npmrc
  11. 207
      irbs.frontend/package.json
  12. 2
      irbs.frontend/public/configure.js
  13. 1130
      irbs.frontend/src/views/IrbsHome.vue
  14. 4
      irbs.frontend/util-components-generator.cjs
  15. 2
      irbs.frontend/webpack.env.serve.cjs

8
app.irbs/build.gradle

@ -15,10 +15,10 @@ dependencies {
"io.sc:io.sc.platform.app:${platform_version}", "io.sc:io.sc.platform.app:${platform_version}",
"io.sc:io.sc.platform.security.loginform:${platform_version}", "io.sc:io.sc.platform.security.loginform:${platform_version}",
"io.sc:io.sc.platform.page.config:${platform_version}", "io.sc:io.sc.platform.page.config:${rwa_version}",
"io.sc:rwa.params:${platform_version}", "io.sc:rwa.params:${rwa_version}",
"io.sc:rwa.report:${platform_version}", "io.sc:rwa.report:${rwa_version}",
"io.sc:app.rwa.frontend:${platform_version}", "io.sc:app.rwa.frontend:${rwa_version}",
project(":irbs.frontend"), project(":irbs.frontend"),
project(":irbs.cust.rating"), project(":irbs.cust.rating"),

52
build.gradle

@ -52,7 +52,6 @@ subprojects {
exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j" exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14" exclude group: "org.slf4j", module: "slf4j-jdk14"
exclude group: "org.slf4j", module: "slf4j-nop" exclude group: "org.slf4j", module: "slf4j-nop"
//exclude group: "com.oracle.database.jdbc", module: "ojdbc8"
} }
dependencyManagement { dependencyManagement {
@ -100,15 +99,14 @@ subprojects {
compileTestJava.options.encoding ="${java_encoding}" compileTestJava.options.encoding ="${java_encoding}"
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
//options.compilerArgs += ["-Xdoclint:none", "-Xlint:none", "-nowarn"]
options.compilerArgs += ["-Xlint:deprecation","-Xlint:unchecked"] options.compilerArgs += ["-Xlint:deprecation","-Xlint:unchecked"]
} }
/*----------------------------------------------------------------- /*-----------------------------------------------------------------
* *
*----------------------------------------------------------------*/ *----------------------------------------------------------------*/
group ="${platform_group}" group ="${application_group}"
version ="${platform_version}" version ="${application_version}"
if(file('package.json').exists()){ if(file('package.json').exists()){
mkdir 'java-src/main/java'; mkdir 'java-src/main/java';
@ -184,7 +182,6 @@ subprojects {
sources { sources {
include '*.adoc' include '*.adoc'
} }
//outputDir = file("$buildDir/resources/main/help/" + project.name)
outputDir = file("dist/help/" + project.name) outputDir = file("dist/help/" + project.name)
resources { resources {
from(sourceDir) { from(sourceDir) {
@ -235,8 +232,6 @@ subprojects {
doLast{ doLast{
// jrebel // jrebel
delete "$buildDir/resources/main/rebel.xml" delete "$buildDir/resources/main/rebel.xml"
//
} }
} }
@ -269,18 +264,35 @@ subprojects {
*----------------------------------------------------------------*/ *----------------------------------------------------------------*/
task jrebelIdea() {} task jrebelIdea() {}
tasks.jrebelIdea.doLast { tasks.jrebelIdea.doLast {
File resourcesFile =file('src/main/resources') if(isFrontendProject(file('.'))) {
if(resourcesFile!=null && resourcesFile.exists()){ File resourcesFile = file('java-src/main/resources')
File rebelFile = file('src/main/resources/rebel.xml') if (resourcesFile != null && resourcesFile.exists()) {
rebelFile.withWriter('UTF-8') { writer -> File rebelFile = file('java-src/main/resources/rebel.xml')
writer.write('<?xml version="1.0" encoding="UTF-8"?>\n'); rebelFile.withWriter('UTF-8') { writer ->
writer.write('<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">\n'); writer.write('<?xml version="1.0" encoding="UTF-8"?>\n');
writer.write('\t<classpath>\n'); writer.write('<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">\n');
if(file(project.name + '/src/main').exists()){ writer.write('\t<classpath>\n');
writer.write('\t\t<dir name="' + project.rootProject.projectDir + '/out/production/' + project.name + '"/>\n'); if (file(project.name + '/java-src/main').exists()) {
writer.write('\t\t<dir name="' + project.rootProject.projectDir + '/out/production/' + project.name + '"/>\n');
}
writer.write('\t</classpath>\n');
writer.write('</application>');
}
}
}else {
File resourcesFile = file('src/main/resources')
if (resourcesFile != null && resourcesFile.exists()) {
File rebelFile = file('src/main/resources/rebel.xml')
rebelFile.withWriter('UTF-8') { writer ->
writer.write('<?xml version="1.0" encoding="UTF-8"?>\n');
writer.write('<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">\n');
writer.write('\t<classpath>\n');
if (file(project.name + '/src/main').exists()) {
writer.write('\t\t<dir name="' + project.rootProject.projectDir + '/out/production/' + project.name + '"/>\n');
}
writer.write('\t</classpath>\n');
writer.write('</application>');
} }
writer.write('\t</classpath>\n');
writer.write('</application>');
} }
} }
} }
@ -636,13 +648,13 @@ subprojects {
frontendNpmInstall.dependsOn(frontendUpdatePackageJson) frontendNpmInstall.dependsOn(frontendUpdatePackageJson)
frontendNpmSync.dependsOn(frontendNpmInstall) frontendNpmSync.dependsOn(frontendNpmInstall)
frontendNpmBuild.dependsOn(frontendNpmSync) frontendNpmBuild.dependsOn(frontendNpmSync)
frontendNpmProd.dependsOn(frontendNpmInstall) frontendNpmProd.dependsOn(frontendNpmSync)
// //
// : -D // : -D
// gradle bootwar -Dfrontend=dev # pnpm build // gradle bootwar -Dfrontend=dev # pnpm build
// gradle bootwar -Dfrontend=prod # pnpm prod // gradle bootwar -Dfrontend=prod # pnpm prod
// gradle bootwar -Dfrontend # , // gradle bootwar -Dfrontend=none # ,
def isFrontend =System.getProperty("frontend")?:"prod"; def isFrontend =System.getProperty("frontend")?:"prod";
if(isFrontend=="dev"){ if(isFrontend=="dev"){
frontendGenerateThymeleafTemplate.dependsOn(frontendNpmBuild); frontendGenerateThymeleafTemplate.dependsOn(frontendNpmBuild);

9
gradle.properties

@ -36,10 +36,15 @@ application_version=1.0.1
# platform # platform
########################################################### ###########################################################
platform_group=io.sc platform_group=io.sc
platform_version=8.1.37 platform_version=8.1.41
platform_plugin_version=8.1.13 platform_plugin_version=8.1.13
platform_core_frontend_version=8.1.188 platform_core_frontend_version=8.1.217
###########################################################
# product dependencies version
###########################################################
rule_engine_version=3.10.2 rule_engine_version=3.10.2
rwa_version=1.0.2
########################################################### ###########################################################
# dependencies version # dependencies version

2
irbs.cust.rating/build.gradle

@ -3,7 +3,7 @@ dependencies {
"io.sc:io.sc.platform.mvc:${platform_version}", "io.sc:io.sc.platform.mvc:${platform_version}",
"org.wsp:org.wsp.engine.rule.client:${rule_engine_version}", "org.wsp:org.wsp.engine.rule.client:${rule_engine_version}",
"io.sc:io.sc.platform.flowable:${platform_version}", "io.sc:io.sc.platform.flowable:${platform_version}",
"io.sc:io.sc.platform.page.config:${platform_version}", "io.sc:io.sc.platform.page.config:${rwa_version}",
project(":irbs.defaultManager"), project(":irbs.defaultManager"),
) )

45
irbs.cust.rating/src/main/java/irbs/cust/rating/controller/HomeController.java

@ -0,0 +1,45 @@
package irbs.cust.rating.controller;
import irbs.cust.rating.jpa.support.KeyValueWrapper;
import irbs.cust.rating.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 首页控制器
* @author likunming
*/
@RestController
@RequestMapping("/api/irbs/home")
public class HomeController {
@Autowired
private HomeService homeService;
/**
* 首页敞口分布统计
*
* @throws Exception 异常
*/
@RequestMapping(value = "ratingModelExposure", method = RequestMethod.GET)
@ResponseBody
public List<KeyValueWrapper> ratingModelExposure() throws Exception {
return homeService.getRatingModelExposureList();
}
/**
* 首页评级分布统计
*
* @throws Exception 异常
*/
@RequestMapping(value = "ratingLevelExposure", method = RequestMethod.GET)
@ResponseBody
public List<KeyValueWrapper> ratingLevelExposureList() throws Exception {
return homeService.getRatingLevelExposureList();
}
}

23
irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/support/KeyValueWrapper.java

@ -0,0 +1,23 @@
package irbs.cust.rating.jpa.support;
public class KeyValueWrapper {
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

17
irbs.cust.rating/src/main/java/irbs/cust/rating/service/HomeService.java

@ -0,0 +1,17 @@
package irbs.cust.rating.service;
import irbs.cust.rating.jpa.support.KeyValueWrapper;
import java.util.List;
/**
* 客户评级流程处理服务
* @author likunming
*
*/
public interface HomeService {
public List<KeyValueWrapper> getRatingModelExposureList() throws Exception;
public List<KeyValueWrapper> getRatingLevelExposureList() throws Exception;
}

52
irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/HomeServiceImpl.java

@ -0,0 +1,52 @@
package irbs.cust.rating.service.impl;
import irbs.cust.rating.jpa.support.KeyValueWrapper;
import irbs.cust.rating.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class HomeServiceImpl implements HomeService {
@Autowired
NamedParameterJdbcTemplate namedParameterJdbcTemplate;
@Override
public List<KeyValueWrapper> getRatingModelExposureList() throws Exception {
String querySql = "select MODEL_NAME, count(*) MODEL_NUMBER from NS_COMPANY_RATING where MODEL_CODE IS NOT NULL ";
querySql += " group by MODEL_CODE, MODEL_NAME order by CAST(substr(MODEL_CODE,4) as DECIMAL) asc ";
List<KeyValueWrapper> query = namedParameterJdbcTemplate.query(querySql,
(rs, rowNum) -> {
KeyValueWrapper kv = new KeyValueWrapper();
kv.setKey(rs.getString("MODEL_NAME"));
kv.setValue(rs.getString("MODEL_NUMBER"));
return kv;
});
return query;
}
@Override
public List<KeyValueWrapper> getRatingLevelExposureList() throws Exception {
String querySql1 = "select p.FINAL_LEVEL,count(*) FINAL_NUMBER from (" +
"select distinct(cust_no) as cust_no,FINAL_LEVEL from NS_COMPANY_RATING " +
"WHERE cust_no is not null and FINAL_LEVEL IS NOT NULL AND RATING_STATUS = '010' ";
String querySql2 = "select 'D' FINAL_LEVEL, COUNT(*) FINAL_NUMBER from (" +
"select distinct(cust_no) as cust_no from P_IRS_DEFAULT_COGNIZANCE " +
"where ((VALID = '1' and DEFAULT_TYPE ='02') or (VALID <> '0' and DEFAULT_TYPE = '01')) and cust_no is not null ";
querySql1 += ") p GROUP BY p.FINAL_LEVEL";
querySql2 += ") q";
String querySql = querySql1 + " UNION ALL " + querySql2;
List<KeyValueWrapper> query = namedParameterJdbcTemplate.query(querySql,
(rs, rowNum) -> {
KeyValueWrapper kv = new KeyValueWrapper();
kv.setKey(rs.getString("FINAL_LEVEL"));
kv.setValue(rs.getString("FINAL_NUMBER"));
return kv;
});
return query;
}
}

2
irbs.defaultManager/build.gradle

@ -2,6 +2,6 @@ dependencies {
api( api(
"io.sc:io.sc.platform.mvc:${platform_version}", "io.sc:io.sc.platform.mvc:${platform_version}",
"io.sc:io.sc.platform.flowable:${platform_version}", "io.sc:io.sc.platform.flowable:${platform_version}",
"io.sc:io.sc.platform.page.config:${platform_version}", "io.sc:io.sc.platform.page.config:${rwa_version}",
) )
} }

4
irbs.frontend/.npmrc

@ -1,5 +1,5 @@
# npm 仓库地址, 在 npm install 时使用 # npm 仓库地址, 在 npm install 时使用
registry=http://124.222.99.204:8000/repository/npm-public/ registry=http://nexus.sc.io:8000/repository/npm-public/
# 用户邮箱 # 用户邮箱
email= email=
@ -8,4 +8,4 @@ email=
# 登录 npm 仓库的用户认证信息, 在 npm publish 时使用, publish 的 npm registry 在 package.json 文件中 publishConfig 部分配置 # 登录 npm 仓库的用户认证信息, 在 npm publish 时使用, publish 的 npm registry 在 package.json 文件中 publishConfig 部分配置
# _authToken 可通过以下命令获取 # _authToken 可通过以下命令获取
# curl -X PUT -H "Content-Type:application/json" -d '{"_id":"org.couchdb.user:admin","name":"admin","password":"admin"}' http://nexus.sc.io:8000/repository/npm-releases/-/user/org.couchdb.user:admin # curl -X PUT -H "Content-Type:application/json" -d '{"_id":"org.couchdb.user:admin","name":"admin","password":"admin"}' http://nexus.sc.io:8000/repository/npm-releases/-/user/org.couchdb.user:admin
//124.222.99.204:8000/repository/npm-releases/:_authToken=NpmToken.193db44c-7ca5-3cb6-a990-d24b93fb0d10 //nexus.sc.io:8000/repository/npm-releases/:_authToken=NpmToken.193db44c-7ca5-3cb6-a990-d24b93fb0d10

207
irbs.frontend/package.json

@ -1,106 +1,105 @@
{ {
"name": "irbs.frontend", "name": "irbs.frontend",
"version": "8.1.27", "version": "1.0.1",
"description": "", "description": "",
"private": false, "private": false,
"keywords": [ "keywords": [],
"author": "",
], "license": "ISC",
"author": "", "scripts": {
"license": "ISC", "clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml",
"scripts": { "dev": "nodemon",
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml", "serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs",
"dev": "nodemon", "build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs",
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs", "prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs",
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs", "sync": "platform sync"
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs", },
"sync": "platform sync" "engines": {
}, "node": ">=18",
"engines": { "pnpm": ">=7"
"node": ">=18", },
"pnpm": ">=7" "publishConfig": {
}, "registry": "http://nexus.sc.io:8000/repository/npm-releases/",
"publishConfig": { "access": "public"
"registry": "http://nexus.sc.io:8000/repository/npm-releases/", },
"access": "public" "devDependencies": {
}, "@babel/core": "7.24.4",
"devDependencies": { "@babel/preset-env": "7.24.4",
"@babel/core": "7.23.7", "@babel/preset-typescript": "7.24.1",
"@babel/preset-env": "7.23.7", "@babel/plugin-transform-class-properties": "7.24.1",
"@babel/preset-typescript": "7.23.3", "@babel/plugin-transform-object-rest-spread": "7.24.1",
"@babel/plugin-transform-class-properties": "7.23.3", "@quasar/app-webpack": "3.12.5",
"@babel/plugin-transform-object-rest-spread": "7.23.4", "@quasar/cli": "2.4.0",
"@quasar/app-webpack": "3.12.1", "@types/mockjs": "1.0.10",
"@quasar/cli": "2.3.0", "@types/node": "20.12.7",
"@types/mockjs": "1.0.10", "@typescript-eslint/eslint-plugin": "7.7.1",
"@types/node": "20.10.6", "@typescript-eslint/parser": "7.7.1",
"@typescript-eslint/eslint-plugin": "6.17.0", "@vue/compiler-sfc": "3.4.24",
"@typescript-eslint/parser": "6.17.0", "@webpack-cli/serve": "2.0.5",
"@vue/compiler-sfc": "3.4.3", "autoprefixer": "10.4.19",
"@webpack-cli/serve": "2.0.5", "babel-loader": "9.1.3",
"autoprefixer": "10.4.16", "clean-webpack-plugin": "4.0.0",
"babel-loader": "9.1.3", "copy-webpack-plugin": "12.0.2",
"clean-webpack-plugin": "4.0.0", "cross-env": "7.0.3",
"copy-webpack-plugin": "11.0.0", "css-loader": "7.1.1",
"cross-env": "7.0.3", "eslint": "8.56.0",
"css-loader": "6.8.1", "eslint-config-prettier": "9.1.0",
"eslint": "8.56.0", "eslint-plugin-prettier": "5.1.3",
"eslint-config-prettier": "9.1.0", "eslint-plugin-vue": "9.25.0",
"eslint-plugin-prettier": "5.1.2", "eslint-webpack-plugin": "4.1.0",
"eslint-plugin-vue": "9.19.2", "html-webpack-plugin": "5.6.0",
"eslint-webpack-plugin": "4.0.1", "json5": "2.2.3",
"html-webpack-plugin": "5.6.0", "mini-css-extract-plugin": "2.9.0",
"json5": "2.2.3", "nodemon": "3.1.0",
"mini-css-extract-plugin": "2.7.6", "postcss": "8.4.38",
"nodemon": "3.0.2", "postcss-import": "16.1.0",
"postcss": "8.4.32", "postcss-loader": "8.1.1",
"postcss-import": "16.0.0", "postcss-preset-env": "9.5.9",
"postcss-loader": "7.3.4", "prettier": "3.2.5",
"postcss-preset-env": "9.3.0", "sass": "1.75.0",
"prettier": "3.1.1", "sass-loader": "14.2.1",
"sass": "1.69.7", "typescript": "5.4.5",
"sass-loader": "13.3.3", "vue-loader": "17.4.2",
"typescript": "5.3.3", "webpack": "5.91.0",
"vue-loader": "17.4.2", "webpack-bundle-analyzer": "4.10.2",
"webpack": "5.89.0", "webpack-cli": "5.1.4",
"webpack-bundle-analyzer": "4.10.1", "webpack-dev-server": "5.0.4",
"webpack-cli": "5.1.4", "webpack-merge": "5.10.0",
"webpack-dev-server": "4.15.1", "@vue/babel-plugin-jsx": "1.2.2"
"webpack-merge": "5.10.0", },
"@vue/babel-plugin-jsx": "1.1.5" "dependencies": {
}, "@quasar/extras": "1.16.11",
"dependencies": { "@vueuse/core": "10.9.0",
"@quasar/extras": "1.16.9", "axios": "1.6.8",
"@vueuse/core": "10.7.1", "dayjs": "1.11.10",
"axios": "1.6.3", "echarts": "5.5.0",
"dayjs": "1.11.10", "exceljs": "4.4.0",
"echarts": "5.4.3", "file-saver": "2.0.5",
"exceljs": "4.4.0", "luckyexcel": "1.0.1",
"file-saver": "2.0.5", "mockjs": "1.1.0",
"luckyexcel": "1.0.1", "pinia": "2.1.7",
"mockjs": "1.1.0", "platform-core": "8.1.217",
"pinia": "2.1.7", "quasar": "2.15.3",
"platform-core": "8.1.188", "tailwindcss": "3.4.3",
"quasar": "2.14.2", "vue": "3.4.24",
"tailwindcss": "3.4.0", "vue-dompurify-html": "5.0.1",
"vue": "3.4.3", "vue-i18n": "9.13.1",
"vue-dompurify-html": "5.0.1", "vue-router": "4.3.2",
"vue-i18n": "9.8.0", "lodash": "4.17.21",
"vue-router": "4.2.5", "@codemirror/autocomplete": "6.16.0",
"lodash": "4.17.21", "@codemirror/commands": "6.5.0",
"@codemirror/autocomplete": "6.11.1", "@codemirror/lang-html": "6.4.9",
"@codemirror/commands": "6.3.3", "@codemirror/lang-java": "6.0.1",
"@codemirror/lang-html": "6.4.7", "@codemirror/lang-javascript": "6.2.2",
"@codemirror/lang-java": "6.0.1", "@codemirror/lang-json": "6.0.1",
"@codemirror/lang-javascript": "6.2.1", "@codemirror/lang-sql": "6.6.3",
"@codemirror/lang-json": "6.0.1", "@codemirror/lang-xml": "6.1.0",
"@codemirror/lang-sql": "6.5.4", "@codemirror/language": "6.10.1",
"@codemirror/lang-xml": "6.0.2", "@codemirror/search": "6.5.6",
"@codemirror/language": "6.10.0", "@codemirror/state": "6.4.1",
"@codemirror/search": "6.5.5", "@codemirror/view": "6.26.3",
"@codemirror/state": "6.4.0", "codemirror": "6.0.1",
"@codemirror/view": "6.23.0", "vue-codemirror6": "1.2.0",
"codemirror": "6.0.1", "@maxgraph/core": "0.10.0"
"vue-codemirror6": "1.2.0" }
}
} }

2
irbs.frontend/public/configure.js

@ -6,7 +6,7 @@ window.APP.configure ={
webContextPath: '[(@{/})]'.startsWith('[')? '/' : '[(@{/})]', webContextPath: '[(@{/})]'.startsWith('[')? '/' : '[(@{/})]',
// 默认后端 API 请求的服务地址前缀 // 默认后端 API 请求的服务地址前缀
apiContextPaths: { apiContextPaths: {
DEFAULT: '[(@{/})]'.startsWith('[')? 'http://localhost:8081/' : '[(@{/})]', DEFAULT: '[(@{/})]'.startsWith('[')? 'http://localhost:8080/' : '[(@{/})]',
}, },
// 是否启用本地 mock // 是否启用本地 mock
enableLocalMock : false, enableLocalMock : false,

1130
irbs.frontend/src/views/IrbsHome.vue

File diff suppressed because it is too large

4
irbs.frontend/util-components-generator.cjs

@ -13,7 +13,7 @@ content +='/**\n';
content +=' * 此文件为自动生成文件,请勿修改\n'; content +=' * 此文件为自动生成文件,请勿修改\n';
content +=' */\n\n'; content +=' */\n\n';
for(const route of routesJson){ for(const route of routesJson){
const componentName =route.component.substring(route.component.lastIndexOf('.')+1); const componentName =route.component.replaceAll('.','_');
const componentPath =route.componentPath; const componentPath =route.componentPath;
content +=`import ${componentName} from '${componentPath}';\n`; content +=`import ${componentName} from '${componentPath}';\n`;
} }
@ -21,7 +21,7 @@ for(const route of routesJson){
content +='\n'; content +='\n';
content +='const localComponents = { \n'; content +='const localComponents = { \n';
for(const route of routesJson){ for(const route of routesJson){
const componentName =route.component.substring(route.component.lastIndexOf('.')+1); const componentName =route.component.replaceAll('.','_');
content +=`'${route.component}': ${componentName},\n`; content +=`'${route.component}': ${componentName},\n`;
} }
content +='}\n\n'; content +='}\n\n';

2
irbs.frontend/webpack.env.serve.cjs

@ -19,7 +19,7 @@ module.exports = (env)=> merge(common, mf,{
directory: path.join(__dirname, 'public'), directory: path.join(__dirname, 'public'),
}, },
compress: false, compress: false,
port: 3001, port: 3000,
hot: true, hot: true,
// 保证在出现 404 错误时,能够导航到 index.html // 保证在出现 404 错误时,能够导航到 index.html
historyApiFallback: true, historyApiFallback: true,

Loading…
Cancel
Save