1.增加MU处理,根据登录的设备不同,返回不同设备类型,展示不同页面
This commit is contained in:
parent
b9e998bab4
commit
bd907efad0
|
@ -6,7 +6,9 @@ Vue.use(Vuex);
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
//异常状态(默认没有异常,store中不保存异常信息,自己去查询异常)
|
//异常状态(默认没有异常,store中不保存异常信息,自己去查询异常)
|
||||||
loginState: false
|
loginState: false,
|
||||||
|
//设备类型 1.SU,2MU
|
||||||
|
deviceType : 1
|
||||||
},
|
},
|
||||||
//变异,改变state状态信息,同步
|
//变异,改变state状态信息,同步
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@ -25,6 +27,15 @@ export default new Vuex.Store({
|
||||||
*/
|
*/
|
||||||
logoutSys(state) {
|
logoutSys(state) {
|
||||||
state.loginState = false;
|
state.loginState = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置设备类别
|
||||||
|
* @param {Object} state
|
||||||
|
* @param {Object} deviceType 板子返回的设备类别
|
||||||
|
*/
|
||||||
|
setDeviceType(state,deviceType){
|
||||||
|
state.deviceType = deviceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<div class="footer footer-index footer-pc">
|
<div class="footer footer-index footer-pc">
|
||||||
<div style="margin-top: 5px; display: inline-block">
|
<div style="margin-top: 5px; display: inline-block">
|
||||||
<span>支持 Chrome,Edge,360极速浏览器</span>
|
<span>支持 Chrome,Edge,360极速浏览器</span>
|
||||||
<span class="footer-year">©2009-2023 北京易联智控</span>
|
<span class="footer-year">©2009-2024 山西易联智控</span>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="footer-logo"></div>
|
<div class="footer-logo"></div>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["loginSys"]),
|
...mapMutations(["loginSys","setDeviceType"]),
|
||||||
|
|
||||||
selectMenu: function(name) {
|
selectMenu: function(name) {
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@
|
||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
if (response.data.result == 'success') {
|
if (response.data.result == 'success') {
|
||||||
_this.loginSys();
|
_this.loginSys();
|
||||||
|
_this.setDeviceType(response.data.deviceType);
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'Settings'
|
name: 'Settings'
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,7 +19,21 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
|
||||||
|
<!-- MU配置项 -->
|
||||||
|
<el-col :span="8" v-if="deviceType==2">
|
||||||
|
<div style="display: flex;flex-direction: column ;justify-content:center;align-items:center;height: 80px;"
|
||||||
|
:class="{'menu-icon-active-bg':selectMenuName == 'VMU设置'}" @click="selectMenu('VMU设置')">
|
||||||
|
<a style="flex: 1;text-align: center;padding: 5px 0;color: #FFFFFF;text-decoration:none;"
|
||||||
|
href="javascript:;" :class="{'menu-icon-active-color':selectMenuName == 'VMU设置'}">
|
||||||
|
<i class="el-icon-s-check" style="font-size: 40px; margin-top: 5px;"></i>
|
||||||
|
<span style="display: block;font-size: 16px;">VMU设置</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 手柄配置项 -->
|
||||||
|
<el-col :span="8" v-if="deviceType==1">
|
||||||
<div style="display: flex;flex-direction: column ;justify-content:center;align-items:center;height: 80px;"
|
<div style="display: flex;flex-direction: column ;justify-content:center;align-items:center;height: 80px;"
|
||||||
:class="{'menu-icon-active-bg':selectMenuName == '手柄设置'}" @click="selectMenu('手柄设置')">
|
:class="{'menu-icon-active-bg':selectMenuName == '手柄设置'}" @click="selectMenu('手柄设置')">
|
||||||
<a style="flex: 1;text-align: center;padding: 5px 0;color: #FFFFFF;text-decoration:none;"
|
<a style="flex: 1;text-align: center;padding: 5px 0;color: #FFFFFF;text-decoration:none;"
|
||||||
|
@ -360,6 +374,43 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- VMU设置项 -->
|
||||||
|
<div v-show="selectMenuName == 'VMU设置'" class="set-main">
|
||||||
|
<div class="m-view">
|
||||||
|
<img src="../assets/SU.png" height="100%" />
|
||||||
|
</div>
|
||||||
|
<el-tabs type="border-card" class="form-content">
|
||||||
|
<el-tab-pane> <span slot="label" class="joy-tab-font"><i class="el-icon-s-tools"></i>参数设置</span>
|
||||||
|
<div class="form-content">
|
||||||
|
<el-form :model="VMUForm" ref="VMUForm" label-width="120px" :rules="sysRules">
|
||||||
|
<el-form-item label="参数1" prop="VMUP1">
|
||||||
|
<el-input v-model="VMUForm.VMUP1" placeholder="">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参数2" prop="VMUP2">
|
||||||
|
<el-input v-model="VMUForm.VMUP2" placeholder="">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参数3" prop="VMUP3">
|
||||||
|
<el-input v-model="VMUForm.VMUP3" placeholder="">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参数4" prop="VMUP4">
|
||||||
|
<el-input v-model="VMUForm.VMUP4" placeholder="">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmitSysForm"
|
||||||
|
style="width: 100%;background-color: #2EBA97;border-color: #2EBA97;">
|
||||||
|
保存</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 上传固件 -->
|
<!-- 上传固件 -->
|
||||||
<div v-show="selectMenuName == '固件升级'" class="set-main">
|
<div v-show="selectMenuName == '固件升级'" class="set-main">
|
||||||
<div class="m-view">
|
<div class="m-view">
|
||||||
|
@ -414,7 +465,8 @@
|
||||||
} from "@/api/deviceManage";
|
} from "@/api/deviceManage";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mapMutations
|
mapMutations,
|
||||||
|
mapState
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -684,19 +736,34 @@
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* VMU设置Form
|
||||||
|
*/
|
||||||
|
VMUForm: {
|
||||||
|
VMUP1: '',
|
||||||
|
VMUP2: '',
|
||||||
|
VMUP3: '',
|
||||||
|
VMUP4: ''
|
||||||
|
},
|
||||||
|
|
||||||
updateForm: {
|
updateForm: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//默认选中的菜单
|
//默认选中的菜单
|
||||||
selectMenuName: '系统设置',
|
selectMenuName: '系统设置',
|
||||||
|
|
||||||
//上传文件提示框
|
//上传文件提示框
|
||||||
uploadAlertShow: false
|
uploadAlertShow: false
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState(['deviceType'])
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["logoutSys"]),
|
...mapMutations(["logoutSys"]),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue