diff --git a/src/store/index.js b/src/store/index.js index 42ff552..78722ce 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,7 +6,9 @@ Vue.use(Vuex); export default new Vuex.Store({ state: { //异常状态(默认没有异常,store中不保存异常信息,自己去查询异常) - loginState: false + loginState: false, + //设备类型 1.SU,2MU + deviceType : 1 }, //变异,改变state状态信息,同步 mutations: { @@ -25,6 +27,15 @@ export default new Vuex.Store({ */ logoutSys(state) { state.loginState = false; + }, + + /** + * 设置设备类别 + * @param {Object} state + * @param {Object} deviceType 板子返回的设备类别 + */ + setDeviceType(state,deviceType){ + state.deviceType = deviceType; } }, diff --git a/src/views/Index.vue b/src/views/Index.vue index 346d9dd..553015c 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -26,7 +26,7 @@ - + + + +
+ + + VMU设置 + +
+
+ + +
+ + +
+
+ +
+ + 参数设置 +
+ + + + + + + + + + + + + + + + + + + + 保存 + + +
+
+
+
+
@@ -414,7 +465,8 @@ } from "@/api/deviceManage"; import { - mapMutations + mapMutations, + mapState } from "vuex"; export default { @@ -684,19 +736,34 @@ }] }, + /** + * VMU设置Form + */ + VMUForm: { + VMUP1: '', + VMUP2: '', + VMUP3: '', + VMUP4: '' + }, + updateForm: { }, //默认选中的菜单 selectMenuName: '系统设置', - + //上传文件提示框 uploadAlertShow: false } }, + + computed: { + ...mapState(['deviceType']) + }, + methods: { ...mapMutations(["logoutSys"]),