From ea46f28356e2acb3bc7cc69b9af3c52fab38c0b0 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 18 一月 2024 16:56:47 +0800
Subject: [PATCH] 终止任务功能测试
---
CanadaMes-ui/src/views/Electrical/Servomanual.vue | 59 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 39 insertions(+), 20 deletions(-)
diff --git a/CanadaMes-ui/src/views/Electrical/Servomanual.vue b/CanadaMes-ui/src/views/Electrical/Servomanual.vue
index 1164bb0..a3fed75 100644
--- a/CanadaMes-ui/src/views/Electrical/Servomanual.vue
+++ b/CanadaMes-ui/src/views/Electrical/Servomanual.vue
@@ -5,8 +5,8 @@
}}</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/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')
@@ -20,33 +20,34 @@
<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">{{
+ <!-- <router-link to="/Electrical/ManualJog" tag="el-button" type="text" active-class="blue-button">{{
$t('ManualJog')
- }}</router-link>
+ }}</router-link> -->
<router-link to="/Electrical/ManualonePosition" tag="el-button" type="text" active-class="blue-button">{{
$t('ManualonePosition')
}}</router-link>
-<router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{
- $t('Servomanualone')
- }}</router-link>
- <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1')
- }}</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 to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
+ <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 to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{
- $t('Positioning2')
- }}</router-link> -->
-
- <!-- <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{
- $t('ManualonePosition2')
- }}</router-link> -->
- <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
+
+ <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>
@@ -56,18 +57,36 @@
<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 // 鍔犺浇鏁翠釜data.json鏂囦欢浣滀负jsonData
+ jsonData: data,
+
+ hasPermission: false // 榛樿娌℃湁鏉冮檺
}
},
created () {
// 閫氳繃璺敱璺宠浆鍒�/Electrical/Servomanualone椤甸潰
- this.$router.push('/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>
--
Gitblit v1.8.0