<template>
|
<div class="app">
|
<el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
<router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm')
|
}}</router-link>
|
<router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State')
|
}}</router-link>
|
<!-- <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action')
|
}}</router-link> -->
|
<!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
|
}}</router-link> -->
|
<router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
|
}}</router-link>
|
<router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{
|
$t('Parameter')
|
}}</router-link>
|
|
</el-breadcrumb>
|
|
<el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
|
<router-link to="/Electrical/Parameter2" tag="el-button" type="text" active-class="blue-button">{{ $t('Automatic State')
|
}}</router-link>
|
<!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{
|
$t('ManualJog')
|
}}</router-link> -->
|
|
<router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{
|
$t('ManualonePosition')
|
}}</router-link>
|
|
<router-link v-if="hasPermission" to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">
|
{{ $t('Servomanualone') }}
|
</router-link>
|
|
|
<router-link v-if="hasPermission" to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
|
$t('Address parameter settings')
|
}}</router-link>
|
|
<router-link v-if="hasPermission" to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
|
$t('Speed parameter settings')
|
}}</router-link>
|
|
<router-link v-if="hasPermission"
|
to="/Electrical/InteractionState"
|
tag="el-button"
|
type="text"
|
active-class="blue-button"
|
>{{ $t("InteractionState") }}</router-link
|
>
|
|
</el-breadcrumb>
|
|
|
</div>
|
</template>
|
<script>
|
import LanguageMixin from '../../lang/LanguageMixin'
|
import data from '../../configuration/ServoManualone'
|
import {
|
SelectPermissionByUserName, currentUsername
|
} from "../../api/home";
|
|
export default {
|
name: "Servomanual",
|
mixins: [LanguageMixin],
|
|
data () {
|
return {
|
jsonData: data,
|
|
hasPermission: false // 默认没有权限
|
}
|
},
|
created () {
|
// 通过路由跳转到/Electrical/Servomanualone页面
|
this.$router.push('/Electrical/Parameter2');
|
|
currentUsername().then(res => {
|
SelectPermissionByUserName(res.data).then(res => {
|
res.data.permission.forEach(item => {
|
if (item.permissionId == "36" && item.state == 1) {
|
this.hasPermission = true;
|
}
|
|
});
|
});
|
|
});
|
}
|
}
|
</script>
|
|
<style scoped>
|
.item-row {
|
display: flex;
|
align-items: center;
|
margin-bottom: 10px;
|
/* 调整每个项目之间的间距 */
|
}
|
|
|
.action-button {
|
margin-right: 60px;
|
/* 调整按钮之间的间距 */
|
}
|
|
.blue-button {
|
background-color: skyblue;
|
}
|
</style>
|