若依微服务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_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_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_KEY = "Payload";
public static final String CONTROL_COMMAND_PAYLOAD_MID_KEY = "mid"; public static final String CONTROL_COMMAND_PAYLOAD_MID_KEY = "mid";
public static final String CONTROL_COMMAND_PAYLOAD_TIMESTAMP_KEY = "timestamp"; public static final String CONTROL_COMMAND_PAYLOAD_TIMESTAMP_KEY = "timestamp";

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

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

@ -40,7 +40,8 @@
</el-form-item> </el-form-item>
<el-form-item label="监控单元" prop="monitorUnitId"> <el-form-item label="监控单元" prop="monitorUnitId">
<treeselect v-model="queryParams.monitorUnitId" :options="monitorUnits" :show-count="true" <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> </el-form-item>
@ -237,7 +238,8 @@
<el-input v-model="form.deviceName" placeholder="请输入设备名称"/> <el-input v-model="form.deviceName" placeholder="请输入设备名称"/>
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="deviceType"> <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 <el-option
v-for="dict in dict.type.hw_device_type" v-for="dict in dict.type.hw_device_type"
:key="dict.value" :key="dict.value"
@ -307,7 +309,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </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-select v-model="form.deviceModeId" placeholder="请选择" :disabled="deviceModeDisabled">
<el-option <el-option
v-for="(editedDeviceMode, index) in editedDeviceModes" v-for="(editedDeviceMode, index) in editedDeviceModes"
@ -458,6 +460,7 @@ export default {
sceneDisabled: true, sceneDisabled: true,
subDeviceVisible: false,// subDeviceVisible: false,//
deviceVisible: false,// deviceVisible: false,//
deviceModeVisible: false,//
deviceModeDisabled: true, deviceModeDisabled: true,
DEVICE_TYPE_GATEWAY_DEVICE: "1",// DEVICE_TYPE_GATEWAY_DEVICE: "1",//
@ -602,6 +605,7 @@ export default {
// //
reset() { reset() {
this.subDeviceVisible = true; this.subDeviceVisible = true;
this.deviceModeVisible = true;
this.deviceVisible = false; this.deviceVisible = false;
this.form = { this.form = {
deviceId: null, deviceId: null,
@ -684,13 +688,19 @@ export default {
} }
this.getEditedMonitorTree(response.data.sceneId); this.getEditedMonitorTree(response.data.sceneId);
if (response.data.deviceType === this.DEVICE_TYPE_GATEWAY_DEVICE if (response.data.deviceType === this.DEVICE_TYPE_GATEWAY_DEVICE) {
|| response.data.deviceType === this.DEVICE_TYPE_DIRECT_CONNECT_DEVICE) {
this.subDeviceVisible = false; this.subDeviceVisible = false;
this.deviceVisible = true; 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 { } else {
this.subDeviceVisible = true; this.subDeviceVisible = true;
this.deviceVisible = false; this.deviceVisible = false;
this.deviceModeVisible = true;
this.getEditedDeviceModes(response.data.sceneId); this.getEditedDeviceModes(response.data.sceneId);
this.getGatewayDevices(response.data.sceneId); this.getGatewayDevices(response.data.sceneId);
} }
@ -923,11 +933,14 @@ export default {
this.form.dataFormat = this.DEVICE_DATA_FORMAT_JSON; this.form.dataFormat = this.DEVICE_DATA_FORMAT_JSON;
this.deviceVisible = true; this.deviceVisible = true;
this.subDeviceVisible = false; this.subDeviceVisible = false;
this.deviceModeVisible = deviceType === this.DEVICE_TYPE_DIRECT_CONNECT_DEVICE;
} else { } else {
this.form.networkingMode = null; this.form.networkingMode = null;
this.form.accessProtocol = null; this.form.accessProtocol = null;
this.form.dataFormat = null; this.form.dataFormat = null;
this.subDeviceVisible = true; this.subDeviceVisible = true;
this.deviceModeVisible = true;
this.deviceVisible = false; this.deviceVisible = false;
} }
}, },

@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || '智慧物联监控平台' // 网页标题 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 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
@ -18,9 +18,9 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 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 // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: 'dist', outputDir: 'hwsaas',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: 'static', assetsDir: 'static',
// 是否开启eslint保存检测有效值ture | false | 'error' // 是否开启eslint保存检测有效值ture | false | 'error'
@ -35,7 +35,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [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.40.120:9080`,
// target: `http://10.11.43.111:8080`, // target: `http://10.11.43.111:8080`,
changeOrigin: true, changeOrigin: true,

Loading…
Cancel
Save