若依微服务1.6.3

1、为配置ssl,前端页面配置在根目录下
2、设备管理,设备类型为直连设备时没有设备模型选项。
3、下发指令时,topic大小写问题。
dev 1.6.3
xins 1 year ago
parent e5886ff546
commit 51735d149e

@ -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";

@ -98,7 +98,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
location.href = '/hwsaas/';
})
}).catch(() => {});
}

@ -277,6 +277,7 @@ Router.prototype.replace = function push(location) {
}
export default new Router({
base:'/hwsaas',
mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes

@ -28,7 +28,7 @@
</el-select>
</el-form-item>
<el-form-item label="所属场景" prop="sceneId">
<el-select v-model="queryParams.sceneId" placeholder="请选择" @input="sceneChange" clearable>
<el-select v-model="queryParams.sceneId" placeholder="请选择" @input="sceneChange" clearable>
<el-option
v-for="(scene, index) in scenes"
:key="index"
@ -40,7 +40,8 @@
</el-form-item>
<el-form-item label="监控单元" prop="monitorUnitId">
<treeselect v-model="queryParams.monitorUnitId" :options="monitorUnits" :show-count="true"
placeholder="请选择所属监控单元" :normalizer="normalizer" :flat="true" clearable style="width: 200px;"/>
placeholder="请选择所属监控单元" :normalizer="normalizer" :flat="true" clearable
style="width: 200px;"/>
</el-form-item>
@ -164,7 +165,7 @@
<dict-tag :options="dict.type.hw_device_online_status" :value="scope.row.onlineStatus"/>
</template>
</el-table-column-->
<el-table-column label="设备控制" align="center" class-name="small-padding fixed-width" >
<el-table-column label="设备控制" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="scope.row.deviceType=='1' || scope.row.deviceType=='3'">
<el-button
size="mini"
@ -237,7 +238,8 @@
<el-input v-model="form.deviceName" placeholder="请输入设备名称"/>
</el-form-item>
<el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.deviceType" placeholder="请选择设备类型" @input="deviceTypeChange" :disabled="deviceTypeDisabled">
<el-select v-model="form.deviceType" placeholder="请选择设备类型" @input="deviceTypeChange"
:disabled="deviceTypeDisabled">
<el-option
v-for="dict in dict.type.hw_device_type"
:key="dict.value"
@ -307,7 +309,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备模型" prop="deviceModeId" v-if="subDeviceVisible">
<el-form-item label="设备模型" prop="deviceModeId" v-if="deviceModeVisible">
<el-select v-model="form.deviceModeId" placeholder="请选择" :disabled="deviceModeDisabled">
<el-option
v-for="(editedDeviceMode, index) in editedDeviceModes"
@ -447,18 +449,19 @@ export default {
deviceModes: [],
//
editedScenes:[],
editedScenes: [],
//
editedMonitorUnits: [],
//
editedDeviceModes: [],
//
editedGatewayDevices: [],
deviceTypeDisabled:true,
sceneDisabled:true,
deviceTypeDisabled: true,
sceneDisabled: true,
subDeviceVisible: false,//
deviceVisible: false,//
deviceModeDisabled:true,
deviceModeVisible: false,//
deviceModeDisabled: true,
DEVICE_TYPE_GATEWAY_DEVICE: "1",//
DEVICE_TYPE_GATEWAY_SUB_EQUIPMENT: "2",//
@ -473,7 +476,7 @@ export default {
DEVICE_STATUS_PUBLISHED: "1",//:
ACTIVE_STATUS_INACTIVE: "0",//
confirmBtnVisible : true,
confirmBtnVisible: true,
//
title: "",
//
@ -602,6 +605,7 @@ export default {
//
reset() {
this.subDeviceVisible = true;
this.deviceModeVisible = true;
this.deviceVisible = false;
this.form = {
deviceId: null,
@ -673,7 +677,7 @@ export default {
this.reset();
const deviceId = row.deviceId || this.ids
getDevice(deviceId).then(response => {
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("下发指令成功");

@ -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,

Loading…
Cancel
Save