|
@@ -10,7 +10,8 @@
|
|
<div class="interlock-tree-container">
|
|
<div class="interlock-tree-container">
|
|
<!-- 搜索+新增 -->
|
|
<!-- 搜索+新增 -->
|
|
<div class="tree-search">
|
|
<div class="tree-search">
|
|
- <a-button v-if="hasHandleBtn" type="primary" icon="plus" @click="handleAdd" v-has="'add:tree'"/>
|
|
|
|
|
|
+ <a-button v-if="hasHandleBtn && isSysManage" type="primary" icon="plus" @click="handleAdd"/>
|
|
|
|
+ <!-- <a-button v-if="hasHandleBtn" type="primary" icon="plus" @click="handleAdd" v-has="'add:tree'"/> -->
|
|
<a-input-search allow-clear placeholder="请输入" @change="onChange" :class="hasHandleBtn?'has-btn':'noHas-btn'"/>
|
|
<a-input-search allow-clear placeholder="请输入" @change="onChange" :class="hasHandleBtn?'has-btn':'noHas-btn'"/>
|
|
</div>
|
|
</div>
|
|
<!-- 树列表 -->
|
|
<!-- 树列表 -->
|
|
@@ -33,21 +34,41 @@
|
|
<!-- carry-out apartment cluster -->
|
|
<!-- carry-out apartment cluster -->
|
|
<span class="item-node-name">{{nodeData.interlockName}}</span>
|
|
<span class="item-node-name">{{nodeData.interlockName}}</span>
|
|
</div>
|
|
</div>
|
|
- <div v-if="hasHandleBtn" v-has="'edit:tree'">
|
|
|
|
- <a-dropdown>
|
|
|
|
- <a-icon type="more" />
|
|
|
|
- <a-menu slot="overlay">
|
|
|
|
- <a-menu-item>
|
|
|
|
- <a @click="handleEdit(nodeData)">修改</a>
|
|
|
|
- </a-menu-item>
|
|
|
|
- <a-menu-item>
|
|
|
|
- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(nodeData.id)">
|
|
|
|
- <a>删除</a>
|
|
|
|
- </a-popconfirm>
|
|
|
|
- </a-menu-item>
|
|
|
|
- </a-menu>
|
|
|
|
- </a-dropdown>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <template v-if="hasHandleBtn">
|
|
|
|
+ <!-- <div v-if="hasHandleBtn" v-has="'edit:tree'"> -->
|
|
|
|
+ <!-- 系统管理员:全部权限 -->
|
|
|
|
+ <template v-if="isSysManage">
|
|
|
|
+ <a-dropdown>
|
|
|
|
+ <a-icon type="more" />
|
|
|
|
+ <a-menu slot="overlay">
|
|
|
|
+ <a-menu-item>
|
|
|
|
+ <a @click="handleEdit(nodeData)">修改</a>
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ <a-menu-item>
|
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(nodeData.id)">
|
|
|
|
+ <a>删除</a>
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ </a-menu>
|
|
|
|
+ </a-dropdown>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="!isSysManage">
|
|
|
|
+ <!-- 非系统管理员:装置--不能增删改(装置不能操作);系统--不能新增删除,只能修改有权限的系统名称和对应配置 -->
|
|
|
|
+ <a-dropdown v-if="nodeData.interlockType === '1' && nodeData.limitType === '0'">
|
|
|
|
+ <a-icon type="more" />
|
|
|
|
+ <a-menu slot="overlay">
|
|
|
|
+ <a-menu-item>
|
|
|
|
+ <a @click="handleEdit(nodeData)">修改</a>
|
|
|
|
+ </a-menu-item>
|
|
|
|
+ <!-- <a-menu-item v-if="isSysManage">
|
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(nodeData.id)">
|
|
|
|
+ <a>删除</a>
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ </a-menu-item> -->
|
|
|
|
+ </a-menu>
|
|
|
|
+ </a-dropdown>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<!-- :filter-tree-node="filterTreeNode" -->
|
|
<!-- :filter-tree-node="filterTreeNode" -->
|
|
@@ -72,6 +93,7 @@
|
|
<script>
|
|
<script>
|
|
import { getAction,deleteAction } from '@api/manage'
|
|
import { getAction,deleteAction } from '@api/manage'
|
|
import BaseInterLockModal from '@/views/module_interLock/baseInterLock/modules/BaseInterLockModal.vue'
|
|
import BaseInterLockModal from '@/views/module_interLock/baseInterLock/modules/BaseInterLockModal.vue'
|
|
|
|
+ import cookie from 'js-cookie'
|
|
export default({
|
|
export default({
|
|
name: 'UEquipmentTree',
|
|
name: 'UEquipmentTree',
|
|
components: {
|
|
components: {
|
|
@@ -121,6 +143,9 @@
|
|
treeExpandedKeys() {
|
|
treeExpandedKeys() {
|
|
return this.$store.getters.treeExpandedKeys
|
|
return this.$store.getters.treeExpandedKeys
|
|
},
|
|
},
|
|
|
|
+ isSysManage(){
|
|
|
|
+ return cookie.get('SSORole') === 'globalAdmin'
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getTpmTreeData()
|
|
this.getTpmTreeData()
|