From 404966637eda6881a0f17683c5aacc7c1c34aed8 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 16 一月 2025 16:18:34 +0800
Subject: [PATCH] 增加操作类型

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue |  719 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 356 insertions(+), 363 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
index 9d717d3..2a6af8a 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
@@ -2,33 +2,12 @@
   <el-container v-loading="createViewLoading">
     <el-aside>
       <basic-container>
-        <div ref="TreeBox" style="height: calc(100vh - 144px);!important;">
-          <div class="headerCon">
-            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓
-            </el-button>
-            <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼
-            </el-button>
-            <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎
-            </el-button>
-            <el-button icon="el-icon-view" plain size="small" type="primary">鏌ョ湅
-            </el-button>
-            <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
-            </el-button>
-            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆
-            </el-button>
-            <el-button class="smallBtn" icon="el-icon-circle-plus-outline" plain size="small"
-                       style="padding-left: 7px !important;"
-                       type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘
-            </el-button>
-            <el-button class="smallBtn" icon="el-icon-menu" plain size="small" style="padding-left: 1px"
-                       type="primary" @click="checkClickHandler">涓�鑷存�ф鏌�
-            </el-button>
-          </div>
+        <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
           <!-- 宸︿晶鏍� -->
-          <div style="height:  calc(100vh - 300px);">
+          <div style="height:  calc(100vh - 190px);">
             <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
-           <span style="font-size: 15px">
+           <span>
               <i class="el-icon-s-promotion"></i>
                 {{ (node || {}).label }}
             </span>
@@ -41,126 +20,145 @@
 
     <el-main>
       <basic-container>
-        <div style="height: 380px">
-          <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>
-              {{ nodeRow.name }}
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.name"></i>
-                鏍囩
-              </template>
-              {{ nodeRow.tag }}
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.tableName"></i>
-                瀹炵幇绫�
-              </template>
-              {{ nodeRow.implClass }}
-            </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="nodeRow.shape">
-                {{ nodeRow.shape }}
-              </el-tag>
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.desc"></i>
-                鎻忚堪
-              </template>
-              {{ nodeRow.description }}
-            </el-descriptions-item>
-          </el-descriptions>
-
-          <el-descriptions :column="3" 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>
-              <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap">
-                <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:3px;">
-              <el-tag effect="plain" style="margin-top: 3px;">
-                  {{ item }}
-              </el-tag>
-                </span>
-              </div>
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.from"></i>
-                Form绔富绫诲瀷
-              </template>
-              <el-tag v-if="nodeRow.primitivesFrom" effect="plain">
-                {{ nodeRow.primitivesFrom === '璇烽�夋嫨' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }}
-              </el-tag>
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.from"></i>
-                From绔搴斿叧绯�
-              </template>
-              <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag>
-            </el-descriptions-item>
-
-          </el-descriptions>
-
-          <el-descriptions :column="3" border class="margin-top" direction="vertical">
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.to"></i>
-                To绔被鍨�
-              </template>
-              <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap">
-                <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;">
-                 <el-tag effect="plain" style="margin-top: 2px;">
+        <div>
+          <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary"
+                     @click="addClickHandler">
+            <icon-show :name="permissionList.addBtn.source"></icon-show>
+            鍒涘缓
+          </el-button>
+          <el-button v-if="permissionList.editBtn" class="button-custom-icon" plain size="small" type="primary" @click="editClickHandler">
+            <icon-show :name="permissionList.editBtn.source"></icon-show>
+            淇敼
+          </el-button>
+          <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" @click="deleteClickHandler">
+            <icon-show :name="permissionList.delBtn.source"></icon-show>
+            鍒犻櫎
+          </el-button>
+          <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" @click="upLoadClickHandler">
+            <icon-show :name="permissionList.importBtn.source"></icon-show>
+            瀵煎叆
+          </el-button>
+          <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler">
+            <icon-show :name="permissionList.exportBtn.source"></icon-show>
+            瀵煎嚭
+          </el-button>
+          <el-button v-if="permissionList.createViewBtn" class="button-custom-icon" plain size="small" type="primary" @click="createViewClickHandler">
+            <icon-show :name="permissionList.createViewBtn.source"></icon-show>
+            鍒涘缓瑙嗗浘
+          </el-button>
+          <el-button v-if="permissionList.consistencyCheckBtn" class="button-custom-icon" plain size="small" type="primary" @click="checkClickHandler">
+            <icon-show :name="permissionList.consistencyCheckBtn.source"></icon-show>
+            涓�鑷存�ф鏌�
+          </el-button>
+        </div>
+        <el-descriptions style="margin: 10px 0 20px" :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>
+            {{ nodeRow.name }}
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.name"></i>
+              鏍囩
+            </template>
+            {{ nodeRow.tag }}
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.tableName"></i>
+              瀹炵幇绫�
+            </template>
+            <el-tooltip v-if="nodeRow.implClass" :content="nodeRow.implClass" class="item" effect="dark"
+                        placement="top-start">
+              <el-tag style="max-width: 100%;overflow: hidden;display: block">{{ nodeRow.implClass }}</el-tag>
+            </el-tooltip>
+          </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="nodeRow.shape">
+              {{ nodeRow.shape }}
+            </el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :span="2" :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.desc"></i>
+              鎻忚堪
+            </template>
+            {{ nodeRow.description }}
+          </el-descriptions-item>
+          <el-descriptions-item :span="2" contentStyle="word-break:break-all;"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.from"></i>From绔被鍨�
+            </template>
+            <span v-for="item in nodeRow.btmItemsFrom">
+                <el-tag effect="plain" style="margin:2px 5px 2px 0;">
+                    {{ item }}
+                </el-tag>
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.from"></i>
+              Form绔富绫诲瀷
+            </template>
+            <el-tag v-if="nodeRow.primitivesFrom" effect="plain">
+              {{ nodeRow.primitivesFrom === '璇烽�夋嫨' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }}
+            </el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.from"></i>
+              From绔搴斿叧绯�
+            </template>
+            <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :span="2" contentStyle="word-break:break-all;"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.to"></i>
+              To绔被鍨�
+            </template>
+            <span v-for="item in nodeRow.btmItemsTo">
+                 <el-tag effect="plain" style="margin:2px 5px 2px 0;">
                   {{ item }}
                  </el-tag>
-                </span>
-              </div>
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.to"></i>
-                To绔富绫诲瀷
-              </template>
-              <el-tag v-if="nodeRow.primitivesTo" effect="plain">
-                {{ nodeRow.primitivesTo === '璇烽�夋嫨' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }}
-              </el-tag>
-            </el-descriptions-item>
-            <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
-                                  :labelStyle="descriptionOption.labelStyle">
-              <template slot="label">
-                <i :class="icons.to"></i>
-                To绔搴斿叧绯�
-              </template>
-              <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag>
-            </el-descriptions-item>
-
-          </el-descriptions>
-        </div>
-        <div style="margin-top: 30px">
-          <h3>灞炴�ф睜鍒楄〃</h3>
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.to"></i>
+              To绔富绫诲瀷
+            </template>
+            <el-tag v-if="nodeRow.primitivesTo" effect="plain">
+              {{ nodeRow.primitivesTo === '璇烽�夋嫨' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }}
+            </el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.to"></i>
+              To绔搴斿叧绯�
+            </template>
+            <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag>
+          </el-descriptions-item>
+        </el-descriptions>
+        <div style="position: relative">
+          <h3 style="margin: 0;position: absolute;top:0;z-index: 1000;">灞炴�у垪琛�</h3>
           <avue-crud
             :data="tableData"
             :option="tableOption"
@@ -179,7 +177,7 @@
       width="70%"
       @close="addDialogClose"
     >
-      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="85px" size="small">
         <div class="dialogForm">
           <div class="leftForm">
             <el-form-item label="鍚嶇О锛�" prop="name">
@@ -195,50 +193,41 @@
               <el-input v-model="form.shape"></el-input>
             </el-form-item>
             <el-form-item label="鎻忚堪">
-              <el-input v-model="form.description" :rows="2" type="textarea"></el-input>
+              <el-input v-model="form.description" :rows="3" type="textarea"></el-input>
             </el-form-item>
           </div>
 
           <div class="centerForm">
-            <el-form-item label="Form绔被鍨嬶細" label-width="110px">
-              <div style="display: flex; align-items: center">
-                <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto">
-                  <!-- 鍐呭 -->
-                  <el-table
-                    :data="bizFormData"
-                    :show-header="false"
-                    style="width: 100%">
-                    <el-table-column
-                      align="center"
-                      prop="name">
-                    </el-table-column>
-                    <el-table-column
-                      fixed="right"
-                      label="鎿嶄綔"
-                      width="60">
-                      <template slot-scope="scope">
-                        <el-button
-                          size="small"
-                          style="color:#F56C6C;"
-                          type="text"
-                          @click.native.prevent="bizTypeDeleteRow('form',scope.$index)">
-                          绉婚櫎
-                        </el-button>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                </div>
-                <el-button plain size="mini" style="margin-left: 5px" type="success"
-                           @click="FormItemReferChange('form')">娣诲姞
-                </el-button>
-
+            <el-form-item label-width="110px" style="margin-bottom: 5px;">
+              <div slot="label">
+                <span>Form绔被鍨嬶細</span>
+                <el-button plain size="mini" style="margin-right: 10px" type="success"  @click="FormItemReferChange('form')">娣诲姞</el-button>
+              </div>
+              <div style="height: 190px;border: 1px solid #EBEEF5;overflow-y: auto">
+                <el-table :data="bizFormData" :show-header="false" style="width: 100%" size="mini">
+                  <el-table-column
+                    align="center"
+                    prop="name">
+                  </el-table-column>
+                  <el-table-column
+                    label="鎿嶄綔"
+                    width="60">
+                    <template slot-scope="scope">
+                      <el-button
+                        size="mini"
+                        style="color:#F56C6C;"
+                        type="text"
+                        @click.native.prevent="bizTypeDeleteRow('form',scope.$index)">
+                        绉婚櫎
+                      </el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
               </div>
             </el-form-item>
-            <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px">
-              <el-select v-model="form.relationFrom">
-                <el-option label="N" value="N"></el-option>
-                <el-option label="1" value="1"></el-option>
-              </el-select>
+            <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px" style="margin-bottom: 5px;">
+              <el-radio v-model="form.relationFrom" label="N">N</el-radio>
+              <el-radio v-model="form.relationFrom" label="1">1</el-radio>
             </el-form-item>
             <el-form-item label="涓荤被鍨嬶細" label-width="110px">
               <el-select v-model="form.primitivesFrom">
@@ -249,45 +238,36 @@
           </div>
 
           <div class="rightForm">
-            <el-form-item label="To绔被鍨嬶細" label-width="110px">
-              <div style="display: flex; align-items: center">
-                <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto">
-                  <!-- 鍐呭 -->
-                  <el-table
-                    :data="bizToData"
-                    :show-header="false"
-                    style="width: 100%">
-                    <el-table-column
-                      align="center"
-                      prop="name">
-                    </el-table-column>
-                    <el-table-column
-                      fixed="right"
-                      label="鎿嶄綔"
-                      width="60">
-                      <template slot-scope="scope">
-                        <el-button
-                          size="small"
-                          style="color:#F56C6C;"
-                          type="text"
-                          @click.native.prevent="bizTypeDeleteRow('to',scope.$index)">
-                          绉婚櫎
-                        </el-button>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                </div>
-                <el-button plain size="mini" style="margin-left: 5px" type="success"
-                           @click="FormItemReferChange('to')">娣诲姞
-                </el-button>
-
+            <el-form-item label-width="100px" style="margin-bottom: 5px;">
+              <div slot="label">
+                <span>To绔被鍨嬶細</span>
+                <el-button plain size="mini" style="margin-right: 10px" type="success"  @click="FormItemReferChange('to')">娣诲姞</el-button>
+              </div>
+              <div style="height: 190px;border: 1px solid #EBEEF5;overflow-y: auto">
+                <el-table :data="bizToData" :show-header="false" style="width: 100%" size="mini">
+                  <el-table-column
+                    align="center"
+                    prop="name">
+                  </el-table-column>
+                  <el-table-column
+                    label="鎿嶄綔"
+                    width="60">
+                    <template slot-scope="scope">
+                      <el-button
+                        size="mini"
+                        style="color:#F56C6C;"
+                        type="text"
+                        @click.native.prevent="bizTypeDeleteRow('to',scope.$index)">
+                        绉婚櫎
+                      </el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
               </div>
             </el-form-item>
-            <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px">
-              <el-select v-model="form.relationTo">
-                <el-option label="N" value="N"></el-option>
-                <el-option label="1" value="1"></el-option>
-              </el-select>
+            <el-form-item label="瀵瑰簲鍏崇郴锛�" label-width="110px" style="margin-bottom: 5px;">
+              <el-radio v-model="form.relationTo" label="N">N</el-radio>
+              <el-radio v-model="form.relationTo" label="1">1</el-radio>
             </el-form-item>
             <el-form-item label="涓荤被鍨嬶細" label-width="110px">
               <el-select v-model="form.primitivesTo">
@@ -299,23 +279,24 @@
         </div>
       </el-form>
 
-      <div class="bottomForm">
-        <h3>灞炴�ф睜鍒楄〃</h3>
+      <div class="bottomForm" style="margin-top: 10px;">
         <avue-crud
+          size="mini"
           :data="dialogBottomData"
           :option="dialogBottomOption"
           @row-del="dialogBottomAttrDel"
         >
           <template slot="menuLeft" slot-scope="scope">
-            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="dialogAddClickHandler">澧� 鍔�
+            <h3 style="display: inline-block;margin-right: 20px;margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3>
+            <el-button icon="el-icon-plus" plain size="mini" type="primary" @click="dialogAddClickHandler">澧� 鍔�
             </el-button>
           </template>
         </avue-crud>
       </div>
       <span slot="footer" class="dialog-footer">
-         <el-button @click="addDialogClose">鍙� 娑�</el-button>
-         <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button>
-        </span>
+         <el-button size="small" type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button>
+         <el-button size="small" @click="addDialogClose">鍙� 娑�</el-button>
+      </span>
 
       <!-- 灞炴�ф睜鍒楄〃 -->
       <el-dialog
@@ -343,8 +324,8 @@
         >
         </avue-crud>
         <span slot="footer" class="dialog-footer">
-         <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
-         <el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button>
+         <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button>
+         <el-button size="small" @click="dialogAttrClose">鍙� 娑�</el-button>
         </span>
       </el-dialog>
     </el-dialog>
@@ -364,8 +345,8 @@
         :table-loading="conCheckLoading">
       </avue-crud>
       <span slot="footer" class="dialog-footer">
-         <el-button @click="conCheckVisible = false">鍙� 娑�</el-button>
-         <el-button type="primary" @click="repairClickHandler">淇� 澶�</el-button>
+         <el-button size="small" @click="conCheckVisible = false">鍙� 娑�</el-button>
+         <el-button size="small" type="primary" @click="repairClickHandler">淇� 澶�</el-button>
         </span>
     </el-dialog>
 
@@ -391,8 +372,8 @@
       </avue-crud>
 
       <span slot="footer" class="dialog-footer">
-         <el-button @click="bizTypeVisible = false">鍙� 娑�</el-button>
-         <el-button type="primary" @click="bizTypeAddHandler">纭� 瀹�</el-button>
+         <el-button size="small" type="primary" @click="bizTypeAddHandler">纭� 瀹�</el-button>
+         <el-button size="small" @click="bizTypeVisible = false">鍙� 娑�</el-button>
         </span>
     </el-dialog>
 
@@ -417,6 +398,7 @@
 import basicOption from '@/util/basic-option'
 import {gridAttribute} from "@/api/modeling/attributePool/api";
 import func from "@/util/func";
+import {mapGetters} from "vuex";
 
 export default {
   name: "index",
@@ -445,6 +427,8 @@
         highlightCurrentRow: true,
         searchMenuSpan: 8,
         searchLabelWidth: 100,
+        calcHeight: 30,
+        header: false,
         column: [
           {
             label: '涓氬姟绫诲瀷鍚�',
@@ -485,6 +469,7 @@
         index: false,
         selection: false,
         refreshBtn: false,
+        header:false,
         column: [
           {
             label: '绫诲瀷鍚�',
@@ -512,7 +497,7 @@
       dialogAttrReload: Math.random(),
       dialogAttrSelectList: [],
       dialogAttrLoading: false,
-      dialogAttrData: [], // 灞炴�ф睜鏂板琛ㄦ牸
+      dialogAttrData: [], // 灞炴�ф睜寮圭獥琛ㄦ牸
       dialogAttrOption: {
         ...basicOption,
         calcHeight: -60,
@@ -523,22 +508,29 @@
         highlightCurrentRow: true,
         height: 450,
         searchMenuSpan: 8,
+        header:false,
+        selectable:function(row){
+          return row.selectable;
+        },
         column: [
           {
             label: '灞炴�у悕',
             prop: 'id',
             sortable: true,
             search: true,
+            width:260,
           },
           {
             label: '灞炴�х被鍨�',
             prop: 'attributeDataType',
             sortable: true,
+            width:150,
           },
           {
             label: '鍒濆鍊�',
             prop: 'defaultValue',
             sortable: true,
+            width:200,
           },
           {
             label: '璇存槑',
@@ -575,24 +567,30 @@
         editBtn: false,
         refreshBtn: false,
         selection: false,
-        height: 300,
+        height: 220,
+        menuWidth:100,
         addBtn: false,
+        gridBtn:false,
+        columnBtn:false,
         // index:false,
         column: [
           {
             label: '灞炴�у悕',
             prop: 'id',
             sortable: true,
+            width:260,
           },
           {
             label: '灞炴�х被鍨�',
             prop: 'attributeDataType',
             sortable: true,
+            width:150,
           },
           {
             label: '鍒濆鍊�',
             prop: 'defaultValue',
             sortable: true,
+            width:200,
           },
           {
             label: '璇存槑',
@@ -624,22 +622,25 @@
         // index:false,
         addBtn: false,
         menu: false,
-        calcHeight: -40,
+        calcHeight: -30,
         column: [
           {
             label: '灞炴�у悕',
             prop: 'id',
             sortable: true,
+            width:260,
           },
           {
             label: '灞炴�х被鍨�',
             prop: 'attributeDataType',
             sortable: true,
+            width:150,
           },
           {
             label: '鍒濆鍊�',
             prop: 'defaultValue',
             sortable: true,
+            width:200,
           },
           {
             label: '璇存槑',
@@ -651,7 +652,7 @@
       nodeRow: {},
       descriptionOption: {
         labelStyle: 'text-align:center;width:120px',
-        contentStyle: 'width:240px;text-align:center;word-break;break-all;'
+        contentStyle: 'width:240px;text-align:center;word-break:break-all;'
       },
       icons: {
         id: 'el-icon-finished',
@@ -670,8 +671,19 @@
   created() {
     this.getTreeList();
   },
-  mounted() {
-
+  computed:{
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
+        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
+        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
+        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
+        importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
+        consistencyCheckBtn: this.vaildData(this.permission[this.$route.query.id].USE, false),
+        createViewBtn: this.vaildData(this.permission[this.$route.query.id].ADD2, false),
+      };
+    },
   },
   methods: {
     // 鏍憃nLoad璇锋眰
@@ -680,9 +692,7 @@
         const data = res.data.data;
         this.treeData = data;
         this.tableLoading = false;
-      }).catch(err => {
-        this.$message.error(err);
-      });
+      })
     },
 
     // 瀵煎叆
@@ -713,12 +723,24 @@
         this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
         return;
       }
-      deleteLink(this.nodeRow).then(res => {
-        if (res.data.code === 200) {
-          this.$message.success('鍒犻櫎鎴愬姛');
-          this.getTreeList();
-        }
-      })
+      ;
+      this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteLink(this.nodeRow).then(res => {
+          if (res.data.code === 200) {
+            this.$message.success('鍒犻櫎鎴愬姛');
+            this.getTreeList();
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
     },
 
     // 鍒涘缓鎸夐挳
@@ -761,58 +783,62 @@
 
     // 涓�鑷存�ф鏌�
     checkClickHandler() {
-      this.conCheckVisible = true;
-      this.conCheckLoading = true;
       checkLinkType().then(res => {
-        if (res.data.code === 200) {
-          const data = res.data.data;
-          this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹�
-          this.conCheckLoading = false;
+        if (res && res.data && res.data.data) {
+          this.conCheckVisible = true;
+          this.conCheckLoading = true;
+          if (res.data.code === 200) {
+            const data = res.data.data;
+            this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹�
+            this.conCheckLoading = false;
 
-          const outputData = [];
+            const outputData = [];
 
-          data.forEach(item => {
-            Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => {
-              methodsArray.forEach(methods => {
-                // 鍒ゆ柇鍓嶇紑
-                const action = methods.startsWith('F_') ? '绉婚櫎form绔笟鍔$被鍨�' : '绉婚櫎to绔笟鍔$被鍨�';
-                const detail = methods.split('_')[1]; // 鑾峰彇 _ 鍚庨潰鐨勫唴瀹�
-                outputData.push({
-                  id: id,
-                  methods: `${action}:${detail}`,
-                  status: '鏈慨澶�'
+            data.forEach(item => {
+              Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => {
+                methodsArray.forEach(methods => {
+                  // 鍒ゆ柇鍓嶇紑
+                  const action = methods.startsWith('F_') ? '绉婚櫎form绔笟鍔$被鍨�' : '绉婚櫎to绔笟鍔$被鍨�';
+                  const detail = methods.split('_')[1]; // 鑾峰彇 _ 鍚庨潰鐨勫唴瀹�
+                  outputData.push({
+                    id: id,
+                    methods: `${action}:${detail}`,
+                    status: '鏈慨澶�'
+                  });
                 });
               });
-            });
 
-            // 澶勭悊 dbCheckMap
-            Object.entries(item.dbCheckMap).forEach(([id, methods]) => {
-              const splitMethods = methods.split('(');
-              // 鍒ゆ柇绗竴涓鍙峰墠闈㈢殑鍊�
-              if (splitMethods[0].startsWith('_ADD')) {
-                outputData.push({
-                  id: id,
-                  methods: '澧炲姞鍒�(' + splitMethods[1].slice(0, -1) + ')', // 缁撴潫浣嶇疆鍑忓幓)鐨勫瓧绗�
-                  status: '鏈慨澶�'
-                });
-              } else if (splitMethods[0].startsWith('_CREATE')) {
-                outputData.push({
-                  id: id,
-                  methods: '鍒涘缓琛�(' + splitMethods[1].slice(0, -1) + ')',
-                  status: '鏈慨澶�'
-                });
-              } else if (splitMethods[0].startsWith('_DROP')) {
-                outputData.push({
-                  id: id,
-                  methods: '绉婚櫎鍒�(' + splitMethods[1].slice(0, -1) + ')',
-                  status: '鏈慨澶�'
-                });
-              } else {
-                this.$message.error("涓嶆敮鎸佺殑 dbCheckMap 绫诲瀷锛� " + methods)
-              }
+              // 澶勭悊 dbCheckMap
+              Object.entries(item.dbCheckMap).forEach(([id, methods]) => {
+                const splitMethods = methods.split('(');
+                // 鍒ゆ柇绗竴涓鍙峰墠闈㈢殑鍊�
+                if (splitMethods[0].startsWith('_ADD')) {
+                  outputData.push({
+                    id: id,
+                    methods: '澧炲姞鍒�(' + splitMethods[0].slice(0, -1) + ')', // 缁撴潫浣嶇疆鍑忓幓)鐨勫瓧绗�
+                    status: '鏈慨澶�'
+                  });
+                } else if (splitMethods[0].startsWith('_CREATE')) {
+                  outputData.push({
+                    id: id,
+                    methods: '鍒涘缓琛�(' + splitMethods[0].slice(0, -1) + ')',
+                    status: '鏈慨澶�'
+                  });
+                } else if (splitMethods[0].startsWith('_DROP')) {
+                  outputData.push({
+                    id: id,
+                    methods: '绉婚櫎鍒�(' + splitMethods[0].slice(0, -1) + ')',
+                    status: '鏈慨澶�'
+                  });
+                } else {
+                  this.$message.error("涓嶆敮鎸佺殑 dbCheckMap 绫诲瀷锛� " + methods)
+                }
+              });
             });
-          });
-          this.conCheckData = outputData;
+            this.conCheckData = outputData;
+          }
+        } else {
+          this.$message.success(res.data.msg);
         }
       }).catch(err => {
         this.$message.error(err);
@@ -821,11 +847,11 @@
 
     // 淇涓�鑷存�ф鏌�
     repairClickHandler() {
-      console.log(this.conDefaultCheckData)
       const params = this.conDefaultCheckData[0];
       repairTable(params).then(res => {
         if (func.isEmptyObject(res.data.obj[0])) {
           this.$message.success('淇鎴愬姛');
+          this.conCheckData = [];
         } else {
           this.$message.error('淇澶辫触锛岃閲嶆柊灏濊瘯锛�');
         }
@@ -841,6 +867,8 @@
           this.createViewLoading = false;
           this.$message.success(res.data.obj);
         }
+      }).catch(err => {
+        this.createViewLoading = false;
       })
     },
 
@@ -855,7 +883,10 @@
     // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁
     getAttrDialogDta() {
       gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
-        const data = res.data.data;
+        const data = res.data.data.map(item=>{
+          item.selectable=!this.dialogBottomData.some(existingItem => existingItem.id === item.id);
+          return item;
+        });
         this.dialogAttrData = data;
         this.attrPage.total = res.data.total;
         this.dialogAttrLoading = false;
@@ -871,7 +902,9 @@
 
     // 娣诲姞灞炴�ф睜 琛岀偣鍑�
     dialogAttrRowClickHandler(row) {
-
+      if(!row.selectable){
+        return;
+      }
       func.rowClickHandler(
         row,
         this.$refs.dialogAttrCrud,
@@ -880,7 +913,7 @@
           this.attrLastIndex = newIndex;
         },
         () => {
-          this.selectList = [];
+          this.dialogAttrSelectList = [row];
         }
       );
     },
@@ -911,41 +944,19 @@
       this.bizFormData = [];
       this.bizToData = [];
       this.dialogBottomData = [];
-      console.log(this.form);
-      console.log('--', this.nodeRow)
     },
 
     // 娣诲姞灞炴�ф睜 淇濆瓨
     dialogAttrAddClickHandler() {
-      let hasDuplicate = false;
-
-      // 鍏堝垱寤轰竴涓复鏃舵暟缁勬潵瀛樺偍涓嶉噸澶嶇殑椤�
-      const newItems = [];
-
       this.dialogAttrSelectList.forEach(item => {
-        const exists = this.dialogBottomData.some(existingItem => existingItem.id === item.id);
-
-        if (exists) {
-          hasDuplicate = true;
-          return;
-        }
-
-        // 濡傛灉娌℃湁閲嶅椤癸紝鍒欏皢璇ラ」娣诲姞鍒颁复鏃舵暟缁勪腑
-        newItems.push({
+        this.dialogBottomData.push({
           id: item.id,
           attributeDataType: item.attributeDataType,
           defaultValue: item.defaultValue,
           description: item.description
         });
       });
-
-      if (hasDuplicate) {
-        this.$message.error('璇锋鏌ユ槸鍚︽湁娣诲姞閲嶅椤癸紒');
-      } else {
-        // 濡傛灉娌℃湁閲嶅椤癸紝灏嗘柊椤规坊鍔犲埌 dialogBottomData
-        this.dialogBottomData.push(...newItems);
-        this.attrPollDialogVisible = false;
-      }
+      this.attrPollDialogVisible = false;
     },
 
     //娣诲姞灞炴�ф睜 鏉℃暟
@@ -1026,7 +1037,7 @@
           this.bizLastIndex = newIndex;
         },
         () => {
-          this.selectList = [];
+          this.bizTypeList = [row];
         }
       );
     },
@@ -1102,16 +1113,22 @@
         this.$message.error('form绔笟鍔$被鍨嬪拰to绔被鍨嬪潎涓嶈兘涓虹┖锛�')
         return;
       }
-      this.form.btmItemsFrom = this.bizFormData.map(item => item.name);
-      this.form.btmItemsTo = this.bizToData.map(item => item.name);
-      this.form.attributes = this.dialogBottomData.map(item => item.id);
-      let flag = this.title === 'add' ? true : false;
-      addAndEditLink(flag, this.form).then(res => {
-        if (res.data.code === 200) {
-          this.visible = false;
-          this.$message.success(res.data.msg);
-          this.resetForm();
-          this.getTreeList();
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.form.btmItemsFrom = this.bizFormData.map(item => item.name);
+          this.form.btmItemsTo = this.bizToData.map(item => item.name);
+          this.form.attributes = this.dialogBottomData.map(item => item.id);
+          let flag = this.title === 'add' ? true : false;
+          addAndEditLink(flag, this.form).then(res => {
+            if (res.data.code === 200) {
+              this.visible = false;
+              this.$message.success(res.data.msg);
+              this.resetForm();
+              this.getTreeList();
+            }
+          });
+        } else {
+          return false;
         }
       });
     },
@@ -1143,51 +1160,27 @@
   .el-form-item .el-select {
     width: 100%;
   }
-
-  .headerCon {
-    .el-button {
-      width: 82px;
-    }
+  .el-tag{
+    line-height:22px;
+    height: 24px;
   }
-}
-
-.headerCon {
-  display: flex;
-  flex-wrap: wrap;
-  margin-bottom: 5px;
-
-  .el-button + .el-button {
-    margin-left: 5px;
-  }
-
-  .el-button {
-    margin-top: 5px;
-  }
-}
-
-.headerCon > .el-button:nth-child(4) {
-  margin-left: 0;
-}
-
-.headerCon > .el-button:nth-child(7) {
-  margin-left: 0;
 }
 
 .dialogForm {
   display: flex;
-  justify-content: space-around;
+  justify-content: space-between;
 }
 
 .dialogForm > div {
-  width: 34%;
-  border: 1px solid #eee;
-  padding: 25px 20px 5px 10px; /* 涓� 鍙� 涓� 宸� */
-  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* 娣诲姞闃村奖鏁堟灉 */
+  width: 31%;
+  border: 1px solid #EBEEF5;
+  border-radius: 2px;
+  padding: 15px 20px 0 10px; /* 涓� 鍙� 涓� 宸� */
+  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* 娣诲姞闃村奖鏁堟灉 */
 }
 
 .leftForm {
-  width: 19% !important;
-  padding: 25px 20px 5px 0px !important;
+  width: 28% !important;
 }
 
 .smallBtn {

--
Gitblit v1.9.3