diff --git a/ruoyi-ui/README.md b/ruoyi-ui/README.md index 0ff43ea1..559cb4f1 100644 --- a/ruoyi-ui/README.md +++ b/ruoyi-ui/README.md @@ -16,6 +16,10 @@ --> ## 开发 +``` + ruoyi版本号 3.7.0 +``` + ```bash # 克隆项目 git clone https://gitee.com/y_project/RuoYi-Vue @@ -45,7 +49,7 @@ npm install --save el-tree-transfer npm run dev ``` -浏览器访问 http://localhost:80 +浏览器访问 ## 发布 diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 3a0fd127..3f9bfe8e 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,12 +1,13 @@ { "name": "ruoyi", - "version": "3.7.0", + "version": "0.0.1", "description": "雅典娜", "author": "若依", "license": "MIT", "scripts": { "dev": "vue-cli-service serve", "build:prod": "vue-cli-service build", + "build:version": "./build/build.sh", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src" @@ -151,4 +152,4 @@ "> 1%", "last 2 versions" ] -} +} \ No newline at end of file diff --git a/ruoyi-ui/public/index.html b/ruoyi-ui/public/index.html index 36417423..032fe88f 100644 --- a/ruoyi-ui/public/index.html +++ b/ruoyi-ui/public/index.html @@ -5,6 +5,7 @@ + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index c802e889..0a575aef 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -70,7 +70,7 @@ export const eventMap = { try { this.dialogConfig = { // 0 有(球机) 1 ⽆(枪机) - component: cameraCtrlMap[JSON.parse(extData.other_config)?.ptzCtrl], + component: cameraCtrlMap[JSON.parse(extData.otherConfig)?.ptzCtrl], data: extData, }; } catch (error) {} diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 8d54558f..431fc799 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -1,5 +1,8 @@ "use strict"; const path = require("path"); +const webpack = require("webpack"); + +const packageJSON = require("./package.json"); function resolve(dir) { return path.join(__dirname, dir); @@ -79,6 +82,14 @@ module.exports = { chainWebpack(config) { config.plugins.delete("preload"); // TODO: need test config.plugins.delete("prefetch"); // TODO: need test + config.plugin("DefinePlugin").use(webpack.DefinePlugin, [ + { + "process.env.Version": (() => + JSON.stringify( + `${new Date().toLocaleString()}-V${packageJSON.version}` + ))(), + }, + ]); const rootModulesPath = path.resolve("node_modules"); if (config.resolve.modules.store.has(rootModulesPath)) {