From 39b5ade34f70c26a20e064eb0fb0144acae12bad Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期四, 18 四月 2024 16:25:06 +0800
Subject: [PATCH] 接口权限精确到按钮
---
src/views/system/calculate/order/index.vue | 2 ++
src/views/system/calculate/rule/index.vue | 3 +++
src/views/system/template/default/index.vue | 6 ++++++
src/views/system/video/index.vue | 1 +
src/views/system/result/index.vue | 4 ++--
src/views/system/contract/index.vue | 2 ++
src/views/system/rule/default/index.vue | 3 +++
src/views/system/face/index.vue | 1 +
src/views/system/rule/index.vue | 12 ++++++------
src/views/system/car/index.vue | 1 +
src/views/system/score/default/index.vue | 5 ++++-
src/views/system/template/index.vue | 10 ++++++----
12 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/src/views/system/calculate/order/index.vue b/src/views/system/calculate/order/index.vue
index 6685b32..6cba56b 100644
--- a/src/views/system/calculate/order/index.vue
+++ b/src/views/system/calculate/order/index.vue
@@ -57,6 +57,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
+ v-hasPermi="['system:result:remove']"
@click="handleDelete"
>鍒犻櫎</el-button>
</el-col>
@@ -66,6 +67,7 @@
plain
icon="el-icon-download"
size="mini"
+ v-hasPermi="['system:result:export']"
@click="handleExport"
>瀵煎嚭</el-button>
</el-col>
diff --git a/src/views/system/calculate/rule/index.vue b/src/views/system/calculate/rule/index.vue
index 5782a74..812141a 100644
--- a/src/views/system/calculate/rule/index.vue
+++ b/src/views/system/calculate/rule/index.vue
@@ -45,18 +45,21 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
+ v-hasPermi="['calculate:rule:edit']"
>淇敼</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
+ v-hasPermi="['calculate:rule:add']"
>鏂板</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
+ v-hasPermi="['calculate:rule:remove']"
>鍒犻櫎</el-button>
</template>
</el-table-column>
diff --git a/src/views/system/car/index.vue b/src/views/system/car/index.vue
index 4df65e2..416e57c 100644
--- a/src/views/system/car/index.vue
+++ b/src/views/system/car/index.vue
@@ -108,6 +108,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
+ v-hasPermi="['system:monitor:export']"
>瀵煎嚭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
diff --git a/src/views/system/contract/index.vue b/src/views/system/contract/index.vue
index 86713ae..8df9540 100644
--- a/src/views/system/contract/index.vue
+++ b/src/views/system/contract/index.vue
@@ -24,6 +24,7 @@
plain
icon="el-icon-plus"
size="mini"
+ v-hasPermi="['system:contract:add']"
@click="handleAdd"
>鏂板</el-button>
</el-col>
@@ -33,6 +34,7 @@
plain
icon="el-icon-top"
size="mini"
+ v-hasPermi="['system:contract:import']"
@click="handleImportPoint"
>瀵煎叆</el-button>
</el-col>
diff --git a/src/views/system/face/index.vue b/src/views/system/face/index.vue
index d571bbc..4c0ad16 100644
--- a/src/views/system/face/index.vue
+++ b/src/views/system/face/index.vue
@@ -107,6 +107,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
+ v-hasPermi="['system:monitor:export']"
>瀵煎嚭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
diff --git a/src/views/system/result/index.vue b/src/views/system/result/index.vue
index 2ef8485..334fc76 100644
--- a/src/views/system/result/index.vue
+++ b/src/views/system/result/index.vue
@@ -73,8 +73,8 @@
</div>
<div class="bottom-publish">
- <el-button size="medium" type="success">鍙戝竷</el-button>
- <el-button size="medium" @click="jumpDetail" type="info">璇︽儏</el-button>
+ <el-button size="medium" v-hasPermi="['calculate:rule:add']" type="success">鍙戝竷</el-button>
+ <el-button size="medium" v-hasPermi="['calculate:rule:query']" @click="jumpDetail" type="info">璇︽儏</el-button>
</div>
</div>
</div>
diff --git a/src/views/system/rule/default/index.vue b/src/views/system/rule/default/index.vue
index 1a6dacd..2cf4c33 100644
--- a/src/views/system/rule/default/index.vue
+++ b/src/views/system/rule/default/index.vue
@@ -85,18 +85,21 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
+ v-hasPermi="['system:rule:edit']"
>淇敼</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
+ v-hasPermi="['system:rule:add']"
>鏂板</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
+ v-hasPermi="['system:rule:remove']"
>鍒犻櫎</el-button>
</template>
</el-table-column>
diff --git a/src/views/system/rule/index.vue b/src/views/system/rule/index.vue
index 75d534d..6614c4f 100644
--- a/src/views/system/rule/index.vue
+++ b/src/views/system/rule/index.vue
@@ -14,8 +14,8 @@
<i style="font-size: 40px;padding: 15px;" :class="item.icon"></i>
<div style="font-size:12px; text-align: center; height: 25px;">{{ item.name }} </div>
<div class="bottom clearfix">
- <el-button type="text" class="button" @click="handleAudit(item)">瀹℃牳</el-button>
- <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button>
+ <el-button type="text" class="button" v-hasPermi="['calculate:rule:add']" @click="handleAudit(item)">瀹℃牳</el-button>
+ <el-button type="text" class="button" v-hasPermi="['calculate:rule:edit']" @click="handleUpdate(item)">淇敼</el-button>
</div>
</el-card>
<br/>
@@ -36,8 +36,8 @@
<i style="font-size: 40px;padding: 15px;" :class="item.icon"></i>
<div style="font-size:12px; text-align: center; height: 25px;">{{ item.name }} </div>
<div class="bottom clearfix">
- <el-button type="text" class="button" @click="handleAudit(item)">瀹℃牳</el-button>
- <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button>
+ <el-button type="text" class="button" v-hasPermi="['calculate:rule:add']" @click="handleAudit(item)">瀹℃牳</el-button>
+ <el-button type="text" class="button" v-hasPermi="['calculate:rule:edit']" @click="handleUpdate(item)">淇敼</el-button>
</div>
</el-card>
<br/>
@@ -58,8 +58,8 @@
<i style="font-size: 40px;padding: 15px;" :class="item.icon"></i>
<div style="font-size:12px; text-align: center; height: 25px;">{{ item.name }} </div>
<div class="bottom clearfix">
- <el-button type="text" class="button" @click="handleAudit(item)">瀹℃牳</el-button>
- <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button>
+ <el-button type="text" class="button" v-hasPermi="['calculate:rule:add']" @click="handleAudit(item)">瀹℃牳</el-button>
+ <el-button type="text" class="button" v-hasPermi="['calculate:rule:edit']" @click="handleUpdate(item)">淇敼</el-button>
</div>
</el-card>
<br/>
diff --git a/src/views/system/score/default/index.vue b/src/views/system/score/default/index.vue
index bb8463e..4d9e628 100644
--- a/src/views/system/score/default/index.vue
+++ b/src/views/system/score/default/index.vue
@@ -48,6 +48,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
+ v-hasPermi="['system:template:add']"
>鏂板</el-button>
</el-col>
<el-col :span="1.5">
@@ -58,6 +59,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
+ v-hasPermi="['system:template:edit']"
>淇敼</el-button>
</el-col>
<el-col :span="1.5">
@@ -68,6 +70,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
+ v-hasPermi="['system:template:remove']"
>鍒犻櫎</el-button>
</el-col>
<el-col :span="1.5">
@@ -77,7 +80,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
- v-hasPermi="['system:auditing:export']"
+ v-hasPermi="['system:template:export']"
>瀵煎嚭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
diff --git a/src/views/system/template/default/index.vue b/src/views/system/template/default/index.vue
index 516bdac..cb16bbf 100644
--- a/src/views/system/template/default/index.vue
+++ b/src/views/system/template/default/index.vue
@@ -42,6 +42,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
+ v-hasPermi="['platform:template:add']"
>鏂板</el-button>
</el-col>
<el-col :span="1.5">
@@ -51,6 +52,7 @@
icon="el-icon-edit"
size="mini"
:disabled="single"
+ v-hasPermi="['platform:template:edit']"
@click="handleUpdate"
>淇敼</el-button>
</el-col>
@@ -61,6 +63,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
+ v-hasPermi="['platform:template:remove']"
@click="handleDelete"
>鍒犻櫎</el-button>
</el-col>
@@ -70,6 +73,7 @@
plain
icon="el-icon-download"
size="mini"
+ v-hasPermi="['platform:template:export']"
@click="handleExport"
>瀵煎嚭</el-button>
</el-col>
@@ -94,12 +98,14 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
+ v-hasPermi="['platform:template:edit']"
>淇敼</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
+ v-hasPermi="['platform:template:remove']"
>鍒犻櫎</el-button>
</template>
</el-table-column>
diff --git a/src/views/system/template/index.vue b/src/views/system/template/index.vue
index e1480c5..6366efd 100644
--- a/src/views/system/template/index.vue
+++ b/src/views/system/template/index.vue
@@ -52,6 +52,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
+ v-hasPermi="['system:template:add']"
>鏂板</el-button>
</el-col>
<!-- <el-col :span="1.5">
@@ -81,6 +82,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
+ v-hasPermi="['system:template:export']"
>瀵煎嚭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -92,10 +94,10 @@
<div class="text item">鑰冩牳瀵硅薄锛歿{ item.deptId }}</div>
<div class="text item">浣跨敤鐘舵�侊細{{ item.status == 0 ? '鍚敤' : '鍋滅敤' }}</div>
<div class="bottom clearfix">
- <el-button type="text" class="button" @click="">鍚敤</el-button>
- <el-button type="text" class="button" @click="">澶嶅埗</el-button>
- <el-button type="text" class="button" @click="handleUpdate(item)">淇敼</el-button>
- <el-button type="text" class="button" @click="handleDelete(item)">鍒犻櫎</el-button>
+ <el-button type="text" class="button" v-hasPermi="['system:template:XX']" @click="">鍚敤</el-button>
+ <el-button type="text" class="button" v-hasPermi="['system:template:XX']" @click="">澶嶅埗</el-button>
+ <el-button type="text" class="button" v-hasPermi="['system:template:edit']" @click="handleUpdate(item)">淇敼</el-button>
+ <el-button type="text" class="button" v-hasPermi="['system:template:remove']" @click="handleDelete(item)">鍒犻櫎</el-button>
</div>
</el-card>
diff --git a/src/views/system/video/index.vue b/src/views/system/video/index.vue
index 22bfe76..fbf6ef4 100644
--- a/src/views/system/video/index.vue
+++ b/src/views/system/video/index.vue
@@ -114,6 +114,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
+ v-hasPermi="['system:monitor:export']"
>瀵煎嚭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
--
Gitblit v1.8.0