From 6023b713ba3cf468b5fb43ec101ef3cfc383e9d9 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 14 十二月 2023 09:11:43 +0800
Subject: [PATCH] 项目左侧树文字提示
---
Source/UBCS-WEB/src/views/modeling/LinkType.vue | 556 +++++++++++++++++++++++++------------------------
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 9
Source/UBCS-WEB/src/views/modeling/Business.vue | 91 ++++---
3 files changed, 341 insertions(+), 315 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 549d206..40de37c 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -46,6 +46,15 @@
style="height: calc(100vh - 290px)"
@node-click="nodeClick"
>
+ <template slot-scope="{ node, data }" class="el-tree-node__label">
+ <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
+ open-delay="500"
+ placement="right-start">
+ <span style="font-size: 14px;">
+ {{ (node || {}).label }}
+ </span>
+ </el-tooltip>
+ </template>
</avue-tree>
</div>
diff --git a/Source/UBCS-WEB/src/views/modeling/Business.vue b/Source/UBCS-WEB/src/views/modeling/Business.vue
index 775856c..df22c8a 100644
--- a/Source/UBCS-WEB/src/views/modeling/Business.vue
+++ b/Source/UBCS-WEB/src/views/modeling/Business.vue
@@ -1,30 +1,37 @@
<template>
<el-container>
-<!-- <el-header class="businessHeader" style="height: 40px;padding:0 8px">-->
+ <!-- <el-header class="businessHeader" style="height: 40px;padding:0 8px">-->
-<!-- </el-header>-->
+ <!-- </el-header>-->
<el-container>
<el-aside style="width: 20%">
<basic-container class="businessTreeContainer">
<div class="app">
<div style="display: flex;margin-bottom: 10px;justify-content: space-around;">
- <el-button v-if="permissionList.addBtn" size="mini" type="primary" @click="businessAdd" plain style="width: 60px">
+ <el-button v-if="permissionList.addBtn" plain size="mini" style="width: 60px" type="primary"
+ @click="businessAdd">
鏂板
</el-button>
- <el-button v-if="permissionList.editBtn" size="mini" type="primary" @click="businessEdit" plain style="width: 60px">
+ <el-button v-if="permissionList.editBtn" plain size="mini" style="width: 60px" type="primary"
+ @click="businessEdit">
淇敼
</el-button>
- <el-button v-if="permissionList.table" size="mini" type="primary"
- @click="selectFromTable" plain> 浠庡凡鏈変腑鑾峰彇
+ <el-button v-if="permissionList.table" plain size="mini"
+ type="primary" @click="selectFromTable"> 浠庡凡鏈変腑鑾峰彇
</el-button>
</div>
- <avue-tree :data="treeData" :option="treeOption" class="businessTree" @node-click="nodeClick" style="width: fit-content;">
- <template slot-scope="{ node, data }" class="el-tree-node__label">
- <span>
+ <avue-tree :data="treeData" :option="treeOption" class="businessTree" style="height: 70.3vh"
+ @node-click="nodeClick">
+ <template slot-scope="{ node, data }" class="el-tree-node__label">
+ <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
+ open-delay="250"
+ placement="right-start">
+ <span>
<i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i>
{{ (node || {}).label }}
</span>
- </template>
+ </el-tooltip>
+ </template>
</avue-tree>
</div>
@@ -87,17 +94,17 @@
</template>
{{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : '' }}
</el-descriptions-item>
-<!-- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"-->
-<!-- :labelStyle="descriptionOption.labelStyle">-->
-<!-- <template slot="label">-->
-<!-- <i :class="icons.view"></i>-->
-<!-- 瑙嗗浘-->
-<!-- </template>-->
-<!-- <el-tag v-if="obj.viewText" size="small">-->
-<!-- {{ obj.viewText }}-->
-<!-- </el-tag>-->
-<!-- <span v-else></span>-->
-<!-- </el-descriptions-item>-->
+ <!-- <el-descriptions-item :contentStyle="descriptionOption.contentStyle"-->
+ <!-- :labelStyle="descriptionOption.labelStyle">-->
+ <!-- <template slot="label">-->
+ <!-- <i :class="icons.view"></i>-->
+ <!-- 瑙嗗浘-->
+ <!-- </template>-->
+ <!-- <el-tag v-if="obj.viewText" size="small">-->
+ <!-- {{ obj.viewText }}-->
+ <!-- </el-tag>-->
+ <!-- <span v-else></span>-->
+ <!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>
<template slot="label">
<i class="el-icon-arrow-down"></i>
@@ -125,7 +132,8 @@
</avue-crud>
</basic-container>
</el-main>
- <el-dialog :visible="ref.visible" append-to-body title="浠庢暟鎹簱涓坊鍔�" width="700px" @close="dialoghandelfalse" top="9vh">
+ <el-dialog :visible="ref.visible" append-to-body title="浠庢暟鎹簱涓坊鍔�" top="9vh" width="700px"
+ @close="dialoghandelfalse">
閫夋嫨棰嗗煙锛�
<el-select v-model="domain" placeholder="璇烽�夋嫨" size="small" @change="refOnLoad">
<el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value">
@@ -163,7 +171,7 @@
name: "Business",
data() {
return {
- type:"",
+ type: "",
//鐢熷懡鍛ㄦ湡瀵硅瘽妗嗙姸鎬�
packageLifeBox: false,
//鐗堟湰瑙勫垯鐘舵��
@@ -187,7 +195,7 @@
btmType: {},
},
loadOption: {
- height:'auto',
+ height: 'auto',
border: true,
editBtn: false,
addBtn: false,
@@ -396,26 +404,27 @@
.app {
- overflow: auto;
+ overflow-y: auto;
height: 84.3vh;
}
-.app::-webkit-scrollbar {
- height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
- background: white;
- border: white;
- width: 10px;
-
-}
-
-// 婊氬姩鏉$殑婊戝潡
-.app::-webkit-scrollbar-thumb {
- width: 10px;
- height: 10px;
- background-color: #ececec;
- border-radius: 20px;
- border: #ececec;
-}
+//
+//.app::-webkit-scrollbar {
+// height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
+// background: white;
+// border: white;
+// width: 10px;
+//
+//}
+//
+//// 婊氬姩鏉$殑婊戝潡
+//.app::-webkit-scrollbar-thumb {
+// width: 10px;
+// height: 10px;
+// background-color: #ececec;
+// border-radius: 20px;
+// border: #ececec;
+//}
</style>
diff --git a/Source/UBCS-WEB/src/views/modeling/LinkType.vue b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
index e0f13fd..13e9fed 100644
--- a/Source/UBCS-WEB/src/views/modeling/LinkType.vue
+++ b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
@@ -1,298 +1,306 @@
<template>
- <el-container>
- <!-- 椤剁鎸夐挳 -->
+ <el-container>
+ <!-- 椤剁鎸夐挳 -->
- <!-- 渚ц竟鏍忔爲 -->
- <el-container>
- <el-aside style="width: 20%;">
- <basic-container class="businessTreeContainer">
- <div class="app">
- <div style="display: flex;margin-bottom: 10px;">
- <el-button type="primary" @click="linkTypeAdd" size="mini" v-if="permissionList.addBtn" plain>
- 鏂板
- </el-button>
- <el-button type="primary" @click="linkTypeEdit" size="mini" v-if="permissionList.editBtn" plain>
- 淇敼
- </el-button>
- </div>
- <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"
- class="businessTree">
- <template class="el-tree-node__label" slot-scope="{ node, data }">
- <span>
+ <!-- 渚ц竟鏍忔爲 -->
+ <el-container>
+ <el-aside style="width: 20%;">
+ <basic-container class="businessTreeContainer">
+ <div class="app">
+ <div style="display: flex;margin-bottom: 10px;">
+ <el-button v-if="permissionList.addBtn" plain size="mini" type="primary" @click="linkTypeAdd">
+ 鏂板
+ </el-button>
+ <el-button v-if="permissionList.editBtn" plain size="mini" type="primary" @click="linkTypeEdit">
+ 淇敼
+ </el-button>
+ </div>
+ <avue-tree :data="treeData" :option="treeOption" class="businessTree"
+ @node-click="nodeClick">
+ <template slot-scope="{ node, data }" class="el-tree-node__label">
+
+ <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
+ open-delay="250"
+ placement="bottom">
+ <span>
<i class="el-icon-star-on"></i>
{{ (node || {}).label }}
</span>
+ </el-tooltip>
+ </template>
+ </avue-tree>
+ </div>
+ </basic-container>
+ </el-aside>
+ <el-container>
+ <el-main>
+ <basic-container>
+ <p style="margin-top: 10px;font-weight: 570;font-size: 19px">鍩烘湰淇℃伅</p>
+ <el-descriptions :column="2" border class="margin-top" size="medium">
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ <i :class="icons.id"></i>
+ 鑻辨枃鍚嶇О
+ </template>
+ {{ obj.id }}
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ <i :class="icons.name"></i>
+ 涓枃鍚嶇О
+ </template>
+ {{ obj.name }}
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ <i :class="icons.tableName"></i>
+ 鏁版嵁搴撹〃鍚�
+ </template>
+ {{ obj.tableName }}
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ <i :class="icons.domain"></i>
+ 鎵�灞為鍩�
+ </template>
+ <el-tag v-if="obj.domainText" size="small">
+ {{ obj.domainText }}
+ </el-tag>
+ </el-descriptions-item>
+ </el-descriptions>
+ <el-descriptions :column="2" border class="margin-top" direction="vertical">
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ <i :class="icons.from"></i>
+ From绔被鍨�
+ </template>
+ <span v-for="item in obj.fromBtmTypes" style="margin-left:2px;">
+ <el-tag effect="plain" size="small" style="margin-top: 2px;">
+ {{ item.id + '锛�' + item.name + '锛�' }}
+ </el-tag>
+ </span>
+ </el-descriptions-item>
+ <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+ :labelStyle="descriptionOption.labelStyle">
+ <template slot="label">
+ <i :class="icons.to"></i>
+ To娈电被鍨�
+ </template>
+ <span v-for="item in obj.toBtmTypes" style="margin-left:2px">
+ <el-tag effect="plain" size="small" style="margin-top: 2px;">
+ {{ item.id + '锛�' + item.name + '锛�' }}
+ </el-tag>
+ </span>
+ </el-descriptions-item>
+ </el-descriptions>
+
+ <el-descriptions :column="2" border class="margin-top" size="medium">
+ <!--
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
+ <template slot="label">
+ <i :class="icons.main"></i>
+ 涓荤被鍨�
</template>
- </avue-tree>
- </div>
- </basic-container>
- </el-aside>
- <el-container>
- <el-main>
- <basic-container>
- <p style="margin-top: 10px;font-weight: 570;font-size: 19px">鍩烘湰淇℃伅</p>
- <el-descriptions class="margin-top" :column="2" size="medium" border>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.id"></i>
- 鑻辨枃鍚嶇О
- </template>
- {{ obj.id }}
- </el-descriptions-item>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.name"></i>
- 涓枃鍚嶇О
- </template>
- {{ obj.name }}
- </el-descriptions-item>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.tableName"></i>
- 鏁版嵁搴撹〃鍚�
- </template>
- {{ obj.tableName }}
- </el-descriptions-item>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.domain"></i>
- 鎵�灞為鍩�
- </template>
- <el-tag v-if="obj.domainText" size="small">
- {{ obj.domainText }}
- </el-tag>
- </el-descriptions-item>
- </el-descriptions>
- <el-descriptions class="margin-top" direction="vertical" :column="2" border>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.from"></i>
- From绔被鍨�
- </template>
- <span v-for="item in obj.fromBtmTypes" style="margin-left:2px;">
- <el-tag size="small" effect="plain" style="margin-top: 2px;">
- {{ item.id + '锛�' + item.name + '锛�' }}
- </el-tag>
- </span>
- </el-descriptions-item>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.to"></i>
- To娈电被鍨�
- </template>
- <span v-for="item in obj.toBtmTypes" style="margin-left:2px">
- <el-tag size="small" effect="plain" style="margin-top: 2px;">
- {{ item.id + '锛�' + item.name + '锛�' }}
- </el-tag>
- </span>
- </el-descriptions-item>
- </el-descriptions>
-
- <el-descriptions class="margin-top" :column="2" size="medium" border>
- <!--
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.main"></i>
- 涓荤被鍨�
- </template>
- {{ obj.fromBtmTypeName }}
- </el-descriptions-item>
- <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
- :contentStyle="descriptionOption.contentStyle">
- <template slot="label">
- <i :class="icons.main"></i>
- 涓荤被鍨�
- </template>
- {{ obj.toBtmTypeName }}
- </el-descriptions-item>
- -->
- <el-descriptions-item span='2' labelStyle="text-align:center;width:120px">
- <template slot="label">
- <i :class="icons.desc"></i>
- 鎻忚堪
- </template>
- {{ obj.description }}
- </el-descriptions-item>
- </el-descriptions>
- </basic-container>
- <!-- 灞炴�у垪琛�-->
- <basic-container>
- <p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p>
- <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption">
- <template slot="attrDataTypeText" slot-scope="{row}">
- <el-tag>{{ row.attrDataTypeText }}</el-tag>
- </template>
- </avue-crud>
- </basic-container>
- </el-main>
- </el-container>
- </el-container>
- <link-type-add ref="linkAdd" :linkType="addOption.linkType" :domainOption="domainOptions" :icons="icons" :linkStatus="linkStatus"
- @refreshTable="initTreeOnLoad">
- </link-type-add>
-
+ {{ obj.fromBtmTypeName }}
+ </el-descriptions-item>
+ <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+ :contentStyle="descriptionOption.contentStyle">
+ <template slot="label">
+ <i :class="icons.main"></i>
+ 涓荤被鍨�
+ </template>
+ {{ obj.toBtmTypeName }}
+ </el-descriptions-item>
+ -->
+ <el-descriptions-item labelStyle="text-align:center;width:120px" span='2'>
+ <template slot="label">
+ <i :class="icons.desc"></i>
+ 鎻忚堪
+ </template>
+ {{ obj.description }}
+ </el-descriptions-item>
+ </el-descriptions>
+ </basic-container>
+ <!-- 灞炴�у垪琛�-->
+ <basic-container>
+ <p style="margin-top: 10px;font-weight: 570;font-size: 19px">灞炴�у垪琛�</p>
+ <avue-crud v-model="obj" :data="obj.attributes" :option="loadOption" class="attributeCrud">
+ <template slot="attrDataTypeText" slot-scope="{row}">
+ <el-tag>{{ row.attrDataTypeText }}</el-tag>
+ </template>
+ </avue-crud>
+ </basic-container>
+ </el-main>
+ </el-container>
</el-container>
+ <link-type-add ref="linkAdd" :domainOption="domainOptions" :icons="icons" :linkStatus="linkStatus"
+ :linkType="addOption.linkType"
+ @refreshTable="initTreeOnLoad">
+ </link-type-add>
+
+ </el-container>
</template>
<script>
import {
- initTree,
- refOnLoad,
- getDomain,
- saveFromTable,
- getDetail
+ initTree,
+ refOnLoad,
+ getDomain,
+ saveFromTable,
+ getDetail
} from "@/api/omd/linkType"
import {mapGetters} from "vuex";
+
export default {
- name: "LinkType",
- data() {
- return {
- linkStatus:'',
- addOption: {
- linkType: {
- attributes:[]
- },
- },
- domain: null,
- domainOptions: [],
- icons: {
- id: 'el-icon-finished',
- name: 'el-icon-tickets',
- tableName: 'el-icon-date',
- domain: 'el-icon-folder-opened',
- from: 'el-icon-sort-down',
- to: 'el-icon-sort-up',
- main: 'el-icon-warning-outline',
- desc: 'el-icon-chat-line-square'
- },
- treeData: [],
- descriptionOption: {
- labelStyle: 'text-align:center;width:120px',
- contentStyle: 'width:240px;text-align:center;word-break;break-all;'
- },
- loadOption: {
- border: true,
- height: 'auto',
- editBtn: false,
- addBtn: false,
- menu: false,
- highlightCurrentRow: true,
- refreshBtn: false,
- columnBtn: false,
- column: [
- {
- label: '鑻辨枃鍚嶇О',
- prop: 'id',
- align: 'center'
- }, {
- label: '涓枃鍚嶇О',
- prop: 'name',
- align: 'center'
- },
- {
- label: '绫诲瀷',
- prop: 'attrDataTypeText',
- align: 'center',
- slot: true
- },
- {
- label: '榛樿鍊�',
- prop: 'defaultValue',
- align: 'center'
- },
- {
- label: '璇存槑',
- prop: 'description',
- align: 'center'
- }
- ]
- },
- obj: {},
- treeOption: {
- height:'auto',
- defaultExpandAll: true,
- title: '閾炬帴绫诲瀷鏍�',
- addBtn: false,
- props: {
- labelText: '',
- label: 'label',
- value: 'oid',
- children: 'childList',
- }
- },
+ name: "LinkType",
+ data() {
+ return {
+ linkStatus: '',
+ addOption: {
+ linkType: {
+ attributes: []
+ },
+ },
+ domain: null,
+ domainOptions: [],
+ icons: {
+ id: 'el-icon-finished',
+ name: 'el-icon-tickets',
+ tableName: 'el-icon-date',
+ domain: 'el-icon-folder-opened',
+ from: 'el-icon-sort-down',
+ to: 'el-icon-sort-up',
+ main: 'el-icon-warning-outline',
+ desc: 'el-icon-chat-line-square'
+ },
+ treeData: [],
+ descriptionOption: {
+ labelStyle: 'text-align:center;width:120px',
+ contentStyle: 'width:240px;text-align:center;word-break;break-all;'
+ },
+ loadOption: {
+ border: true,
+ height: 'auto',
+ editBtn: false,
+ addBtn: false,
+ menu: false,
+ highlightCurrentRow: true,
+ refreshBtn: false,
+ columnBtn: false,
+ column: [
+ {
+ label: '鑻辨枃鍚嶇О',
+ prop: 'id',
+ align: 'center'
+ }, {
+ label: '涓枃鍚嶇О',
+ prop: 'name',
+ align: 'center'
+ },
+ {
+ label: '绫诲瀷',
+ prop: 'attrDataTypeText',
+ align: 'center',
+ slot: true
+ },
+ {
+ label: '榛樿鍊�',
+ prop: 'defaultValue',
+ align: 'center'
+ },
+ {
+ label: '璇存槑',
+ prop: 'description',
+ align: 'center'
+ }
+ ]
+ },
+ obj: {},
+ treeOption: {
+ height: 'auto',
+ defaultExpandAll: true,
+ title: '閾炬帴绫诲瀷鏍�',
+ addBtn: false,
+ props: {
+ labelText: '',
+ label: 'label',
+ value: 'oid',
+ children: 'childList',
}
- },
- computed:{
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_add, false),
- editBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_edit, false),
- }
- }
- },
- created() {
- this.initTreeOnLoad();
- this.initDomainOption();
- },
-
- methods: {
- // 鏍戠偣鍑�
- nodeClick(data) {
- getDetail(data.oid).then(res => {
- this.obj = res.data.data;
- })
- },
- // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢
- linkTypeAdd() {
- this.$refs.linkAdd.linkType = {};
- this.linkStatus = 'add';
- this.$refs.linkAdd.showSubmitDialog = true;
- },
- // 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
- linkTypeEdit() {
- var linktype = this.obj;
- linktype.fromBtmValues = this.obj.fromBtmTypes;
- linktype.toBtmValues = this.obj.toBtmTypes;
- linktype.attributes = this.obj.attributes;
- var json = JSON.stringify(linktype);
- this.addOption.linkType = JSON.parse(json);
- this.$refs.linkAdd.linkType = this.addOption.linkType;
- this.linkStatus = 'edit';
- this.$refs.linkAdd.showSubmitDialog = true;
- },
- // 浠庡凡鏈変腑鑾峰彇鎸夐挳鐐瑰嚮浜嬩欢
- selectFromTable() {
-
- },
- // 鍔犺浇鏈嶅姟鏍�
- initTreeOnLoad() {
- initTree().then(res => {
- this.treeData = res.data.data;
- });
- },
- // 鍔犺浇鏈嶅姟涓嬫媺妗�
- initDomainOption() {
- getDomain().then(res => {
- this.domainOptions = res.data.data;
- })
- },
-
+ },
}
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_add, false),
+ editBtn: this.vaildData(this.permission.modeling_LinkType.LinkType_edit, false),
+ }
+ }
+ },
+ created() {
+ this.initTreeOnLoad();
+ this.initDomainOption();
+ },
+
+ methods: {
+ // 鏍戠偣鍑�
+ nodeClick(data) {
+ getDetail(data.oid).then(res => {
+ this.obj = res.data.data;
+ })
+ },
+ // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢
+ linkTypeAdd() {
+ this.$refs.linkAdd.linkType = {};
+ this.linkStatus = 'add';
+ this.$refs.linkAdd.showSubmitDialog = true;
+ },
+ // 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
+ linkTypeEdit() {
+ var linktype = this.obj;
+ linktype.fromBtmValues = this.obj.fromBtmTypes;
+ linktype.toBtmValues = this.obj.toBtmTypes;
+ linktype.attributes = this.obj.attributes;
+ var json = JSON.stringify(linktype);
+ this.addOption.linkType = JSON.parse(json);
+ this.$refs.linkAdd.linkType = this.addOption.linkType;
+ this.linkStatus = 'edit';
+ this.$refs.linkAdd.showSubmitDialog = true;
+ },
+ // 浠庡凡鏈変腑鑾峰彇鎸夐挳鐐瑰嚮浜嬩欢
+ selectFromTable() {
+
+ },
+ // 鍔犺浇鏈嶅姟鏍�
+ initTreeOnLoad() {
+ initTree().then(res => {
+ this.treeData = res.data.data;
+ });
+ },
+ // 鍔犺浇鏈嶅姟涓嬫媺妗�
+ initDomainOption() {
+ getDomain().then(res => {
+ this.domainOptions = res.data.data;
+ })
+ },
+
+ }
}
</script>
<style lang="scss" scoped>
-.attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
- display: none !important;
+.attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
+ display: none !important;
}
+
.app {
overflow: auto;
height: 84.3vh;
--
Gitblit v1.9.3