From 7298d5354963a88643a543b51b90192dc9fc934c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 九月 2025 18:43:14 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/business/deviceRole_f.vue | 52 ++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 38 insertions(+), 14 deletions(-)
diff --git a/admin/src/views/business/deviceRole_f.vue b/admin/src/views/business/deviceRole_f.vue
index f1c14f0..3a3648b 100644
--- a/admin/src/views/business/deviceRole_f.vue
+++ b/admin/src/views/business/deviceRole_f.vue
@@ -1,8 +1,8 @@
<template>
- <TableLayout :permissions="['business:company:query']">
+ <TableLayout :permissions="['business:devicerole:query']">
<!-- 鎼滅储琛ㄥ崟 -->
<el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
- <el-form-item label="闂ㄧ缁勫悕绉�" prop="name">
+ <el-form-item title="闂ㄧ缁勫悕绉�" prop="name">
<el-input v-model="searchForm.name" placeholder="璇疯緭鍏ラ棬绂佺粍鍚嶇О" @keypress.enter.native="search"></el-input>
</el-form-item>
<section>
@@ -13,32 +13,38 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<template v-slot:table-wrap>
<ul class="toolbar">
- <li><el-button type="primary">鍚屾</el-button></li>
+ <li><el-button type="primary" v-permissions="['business:hksync:privilege']" @click="synchronousData">鍚屾</el-button></li>
</ul>
<el-table
- v-loading="isWorking.search"
- :data="tableData.list"
- stripe
- @selection-change="handleSelectionChange"
+ :height="tableHeightNew"
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ stripe
+ @selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="name" label="闂ㄧ缁勫悕绉�" min-width="100px"></el-table-column>
- <el-table-column prop="name" label="閫傜敤鐢ㄦ埛绫诲瀷" min-width="100px"></el-table-column>
- <el-table-column prop="name" label="浣跨敤浜烘暟" min-width="100px"></el-table-column>
+ <el-table-column label="閫傜敤鐢ㄦ埛绫诲瀷" min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.type === '0'">鍔冲姟璁垮</span>
+ <span v-if="row.type === '1'">鏅�氳瀹�</span>
+ <span v-if="row.type === '2'">鍐呴儴浜哄憳</span>
+ </template>
+ </el-table-column>
<el-table-column prop="isDefault" label="鏄惁榛樿" min-width="100px">
<template slot-scope="{row}">
- <span v-if="row.isDefault === 1">鏄�</span>
- <span v-if="row.isDefault === 0">鍚�</span>
+ <span v-if="row.isDefault === 0">鏄�</span>
+ <span v-if="row.isDefault === 1">鍚�</span>
</template>
</el-table-column>
<el-table-column
- v-if="containPermissions(['business:company:update', 'business:company:delete'])"
+ v-if="containPermissions(['business:devicerole:update'])"
label="鎿嶄綔"
min-width="120"
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.operaDeviceRoleWindow.open('缂栬緫闂ㄧ瑙掕壊淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:company:update']">缂栬緫</el-button>
+ <el-button type="text" @click="$refs.operaDeviceRoleWindow.open('缂栬緫闂ㄧ瑙掕壊淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:devicerole:update']">缂栬緫</el-button>
</template>
</el-table-column>
</el-table>
@@ -59,6 +65,7 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaDeviceRoleWindow from '@/components/business/OperaDeviceRoleFWindow'
+import { syncPrivilege } from '@/api/business/deviceRole'
export default {
name: 'DeviceRole',
extends: BaseTable,
@@ -68,7 +75,7 @@
// 鎼滅储
searchForm: {
name: '',
- type: '1'
+ type: '0,1'
}
}
},
@@ -80,6 +87,23 @@
'field.main': 'id'
})
this.search()
+ },
+ methods: {
+ synchronousData () {
+ this.$confirm('纭鍚屾鍚�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ syncPrivilege({})
+ .then(res => {
+ this.$message({ type: 'success', message:res || '鍚屾鎴愬姛' })
+ this.search()
+ })
+ }).catch(() => {
+
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3