diff --git a/packages/robot-system/src/config/app/develop.js b/packages/robot-system/src/config/app/develop.js index d5981e8..5e1681e 100644 --- a/packages/robot-system/src/config/app/develop.js +++ b/packages/robot-system/src/config/app/develop.js @@ -1,10 +1,10 @@ /* * @Author: zhong_m * @Date: 2021-12-06 11:33:20 - * @LastEditTime: 2025-05-26 16:31:07 - * @LastEditors: 江荣宝 jiangrongbao@bysoft.com + * @LastEditTime: 2025-08-25 16:44:00 + * @LastEditors: XiaoJun * @Description: 开发配置,用于开发调试 - * @FilePath: \central-system\src\config\app\develop.js + * @FilePath: /pv-system-monorepo/packages/robot-system/src/config/app/develop.js */ module.exports = { @@ -18,6 +18,7 @@ module.exports = { * @type {boolean} true | false * @description 是否加载本地 路由|权限 */ + // localRoute: true, localRoute: false, /** diff --git a/packages/robot-system/src/config/app/proxy.js b/packages/robot-system/src/config/app/proxy.js index d7a9cf3..98dcd07 100644 --- a/packages/robot-system/src/config/app/proxy.js +++ b/packages/robot-system/src/config/app/proxy.js @@ -1,10 +1,10 @@ /* * @Author: zhong_m * @Date: 2022-10-10 09:14:24 - * @LastEditTime: 2025-08-15 10:00:11 + * @LastEditTime: 2025-08-25 14:53:20 * @LastEditors: XiaoJun * @Description: 代理设置,开发环境默认baseUrl为/api,如需代理至其它地址,请在默认代理前设置路径,修改后需重启项目 - * @FilePath: /front/src/config/app/proxy.js + * @FilePath: /pv-system-monorepo/packages/robot-system/src/config/app/proxy.js */ module.exports = { @@ -44,7 +44,7 @@ module.exports = { console.error('代理错误:', err); }, onProxyRes: (proxyRes, req, res) => { - console.log('代理响应:', req.url, proxyRes.statusCode); + // console.log('代理响应:', req.url, proxyRes.statusCode); } }, '/filePreview': { diff --git a/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/MapComponent.vue b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/MapComponent.vue new file mode 100644 index 0000000..a7c477b --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/MapComponent.vue @@ -0,0 +1,168 @@ + + + + + + + diff --git a/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/index.vue b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/index.vue new file mode 100644 index 0000000..b7a6224 --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/index.vue @@ -0,0 +1,348 @@ + + + + + + + + {{ item.label }} + + + + + + + + + 工区统计 + 更多 + + + + + 工区总进度 + {{ areaProgress }}% + + + + + {{ p.name }} + + + + {{ p.value }} + + + + + + + + + + + + + + + + + + 材料统计 + 更多 + + + + + + + + + + + + + + 设备信息 + 更多 + + + + + 当前设备在线数量 + {{ deviceStats.online }} + + + 组件设备 + {{ deviceStats.component }} + + + 当前设备安装数量 + {{ deviceStats.installing }} + + + 组件安装数 + {{ deviceStats.moduleInstalled }} + + + + + + + + + + + + + + + + 报警信息 + 更多 + + + + + + + + + + + + + + + diff --git a/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/route.js b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/route.js new file mode 100644 index 0000000..f9bab12 --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/TaskScreenView/route.js @@ -0,0 +1,13 @@ +const route = +{ + path: '/ScreenViewManage', + name: 'ScreenViewManage', + component: () => import('./index.vue'), + title: 'SECOND_MENU_ROBOT_TASK_SCREEN_VIEW', // 使用翻译键 + meta: { + title: 'SECOND_MENU_ROBOT_TASK_SCREEN_VIEW' // 也在meta中使用翻译键 + } +} + + +export default route diff --git a/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/index.vue b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/index.vue new file mode 100644 index 0000000..b0cd0c2 --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/index.vue @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/route.js b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/route.js new file mode 100644 index 0000000..fa4e2b8 --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/ScreenViewManage/route.js @@ -0,0 +1,10 @@ +const route = +{ + path: '/ScreenViewManage', + name: 'ScreenViewManage', + component: () => import('./index.vue'), + title: 'ScreenViewManage', +} + + +export default route diff --git a/packages/robot-system/src/modules/RobotSystemManage/index.vue b/packages/robot-system/src/modules/RobotSystemManage/index.vue new file mode 100644 index 0000000..f832f1c --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/index.vue @@ -0,0 +1,13 @@ + + + + + + diff --git a/packages/robot-system/src/modules/RobotSystemManage/lang.js b/packages/robot-system/src/modules/RobotSystemManage/lang.js new file mode 100644 index 0000000..c2708d1 --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/lang.js @@ -0,0 +1,14 @@ +/* + * @Author: 你的名字 + * @Date: 2025-01-XX + * @Description: 运输安装管理系统国际化 + */ +export default { + // 主系统 + PUTMS: '运输安装管理系统', + + // 一级菜单 + FIRST_MENU_ROBOT_SCREEN_VIEW_MANAGE: '大屏管理', + // 二级菜单 + SECOND_MENU_ROBOT_TASK_SCREEN_VIEW: '任务大屏' +}; diff --git a/packages/robot-system/src/modules/RobotSystemManage/route.js b/packages/robot-system/src/modules/RobotSystemManage/route.js new file mode 100644 index 0000000..7004222 --- /dev/null +++ b/packages/robot-system/src/modules/RobotSystemManage/route.js @@ -0,0 +1,10 @@ +const route = +{ + path: '/RobotSystemManage', + name: 'RobotSystemManage', + component: () => import('./index.vue'), + title: 'RobotSystemManage', +} + + +export default route diff --git a/packages/robot-system/src/modules/systemCheckout/index.vue b/packages/robot-system/src/modules/systemCheckout/index.vue index 603aefe..0bb008b 100644 --- a/packages/robot-system/src/modules/systemCheckout/index.vue +++ b/packages/robot-system/src/modules/systemCheckout/index.vue @@ -48,26 +48,26 @@ export default { // }, { id: 2, - zh: '打桩生产管控系统', + zh: '机器人远程管控系统', en: 'APICMS', icon: image2, - path:'/AutomatedPileInsertionConstructionManagementSubsystem' - }, - { - id: 3, - zh: '产线生产管控系统', - en: 'PAPPMS', - icon: image3, - path:'/PhotovoltaicAssemblyProjectProductionManagementSubsystem' - }, - { - id: 4, - zh: '运输安装管控系统', - en: 'PUTMS', - icon: image4, - path:'/PhotovoltaicUnitTransportationManagementSubsystem' + path:'/RobotSystemManage' }, // { + // id: 3, + // zh: '产线生产管控系统', + // en: 'PAPPMS', + // icon: image3, + // path:'/PhotovoltaicAssemblyProjectProductionManagementSubsystem' + // }, + // { + // id: 4, + // zh: '运输安装管控系统', + // en: 'PUTMS', + // icon: image4, + // path:'/PhotovoltaicUnitTransportationManagementSubsystem' + // }, + // { // id: 5, // zh: '光伏单元安装施工管控子系统', // en: 'PUIACMS', @@ -107,9 +107,10 @@ export default { getRouter().then(res=>{ let isRouter = "" res.data.forEach(ele => { - if(ele.title == this.name){ - isRouter = ele.path - } + isRouter = ele.path + // if(ele.title == this.name){ + // isRouter = ele.path + // } }); if(isRouter){ this.$router.replace({ path: isRouter }) @@ -232,6 +233,8 @@ export default { return tree; }, changeSystem(path,name) { + console.log(path,name) + debugger if(name){ localStorage.setItem('systemname',name.replace(//g, '')) diff --git a/packages/robot-system/vue.config.js b/packages/robot-system/vue.config.js index 8499e7d..c7e2e39 100644 --- a/packages/robot-system/vue.config.js +++ b/packages/robot-system/vue.config.js @@ -1,17 +1,17 @@ -'use strict' -const path = require('path') -const config = require('./src/config') -const TerserPlugin = require('terser-webpack-plugin') -const CompressionPlugin = require('compression-webpack-plugin') +'use strict'; +const path = require('path'); +const config = require('./src/config'); +const TerserPlugin = require('terser-webpack-plugin'); +const CompressionPlugin = require('compression-webpack-plugin'); -function resolve (dir) { - return path.join(__dirname, dir) +function resolve(dir) { + return path.join(__dirname, dir); } -const name = config.title || 'Fawkes' // page title +const name = config.title || 'Fawkes'; // page title // If your port is set to 80, // use administrator privileges to execute the command line. // For Example, Mac: sudo npm run -const port = 9528 // dev port +const port = 9528; // dev port // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = { /** @@ -51,7 +51,8 @@ module.exports = { // provide the app's title in webpack's name field, so that // it can be accessed in index.html to inject the correct title. name: name, - devtool: process.env.NODE_ENV === 'production' ? '' : 'eval-source-map', + // devtool: 'source-map', + // devtool: process.env.NODE_ENV === 'production' ? '' : 'eval-source-map', resolve: { alias: { '@': resolve('src'), @@ -62,37 +63,33 @@ module.exports = { 'crypto-js': path.resolve(process.cwd(), 'node_modules', 'crypto-js') } }, - module: { - }, - optimization: { - minimizer: [ - new TerserPlugin({ - //采用多进程打包 - parallel: 4, - terserOptions: { - compress: { - // 去除debug、console - warnings: true, - drop_debugger: true, - drop_console: true - } - } - }) - ] - } + module: {} + // optimization: { + // minimizer: [ + // new TerserPlugin({ + // //采用多进程打包 + // parallel: 4, + // terserOptions: { + // compress: { + // // 去除debug、console + // warnings: true, + // drop_debugger: true, + // drop_console: true + // } + // } + // }) + // ] + // } }, - chainWebpack (config) { + chainWebpack(config) { // config // .plugin('webpack-bundle-analyzer') // .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) // .end() - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test + config.plugins.delete('preload'); // TODO: need test + config.plugins.delete('prefetch'); // TODO: need test // set svg-sprite-loader - config.module - .rule('svg') - .exclude.add(resolve('src/assets/svg')) - .end() + config.module.rule('svg').exclude.add(resolve('src/assets/svg')).end(); config.module .rule('icons') .test(/\.svg$/) @@ -103,13 +100,13 @@ module.exports = { .options({ symbolId: 'icon-[name]' }) - .end() + .end(); // 单独处理组件库样式 - const css = config.module.rule('css').toConfig() - const useable = { ...css.oneOf[3], test: /fawkes-lib.+\.css$/i } - useable.use = [...useable.use] - useable.use[0] = { loader: 'style-loader', options: { injectType: 'singletonStyleTag' } } - config.module.rule('css').merge({ oneOf: [useable] }) + const css = config.module.rule('css').toConfig(); + const useable = { ...css.oneOf[3], test: /fawkes-lib.+\.css$/i }; + useable.use = [...useable.use]; + useable.use[0] = { loader: 'style-loader', options: { injectType: 'singletonStyleTag' } }; + config.module.rule('css').merge({ oneOf: [useable] }); // style - loader覆盖默认loader实现样式动态加载可控 /** * const css = config.module.rule('css').toConfig() @@ -125,18 +122,18 @@ module.exports = { .use('vue-loader') .loader('vue-loader') .tap((options) => { - options.compilerOptions.preserveWhitespace = true + options.compilerOptions.preserveWhitespace = true; options.compilerOptions.directives = { - html (node, directiveMeta) { + html(node, directiveMeta) { (node.props || (node.props = [])).push({ name: 'innerHTML', value: `$xss(_s(${directiveMeta.value}))` - }) + }); } - } - return options + }; + return options; }) - .end() + .end(); // VueFilenameInjector(config, { // propName: '__source' // default @@ -152,7 +149,7 @@ module.exports = { deleteOriginalAssets: false }) ) - .end() + .end(); // config // .plugin('ScriptExtHtmlWebpackPlugin') // .after('html') @@ -177,12 +174,12 @@ module.exports = { reuseExistingChunk: true } } - } - config.optimization.splitChunks(group) + }; + config.optimization.splitChunks(group); - console.log(config.optimization.splitChunks) - config.optimization.runtimeChunk('single') - config.optimization.minimize(true) // 代码压缩 - }) + console.log(config.optimization.splitChunks); + config.optimization.runtimeChunk('single'); + // config.optimization.minimize(true) // 代码压缩 + }); } -} +};