diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/HwDictConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/HwDictConstants.java
index 781104c..87657c3 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/HwDictConstants.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/HwDictConstants.java
@@ -99,7 +99,7 @@ public class HwDictConstants {
public static final String CONTROL_COMMAND_REDIS_KEY = "mqtt:channel:down";//下发控制指令到redis的key
public static final String CONTROL_COMMAND_TOPIC_VALUE = "/v1/{}/device/command";//下发控制指令的topic
- public static final String CONTROL_COMMAND_TOPIC_KEY = "TOPIC";
+ public static final String CONTROL_COMMAND_TOPIC_KEY = "Topic";
public static final String CONTROL_COMMAND_PAYLOAD_KEY = "Payload";
public static final String CONTROL_COMMAND_PAYLOAD_MID_KEY = "mid";
public static final String CONTROL_COMMAND_PAYLOAD_TIMESTAMP_KEY = "timestamp";
diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue
index 176a3cc..be16f65 100644
--- a/ruoyi-ui/src/layout/components/Navbar.vue
+++ b/ruoyi-ui/src/layout/components/Navbar.vue
@@ -98,7 +98,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
- location.href = '/index';
+ location.href = '/hwsaas/';
})
}).catch(() => {});
}
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 76418e8..6f56a0e 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -277,6 +277,7 @@ Router.prototype.replace = function push(location) {
}
export default new Router({
+ base:'/hwsaas',
mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
diff --git a/ruoyi-ui/src/views/business/device/index.vue b/ruoyi-ui/src/views/business/device/index.vue
index b68a58c..a709f0e 100644
--- a/ruoyi-ui/src/views/business/device/index.vue
+++ b/ruoyi-ui/src/views/business/device/index.vue
@@ -28,7 +28,7 @@
-
+
+ placeholder="请选择所属监控单元" :normalizer="normalizer" :flat="true" clearable
+ style="width: 200px;"/>
@@ -164,7 +165,7 @@
-
+
-
+
-
+
{
- if(response.data.deviceStatus===this.DEVICE_STATUS_PUBLISHED){
+ if (response.data.deviceStatus === this.DEVICE_STATUS_PUBLISHED) {
this.confirmBtnVisible = false;
}
@@ -684,13 +688,19 @@ export default {
}
this.getEditedMonitorTree(response.data.sceneId);
- if (response.data.deviceType === this.DEVICE_TYPE_GATEWAY_DEVICE
- || response.data.deviceType === this.DEVICE_TYPE_DIRECT_CONNECT_DEVICE) {
+ if (response.data.deviceType === this.DEVICE_TYPE_GATEWAY_DEVICE) {
this.subDeviceVisible = false;
this.deviceVisible = true;
+ this.deviceModeVisible = false;
+ } else if (response.data.deviceType === this.DEVICE_TYPE_DIRECT_CONNECT_DEVICE) {
+ this.subDeviceVisible = false;
+ this.deviceVisible = true;
+ this.deviceModeVisible = true;
+ this.getEditedDeviceModes(response.data.sceneId);
} else {
this.subDeviceVisible = true;
this.deviceVisible = false;
+ this.deviceModeVisible = true;
this.getEditedDeviceModes(response.data.sceneId);
this.getGatewayDevices(response.data.sceneId);
}
@@ -752,7 +762,7 @@ export default {
const deviceType = row.deviceType;
const deviceCode = row.deviceCode;
this.$modal.confirm('是否确认删除设备信息ID为"' + deviceId + '"的数据项?').then(function () {
- return delDevice(deviceId,deviceType);
+ return delDevice(deviceId, deviceType);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
@@ -923,11 +933,14 @@ export default {
this.form.dataFormat = this.DEVICE_DATA_FORMAT_JSON;
this.deviceVisible = true;
this.subDeviceVisible = false;
+
+ this.deviceModeVisible = deviceType === this.DEVICE_TYPE_DIRECT_CONNECT_DEVICE;
} else {
this.form.networkingMode = null;
this.form.accessProtocol = null;
this.form.dataFormat = null;
this.subDeviceVisible = true;
+ this.deviceModeVisible = true;
this.deviceVisible = false;
}
},
@@ -964,7 +977,7 @@ export default {
// return;
// }
let text = row.deviceStatus === "0" ? "测试" : "发布";
- this.$modal.confirm('确认要改为'+text+'状态吗?').then(function () {
+ this.$modal.confirm('确认要改为' + text + '状态吗?').then(function () {
return changeDeviceStatus(row.deviceId, row.deviceStatus);
}).then(() => {
this.$modal.msgSuccess("修改状态成功");
@@ -973,8 +986,8 @@ export default {
});
},
- publishControlCommand(row,type,typeName){
- this.$modal.confirm('确认要下发指令'+typeName+'么?').then(function () {
+ publishControlCommand(row, type, typeName) {
+ this.$modal.confirm('确认要下发指令' + typeName + '么?').then(function () {
return publishControlCommand(row.deviceId, type);
}).then(() => {
this.$modal.msgSuccess("下发指令成功");
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index c3b3837..3a0bec9 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '智慧物联监控平台' // 网页标题
-const port = process.env.port || process.env.npm_config_port || 80 // 端口
+const port = process.env.port || process.env.npm_config_port || 8018 // 端口
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@@ -18,9 +18,9 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
- publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
+ publicPath: process.env.NODE_ENV === "production" ? "/hwsaas" : "/hwsaas",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
- outputDir: 'dist',
+ outputDir: 'hwsaas',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: 'static',
// 是否开启eslint保存检测,有效值:ture | false | 'error'
@@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://175.27.215.92:9080`,
+ target: `http://127.0.0.1:9080`,
// target: `http://10.11.40.120:9080`,
// target: `http://10.11.43.111:8080`,
changeOrigin: true,