123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <template>
- <el-tree
- ref="catalogTree"
- class="catalog-tree other-tree"
- empty-text="暂无图库"
- :data="data"
- node-key="UniqueCode"
- :expand-on-click-node="false"
- @current-change="(data,node)=>{$parent.nodeChange(data,node)}"
- >
- <div class="custom-tree-node" slot-scope="{ data }">
- <span class="tree-label">{{ data.ClassifyName }}</span>
- <div class="right-item right-item-box" >
- <img
- src="~@/assets/img/set_m/edit.png"
- alt=""
- style="width: 15px; height: 14px; margin-right: 8px"
- @click.stop="$parent.handleOpenCollectClassify(data)"
- v-if="!data.EdbCode&&$parent.isEdbBtnShow('edbData_edbCollectClassify_save')"
- />
- <img
- src="~@/assets/img/set_m/del_icon.png"
- alt=""
- style="width: 14px; height: 14px;"
- @click.stop="removeCollectNode(data)"
- v-if="!data.EdbCode&&$parent.isEdbBtnShow('edbData_edbCollectClassify_remove')"
- />
- </div>
- </div>
- </el-tree>
- </template>
- <script>
- import { edbCollectInterface } from '@/api/modules/chartApi'
- export default {
- props: {
- data: {
- type: Object
- },
- },
- data() {
- return {
- }
- },
- methods: {
- removeCollectNode({ClassifyId}) {
- this.$confirm('若删除该目录,则目录下收藏的所有指标将被清除, 是否继续?',
- '提示',
- { type: 'warning' }
- ).then(async () => {
- const res = await edbCollectInterface.delCollectClassify({
- ClassifyId
- })
- if(res.Ret !== 200) return
- this.$message.success('删除成功')
- this.$emit('change')
- })
-
- }
- }
- }
- </script>
- <style>
- </style>
|