From 29d2aabc6a07be091d7b52ba51e12a6baf16f7ac Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 06 六月 2023 17:40:18 +0800
Subject: [PATCH] 接口配置冲突

---
 Source/UBCS-WEB/src/views/modeling/LinkType.vue |  160 +++++++++++++++++++++++++++++------------------------
 1 files changed, 87 insertions(+), 73 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/modeling/LinkType.vue b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
index 18e6791..eec03bf 100644
--- a/Source/UBCS-WEB/src/views/modeling/LinkType.vue
+++ b/Source/UBCS-WEB/src/views/modeling/LinkType.vue
@@ -2,21 +2,17 @@
     <el-container>
         <!-- 椤剁鎸夐挳 -->
         <el-header class="businessHeader" style="height: 40px;">
-            <el-button-group>
-                <el-button type="primary" @click="linkTypeAdd" size="small">
-                    <i class="el-icon-plus"></i>&nbsp;
-                    鏂板
-                </el-button>
-                <el-button type="primary" @click="linkTypeEdit" size="small">
-                    <i class="el-icon-edit"></i>&nbsp;
-                    淇敼
-                </el-button>
-                <el-button type="primary" @click="selectFromTable" size="small">
-                    <i class="el-icon-thumb"></i>&nbsp;
-                    浠庡凡鏈変腑鑾峰彇
-                </el-button>
-            </el-button-group>
-        </el-header>
+                <el-button-group>
+                    <el-button type="primary" @click="linkTypeAdd" size="small">
+                        <i class="el-icon-plus"></i>&nbsp;
+                        鏂板
+                    </el-button>
+                    <el-button type="primary" @click="linkTypeEdit" size="small">
+                        <i class="el-icon-edit"></i>&nbsp;
+                        淇敼
+                    </el-button>
+                </el-button-group>
+            </el-header>
         <!-- 渚ц竟鏍忔爲 -->
         <el-container>
             <el-aside width="240px">
@@ -38,34 +34,34 @@
                     <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="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-finished"></i>
+                                    <i :class="icons.id"></i>
                                     鑻辨枃鍚嶇О
                                 </template>
                                 {{ obj.id }}
                             </el-descriptions-item>
-                            <el-descriptions-item labelStyle="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-info"></i>
+                                    <i :class="icons.name"></i>
                                     涓枃鍚嶇О
                                 </template>
                                 {{ obj.name }}
                             </el-descriptions-item>
-                            <el-descriptions-item labelStyle="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-date"></i>
+                                    <i :class="icons.tableName"></i>
                                     鏁版嵁搴撹〃鍚�
                                 </template>
                                 {{ obj.tableName }}
                             </el-descriptions-item>
-                            <el-descriptions-item labelStyle="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-folder-opened"></i>
+                                    <i :class="icons.domain"></i>
                                     鎵�灞為鍩�
                                 </template>
                                 <el-tag size="small">
@@ -74,71 +70,75 @@
                             </el-descriptions-item>
                         </el-descriptions>
                         <el-descriptions class="margin-top" direction="vertical" :column="2" border>
-                            <el-descriptions-item labelStyle="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-sort-down"></i>
+                                    <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="width:130px;margin-top: 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="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-sort-up"></i>
+                                    <i :class="icons.to"></i>
                                     To娈电被鍨�
                                 </template>
-                                <span v-for="item in obj.toBtmTypes" style="height:26px;width:140px;margin-left:2px">
-                                    <el-tag size="small" effect="plain" style="width:130px;margin-top: 2px;">
+                                <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="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                       <el-descriptions class="margin-top" :column="2" size="medium" border>
+                        <!-- 
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-info"></i>
+                                    <i :class="icons.main"></i>
                                     涓荤被鍨�
                                 </template>
                                 {{ obj.fromBtmTypeName }}
                             </el-descriptions-item>
-                            <el-descriptions-item labelStyle="text-align:center;width:120px"
-                                contentStyle="width:240px;text-align:center;word-break;break-all;">
+                            <el-descriptions-item :labelStyle="descriptionOption.labelStyle"
+                                :contentStyle="descriptionOption.contentStyle">
                                 <template slot="label">
-                                    <i class="el-icon-info"></i>
+                                    <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="el-icon-chat-line-square"></i>
+                                    <i :class="icons.desc"></i>
                                     鎻忚堪
                                 </template>
                                 {{ obj.description }}
                             </el-descriptions-item>
-                        </el-descriptions>
+                        </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="attrDataType" slot-scope="{row}">
-                                <el-tag>{{ row.attrDataType }}</el-tag>
+                            <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"
+            @refreshTable="initTreeOnLoad">
+        </link-type-add>
 
     </el-container>
 </template>
@@ -155,10 +155,26 @@
     name: "LinkType",
     data() {
         return {
-            treeData: [
-                { id: "1", name: "2", label: "label" },
-                { id: "a", name: "b", label: "c" }
-            ],
+            addOption: {
+                linkType: {},
+            },
+            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: 360,
@@ -180,7 +196,7 @@
                     },
                     {
                         label: '绫诲瀷',
-                        prop: 'attrDataType',
+                        prop: 'attrDataTypeText',
                         align: 'center',
                         slot: true
                     },
@@ -196,27 +212,14 @@
                     }
                 ]
             },
-            obj: {
-                id: 'linkType',
-                name: '閾炬帴绫诲瀷',
-                tableName: 'PLLT_OMD_LINKTYPE',
-                domain: 'ubcs-omd',
-                domainText: '瀵硅薄寤烘ā',
-                fromBtmTypes: [
-                    { id: 'btm', name: '涓氬姟绫诲瀷' },
-                    { id: 'btm2', name: '涓氬姟绫诲瀷2' }
-                ],
-                toBtmTypes: [{ id: 'btm', name: '涓氬姟绫诲瀷' }, { id: 'btm2', name: '涓氬姟绫诲瀷2' }],
-                fromBtmTypeName: '',
-                toBtmTypeName: '',
-            },
+            obj: {},
             treeOption: {
                 defaultExpandAll: true,
                 title: '閾炬帴绫诲瀷鏍�',
                 addBtn: false,
                 props: {
                     labelText: '',
-                    label: 'name',
+                    label: 'label',
                     value: 'oid',
                     children: 'childList',
                 }
@@ -225,31 +228,42 @@
     },
     created() {
         this.initTreeOnLoad();
-        // this.initDomainOption();
+        this.initDomainOption();
     },
 
     methods: {
         // 鏍戠偣鍑�
         nodeClick(data) {
-            console.log(data);
+            getDetail(data.oid).then(res => {
+                this.obj = res.data.data;
+            })
         },
         // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢
         linkTypeAdd() {
-
+            this.$refs.linkAdd.showSubmitDialog = true;
         },
         // 缂栬緫鎸夐挳鐐瑰嚮浜嬩欢
         linkTypeEdit() {
-
+            this.addOption.linkType = this.obj;
+            this.$refs.linkAdd.linkType = this.addOption.linkType;
+            this.$refs.linkAdd.showSubmitDialog = true;
         },
         // 浠庡凡鏈変腑鑾峰彇鎸夐挳鐐瑰嚮浜嬩欢
         selectFromTable() {
 
         },
+        // 鍔犺浇鏈嶅姟鏍�
         initTreeOnLoad() {
             initTree().then(res => {
                 this.treeData = res.data.data;
             });
-        }
+        },
+        // 鍔犺浇鏈嶅姟涓嬫媺妗�
+        initDomainOption() {
+            getDomain().then(res => {
+                this.domainOptions = res.data.data;
+            })
+        },
 
     }
 }

--
Gitblit v1.9.3