From ef5f708fd5863c0c938e39b2ae754fd0c761a639 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 02 八月 2024 11:50:09 +0800
Subject: [PATCH] 链接类型搭建创建对话框以及一致性检查 创建视图 && 版本管理模块所有功能

---
 Source/plt-web/plt-web-ui/src/api/modeling/version/api.js                         |   57 ++
 Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js                        |   17 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue    |  483 +++++++++++++++++++++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue |   36 
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue      |  326 ++++++++++++++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue      |    2 
 Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js                   |    8 
 Source/plt-web/plt-web-ui/src/api/modeling/statusPool/api.js                      |   49 ++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue    |  311 +++++++++++++
 9 files changed, 1,235 insertions(+), 54 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
index 3671d5e..f3abf02 100644
--- a/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/attributePool/api.js
@@ -13,7 +13,7 @@
   });
 }
 
-// 鍒涘缓
+// 淇敼
 export function updateAttribute(params) {
   return request({
     url: "/api/attributeController/updateAttribute",
@@ -22,7 +22,7 @@
   });
 }
 
-// 淇敼
+// 鍒涘缓
 export function addAttribute(params) {
   return request({
     url: "/api/attributeController/addAttribute",
@@ -70,9 +70,9 @@
 }
 
 // 瀵煎嚭
-export function download  (params) {
+export function exportAttributes  (params) {
   return request({
-    url: '/api/attributeController/importAttributes',
+    url: '/api/attributeController/exportAttributes',
     method: 'get',
     headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
     responseType: 'blob',
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
index 9ee39f9..bedefe3 100644
--- a/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
@@ -16,3 +16,20 @@
     params
   });
 }
+
+// 涓�鑷存�ф鏌�
+export function checkLinkType(params) {
+  return request({
+    url: "/api/linkTypeController/checkLinkType",
+    method: "get",
+    params
+  });
+}
+
+// 鍒涘缓瑙嗗浘
+export function createView() {
+  return request({
+    url: "/api/linkTypeController/createView",
+    method: "post",
+  });
+}
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/statusPool/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/statusPool/api.js
index 1a9a49b..6e8c6f3 100644
--- a/Source/plt-web/plt-web-ui/src/api/modeling/statusPool/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/statusPool/api.js
@@ -5,5 +5,54 @@
   return request({
     url: "/api/statusController/gridStatus",
     method: "get",
+    params
   });
 }
+
+// 鍒涘缓
+export function addSave(params) {
+  return request({
+    url: "/api/statusController/addSave",
+    method: "post",
+    data:params
+  });
+}
+
+// 淇敼
+export function editSave(params) {
+  return request({
+    url: "/api/statusController/editSave",
+    method: "put",
+    data:params
+  });
+}
+
+// 鍒犻櫎
+export function deleteStatus(params) {
+  return request({
+    url: "/api/statusController/deleteStatus",
+    method: "delete",
+    data:params
+  });
+}
+
+// 瀵煎嚭
+export function exportStatus  (params) {
+  return request({
+    url: '/api/statusController/exportStatus',
+    method: 'get',
+    headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
+    responseType: 'blob',
+    params
+  })
+}
+
+// 鏌ョ湅浣跨敤鑼冨洿
+export function listUsed(params) {
+  return request({
+    url: "/api/statusController/listUsed",
+    method: "get",
+    params
+  });
+}
+
diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/version/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/version/api.js
new file mode 100644
index 0000000..eba0448
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/version/api.js
@@ -0,0 +1,57 @@
+import request from '@/router/axios';
+
+// 鍒楄〃鏌ヨ
+export function getVersionRuleAllList() {
+  return request({
+    url: "/api/revisionRuleController/getVersionRuleAllList",
+    method: "get",
+  });
+}
+
+// 鍒涘缓
+export function addVersionRule(params) {
+  return request({
+    url: "/api/revisionRuleController/addVersionRule",
+    method: "post",
+    data: params
+  });
+}
+
+// 淇敼
+export function updateVersionRule(params) {
+  return request({
+    url: "/api/revisionRuleController/updateVersionRule",
+    method: "put",
+    data: params
+  });
+}
+
+// 鍒犻櫎
+export function deleteVersionRule(params) {
+  return request({
+    url: "/api/revisionRuleController/deleteVersionRule",
+    method: "delete",
+    data: params
+  });
+}
+
+// 鏌ョ湅浣跨敤鑼冨洿
+export function getUsedVersionRuleList(params) {
+  return request({
+    url: "/api/revisionRuleController/getUsedVersionRuleList",
+    method: "get",
+    params
+  });
+}
+
+// 瀵煎嚭
+export function exportVersionRule  (params) {
+  return request({
+    url: '/api/revisionRuleController/exportVersionRule',
+    method: 'get',
+    headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
+    responseType: 'blob',
+    params
+  })
+}
+
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
index c2cb92a..4842e75 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -306,7 +306,7 @@
                 </el-form-item>
 
 
-                <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鏋氫妇鍊硷細'" prop="enumSwitch">
+                <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumSwitch">
                   <el-select v-if="form.enumSwitch" v-model="form.enumId" placeholder="璇烽�夋嫨鏋氫妇绫诲瀷"
                              @change="enumSelectChange">
                     <el-option v-for="(item,index) in attributeDataTypePickList" :key="index" :label="item.key"
@@ -320,8 +320,8 @@
                     <el-button size="mini" @click="enumAddHandler"> = </el-button>
                   </div>
                 </el-form-item>
-                <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue">
-                  <textarea v-model="form.rangeValue"
+                <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue">
+                  <textarea v-model="form.rangeValue" :readonly="form.enumSwitch"
                             style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
                   </textarea>
                 </el-form-item>
@@ -336,7 +336,7 @@
                 </el-form-item>
 
 
-                <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鏋氫妇鍊硷細'" prop="enumSwitch">
+                <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumSwitch">
                   <el-select v-if="form.enumSwitch" v-model="form.enumId" placeholder="璇烽�夋嫨鏋氫妇绫诲瀷"
                              @change="enumSelectChange">
                     <el-option v-for="(item,index) in attributeDataTypePickList" :key="index" :label="item.key"
@@ -356,8 +356,8 @@
                     <el-button size="mini" @click="operationHandler('()')"> () </el-button>
                   </div>
                 </el-form-item>
-                <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue">
-                  <textarea v-model="form.rangeValue"
+                <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'" prop="rangeValue">
+                  <textarea v-model="form.rangeValue" :readonly="form.enumSwitch"
                             style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
                   </textarea>
                 </el-form-item>
@@ -365,7 +365,7 @@
               <!--   VTDouble    -->
               <div v-if="form.attributeDataType === 'VTDouble'" class="right">
                 <h3>鍊煎煙</h3>
-                <el-form-item label="娣诲姞鏋氫妇鍊硷細" prop="enumAddValue">
+                <el-form-item :label="form.enumSwitch ? '鏋氫妇閫夋嫨锛�' : '娣诲姞鍊煎煙锛�'" prop="enumAddValue">
                   <el-input v-model="form.enumAddValue">
                   </el-input>
                 </el-form-item>
@@ -380,7 +380,7 @@
                     <el-button size="mini" @click="operationHandler('()')"> () </el-button>
                   </div>
                 </el-form-item>
-                <el-form-item label="褰撳墠鏋氫妇鍊硷細" prop="rangeValue">
+                <el-form-item :label="form.enumSwitch ? '褰撳墠鏋氫妇鍊硷細' : '褰撳墠鍊煎煙锛�'"  prop="rangeValue">
                   <textarea v-model="form.rangeValue"
                             style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
                   </textarea>
@@ -458,7 +458,7 @@
       append-to-body="true"
       class="avue-dialog"
       title="鏌ョ湅浣跨敤鑼冨洿"
-      width="70%"
+      width="60%"
     >
       <avue-crud
         ref="checkViewCrud"
@@ -479,7 +479,7 @@
   getUsedAttributeList,
   getEnumMapByType,
   deleteAttributes,
-  download,
+  exportAttributes,
   downloadAttributeTemplate,
   getBizTypes,
   getAllLtName,
@@ -682,7 +682,13 @@
         this.form.attributeDataType === 'VTFilePath';
     },
     rangeOptionValue() {
-      return this.form.rangeValue.split('\n')
+      let values = this.form.rangeValue.split('\n');
+
+      // 澶勭悊姣忎釜鍊硷紝鍘婚櫎绛夊彿鍓嶇殑閮ㄥ垎锛屽彧淇濈暀绛夊彿鍚庣殑閮ㄥ垎
+      return values.map(value => {
+        let parts = value.split('=');
+        return parts.length > 1 ? parts[1].trim() : value.trim();
+      });
     }
   },
   methods: {
@@ -907,16 +913,16 @@
     enumSelectChange(val) {
       const list = this.attributeDataTypePickList.find(item => item.key === val).values;
       this.form.rangeValue = list.join('\n');
-      this.form.defaultValue = list[0];
+      this.form.defaultValue = this.rangeOptionValue[0];
     },
 
     // 浣跨敤鏋氫妇switch婊戝潡change浜嬩欢
     switchEnumChange(status) {
       if (status) {
         this.form.enumId = this.attributeDataTypePickList[0].key;
-        this.form.defaultValue = this.attributeDataTypePickList[0].values[0];
         const list = this.attributeDataTypePickList[0].values;
         this.form.rangeValue = list.join('\n');
+        this.form.defaultValue = this.rangeOptionValue[0];
       } else {
         this.form.defaultValue = "";
         this.form.rangeValue = "";
@@ -1209,7 +1215,7 @@
         }
         addAttribute(this.form).then(res => {
           if (res.data.code === 200) {
-            this.$message.success(res.data.msg);
+            this.$message.success(res.data.obj);
             this.getTableList();
             this.form = form;
             this.addVisible = false;
@@ -1247,7 +1253,7 @@
       }
 
       let attrNames = this.selectList.map(item => item.id).join(',');
-      download({attrNames: attrNames}).then(res => {
+      exportAttributes({attrNames: attrNames}).then(res => {
         func.downloadFileByBlobHandler(res);
         this.$message.success('瀵煎嚭鎴愬姛');
       }).catch(err => {
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
index f6d274e..3908720 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/enumType/index.vue
@@ -97,7 +97,7 @@
           append-to-body="true"
           class="avue-dialog"
           title="鏌ョ湅浣跨敤鑼冨洿"
-          width="70%"
+          width="60%"
         >
           <avue-crud
             ref="checkViewCrud"
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 80ea9f4..4aee662 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
@@ -1,10 +1,10 @@
 <template>
-  <el-container>
+  <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">鍒涘缓
+            <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">淇敼
             </el-button>
@@ -17,17 +17,17 @@
             <el-button icon="el-icon-upload2" plain size="small" type="primary">瀵煎叆
             </el-button>
             <el-button icon="el-icon-circle-plus-outline" plain size="small"
-                       type="primary">鍒涘缓瑙嗗浘
+                       type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘
             </el-button>
             <el-button icon="el-icon-menu" plain size="small"
-                       type="primary">涓�鑷存�ф鏌�
+                       type="primary" @click="checkClickHandler">涓�鑷存�ф鏌�
             </el-button>
           </div>
           <!-- 宸︿晶鏍�         -->
           <div style="height:  calc(100vh - 300px);">
             <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
-           <span>
+           <span style="font-size: 15px">
               <i class="el-icon-s-promotion"></i>
                 {{ (node || {}).label }}
             </span>
@@ -72,7 +72,7 @@
                 <i :class="icons.domain"></i>
                 褰㈢姸
               </template>
-              <el-tag v-if="nodeRow.shape" size="small">
+              <el-tag v-if="nodeRow.shape">
                 {{ nodeRow.shape }}
               </el-tag>
             </el-descriptions-item>
@@ -94,7 +94,7 @@
                 From绔被鍨�
               </template>
               <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:2px;">
-              <el-tag effect="plain" size="small" style="margin-top: 2px;">
+              <el-tag effect="plain" style="margin-top: 2px;">
                   {{ item }}
               </el-tag>
             </span>
@@ -105,7 +105,7 @@
                 <i :class="icons.from"></i>
                 Form绔富绫诲瀷
               </template>
-              <el-tag v-if="nodeRow.primitivesFrom" effect="plain" size="small">
+              <el-tag v-if="nodeRow.primitivesFrom" effect="plain">
                 {{ nodeRow.primitivesFrom === '璇烽�夋嫨' ? nodeRow.btmItemsFrom[0] : nodeRow.primitivesFrom }}
               </el-tag>
             </el-descriptions-item>
@@ -115,7 +115,7 @@
                 <i :class="icons.from"></i>
                 From绔搴斿叧绯�
               </template>
-              <el-tag v-if="nodeRow.relationFrom" effect="plain" size="small">{{ nodeRow.relationFrom }}</el-tag>
+              <el-tag v-if="nodeRow.relationFrom" effect="plain">{{ nodeRow.relationFrom }}</el-tag>
             </el-descriptions-item>
 
           </el-descriptions>
@@ -128,7 +128,7 @@
                 To绔被鍨�
               </template>
               <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;">
-              <el-tag effect="plain" size="small" style="margin-top: 2px;">
+              <el-tag effect="plain" style="margin-top: 2px;">
                   {{ item }}
               </el-tag>
             </span>
@@ -139,7 +139,7 @@
                 <i :class="icons.to"></i>
                 To绔富绫诲瀷
               </template>
-              <el-tag v-if="nodeRow.primitivesTo" effect="plain" size="small">
+              <el-tag v-if="nodeRow.primitivesTo" effect="plain">
                 {{ nodeRow.primitivesTo === '璇烽�夋嫨' ? nodeRow.btmItemsTo[0] : nodeRow.primitivesTo }}
               </el-tag>
             </el-descriptions-item>
@@ -149,7 +149,7 @@
                 <i :class="icons.to"></i>
                 To绔搴斿叧绯�
               </template>
-              <el-tag v-if="nodeRow.relationTo" effect="plain" size="small">{{ nodeRow.relationTo }}</el-tag>
+              <el-tag v-if="nodeRow.relationTo" effect="plain">{{ nodeRow.relationTo }}</el-tag>
             </el-descriptions-item>
 
           </el-descriptions>
@@ -163,17 +163,224 @@
         </div>
       </basic-container>
     </el-main>
+
+    <!-- 鍒涘缓 && 缂栬緫   -->
+    <el-dialog
+      v-dialogDrag
+      :visible.sync="visible"
+      append-to-body="true"
+      class="avue-dialog"
+      title="鍒涘缓"
+      width="70%"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+        <div class="dialogForm">
+          <div class="leftForm">
+            <el-form-item label="鍚嶇О锛�" prop="name">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+            <el-form-item label="鏍囩锛�">
+              <el-input v-model="form.tag"></el-input>
+            </el-form-item>
+            <el-form-item label="瀹炵幇绫伙細">
+              <el-input v-model="form.impClass"></el-input>
+            </el-form-item>
+            <el-form-item label="褰㈢姸">
+              <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-form-item>
+          </div>
+
+          <div class="centerForm">
+            <el-form-item label="Form绔被鍨嬶細" label-width="110px">
+              <el-input v-model="form.btmItemsFrom"></el-input>
+            </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>
+            <el-form-item label="涓荤被鍨嬶細" label-width="110px">
+              <el-input v-model="form.primitivesFrom"></el-input>
+            </el-form-item>
+          </div>
+
+          <div class="rightForm">
+            <el-form-item label="To绔被鍨嬶細" label-width="110px">
+              <el-input v-model="form.btmItemsTo"></el-input>
+            </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>
+            <el-form-item label="涓荤被鍨嬶細" label-width="110px">
+              <el-input v-model="form.primitivesTo"></el-input>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+
+      <div class="bottomForm">
+        <h3>灞炴�ф睜鍒楄〃</h3>
+        <avue-crud
+          :data="dialogBottomData"
+          :option="dialogBottomOption"
+        >
+          <template slot="menuLeft" slot-scope="scope">
+            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="dialogAddClickHandler">澧� 鍔�
+            </el-button>
+          </template>
+        </avue-crud>
+      </div>
+      <span slot="footer" class="dialog-footer">
+         <el-button>鍙� 娑�</el-button>
+         <el-button type="primary">纭� 瀹�</el-button>
+        </span>
+
+      <!-- 灞炴�ф睜鍒楄〃 -->
+      <el-dialog
+        v-dialogDrag
+        :visible.sync="attrPollDialogVisible"
+        append-to-body="true"
+        class="avue-dialog"
+        title="灞炴�ф睜"
+        width="60%"
+        @close="dialogAttrClose"
+      >
+        <avue-crud
+          ref="dialogAttrCrud"
+          :key="dialogAttrReload"
+          :data="dialogAttrData"
+          :option="dialogAttrOption"
+          :table-loading="dialogAttrLoading"
+          @selection-change="dialogAttrSelectChange"
+          @row-click="dialogAttrRowClickHandler"
+        >
+        </avue-crud>
+        <span slot="footer" class="dialog-footer">
+         <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
+         <el-button type="primary">纭� 瀹�</el-button>
+        </span>
+      </el-dialog>
+    </el-dialog>
+
+    <!-- 涓�鑷存�ф鏌� -->
+    <el-dialog
+      v-dialogDrag
+      :visible.sync="checkVisible"
+      append-to-body="true"
+      class="avue-dialog"
+      title="涓�鑷存�ф鏌�"
+      width="60%"
+    >
+    </el-dialog>
   </el-container>
 </template>
 
 <script>
-import {gridLink} from "@/api/modeling/linkType/api";
+import {gridLink, getByAttributeNames, checkLinkType, createView} from "@/api/modeling/linkType/api";
 import basicOption from '@/util/basic-option'
+import {gridAttribute} from "@/api/modeling/attributePool/api";
 
 export default {
   name: "index",
   data() {
     return {
+      dialogAttrReload: Math.random(),
+      dialogAttrSelectList: [],
+      dialogAttrLoading: false,
+      dialogAttrData: [], // 灞炴�ф睜鏂板琛ㄦ牸
+      dialogAttrOption: {
+        ...basicOption,
+        addBtn: false,
+        menu: false,
+        refreshBtn: false,
+        index:false,
+        highlightCurrentRow: true,
+        height:450,
+        column: [
+          {
+            label: '灞炴�у悕',
+            prop: 'id',
+            sortable: true,
+          },
+          {
+            label: '灞炴�х被鍨�',
+            prop: 'attributeDataType',
+            sortable: true,
+          },
+          {
+            label: '鍒濆鍊�',
+            prop: 'defaultValue',
+            sortable: true,
+          },
+          {
+            label: '璇存槑',
+            prop: 'description',
+            sortable: true,
+            overHidden:true
+          }
+        ]
+      },
+      attrPollDialogVisible: false, // 瀵硅瘽妗� 灞炴�ф睜鍒楄〃visible
+      createViewLoading: false, // 鍒涘缓瑙嗗浘
+      checkVisible: false,
+      rules: {
+        name: [
+          {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
+        ],
+      },
+      form: {
+        name: '', // 鍚嶇О
+        tag: '', // 鏍囩
+        impClass: '', // 瀹炵幇绫�
+        shape: '', // 褰㈢姸
+        description: '', // 鎻忚堪
+        btmItemsFrom: '', // From绔被鍨嬪垪琛�
+        relationFrom: 'N', // form绔搴斿叧绯�
+        primitivesFrom: '', // form绔富绫诲瀷
+        btmItemsTo: '', // to绔被鍨嬪垪琛�
+        relationTo: 'N', // to绔搴斿叧绯�
+        primitivesTo: '', // to绔富绫诲瀷
+      },
+      dialogBottomOption: {
+        ...basicOption,
+        editBtn: false,
+        refreshBtn: false,
+        selection: false,
+        height: 300,
+        addBtn: false,
+        delBtn: false,
+        // index:false,
+        column: [
+          {
+            label: '灞炴�у悕',
+            prop: 'id',
+            sortable: true,
+          },
+          {
+            label: '灞炴�х被鍨�',
+            prop: 'attributeDataType',
+            sortable: true,
+          },
+          {
+            label: '鍒濆鍊�',
+            prop: 'defaultValue',
+            sortable: true,
+          },
+          {
+            label: '璇存槑',
+            prop: 'description',
+          }
+        ]
+      },
+      dialogBottomData: [],
+      visible: false,
       treeOption: {
         height: 'auto',
         defaultExpandAll: false,
@@ -193,25 +400,27 @@
         refreshBtn: false,
         selection: false,
         // index:false,
+        addBtn: false,
+        menu: false,
         column: [
           {
             label: '灞炴�у悕',
-            prop: 'attributeName',
+            prop: 'id',
             sortable: true,
           },
           {
             label: '灞炴�х被鍨�',
-            prop: 'source',
+            prop: 'attributeDataType',
             sortable: true,
           },
           {
             label: '鍒濆鍊�',
-            prop: 'source',
+            prop: 'defaultValue',
             sortable: true,
           },
           {
             label: '璇存槑',
-            prop: 'desc',
+            prop: 'description',
           }
         ]
       },
@@ -252,8 +461,73 @@
 
     // 鏍戠偣鍑讳簨浠�
     nodeClick(row) {
-      console.log(row);
       this.nodeRow = row;
+      this.getAttrPollData(row); // 鑾峰彇灞炴�ф睜鍒楄〃
+    },
+
+    // 鑾峰彇灞炴�ф睜鍒楄〃
+    getAttrPollData(row) {
+      let value = row.attributes.join(',');
+      getByAttributeNames({attrNames: value}).then(res => {
+        if (res.data.code === 200) {
+          this.tableData = res.data.data;
+        }
+      })
+    },
+
+    // 鍒涘缓鎸夐挳
+    addClickHandler() {
+      this.visible = true;
+    },
+
+    // 涓�鑷存�ф鏌�
+    checkClickHandler() {
+      this.checkVisible = true;
+      checkLinkType().then(res => {
+
+      }).catch(err => {
+        this.$message.error(err)
+      })
+    },
+
+    // 鍒涘缓瑙嗗浘
+    createViewClickHandler() {
+      this.createViewLoading = true;
+      createView().then(res => {
+        if (res.data.code === 200) {
+          this.createViewLoading = false;
+          this.$message.success(res.data.obj)
+        }
+      })
+    },
+
+    // 瀵硅瘽妗� 灞炴�ф睜鍒楄〃澧炲姞鎸夐挳
+    dialogAddClickHandler() {
+      this.dialogAttrLoading = true;
+      this.attrPollDialogVisible = true;
+      this.dialogAttrReload = Math.random(); // 寮哄埗鍒锋柊琛ㄦ牸 瑙e喅琛ㄦ牸閿欒
+      gridAttribute(1, -1, this.searchParams).then(res => {
+        const data = res.data.data;
+        this.dialogAttrData = data;
+        this.dialogAttrLoading = false;
+      }).catch(err => {
+        this.$message.error(err)
+      });
+    },
+
+    // 娣诲姞灞炴�ф睜琛ㄦ牸閫夋嫨妗�
+    dialogAttrSelectChange(row) {
+      this.dialogAttrSelectList = row;
+    },
+
+    // 娣诲姞灞炴�ф睜 琛岀偣鍑�
+    dialogAttrRowClickHandler(row) {
+      this.$refs.dialogAttrCrud.toggleRowSelection(row);
+    },
+
+    // 娣诲姞灞炴�ф睜 鍏抽棴瀵硅瘽妗�
+    dialogAttrClose(){
+      this.attrPollDialogVisible = false;
     }
   }
 }
@@ -263,6 +537,10 @@
 ::v-deep {
   .el-scrollbar__wrap {
     overflow: auto !important;
+  }
+
+  .el-form-item .el-select {
+    width: 100%;
   }
 }
 
@@ -287,4 +565,16 @@
 .headerCon > .el-button:nth-child(7) {
   margin-left: 0;
 }
+
+.dialogForm {
+  display: flex;
+  justify-content: space-around;
+}
+
+.dialogForm > div {
+  width: 28%;
+  border: 1px solid #eee;
+  padding: 25px 20px 5px 10px; /* 涓� 鍙� 涓� 宸� */
+  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* 娣诲姞闃村奖鏁堟灉 */
+}
 </style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
index e1499f1..424bdb9 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
@@ -5,24 +5,25 @@
       <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">鍒涘缓
+            <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">淇敼
+            <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">鍒犻櫎
+            <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎
             </el-button>
-            <el-button icon="el-icon-download" plain size="small" type="primary">瀵煎嚭
+            <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">瀵煎叆
+            <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆
             </el-button>
-            <el-button icon="el-icon-view" plain size="small" type="primary">鏌ョ湅
+            <el-button plain size="small" style="width: 100px;text-align: center" type="primary"
+                       @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
             </el-button>
           </div>
           <!-- 宸︿晶鏍�         -->
           <div style="height:  calc(100vh - 280px);">
             <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
-           <span>
+           <span style="font-size: 15px">
               <i class="el-icon-s-promotion"></i>
                 {{ (node || {}).label }}
             </span>
@@ -35,21 +36,153 @@
 
     <el-main>
       <basic-container>
-
+        <el-descriptions :column="1" border class="margin-top" size="medium" title="灞炴�т俊鎭�">
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.id"></i>
+              鍚嶇О
+            </template>
+            <el-tag v-if="nodeRow.id">{{ nodeRow.id }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.name"></i>
+              鏍囩
+            </template>
+            <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.desc"></i>
+              鎻忚堪
+            </template>
+            <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag>
+          </el-descriptions-item>
+        </el-descriptions>
       </basic-container>
     </el-main>
+
+    <!-- 鏂板 淇敼   -->
+    <el-dialog
+      v-dialogDrag
+      :title="dialogTitle === 'add' ? '鍒涘缓' : '淇敼'"
+      :visible.sync="visible"
+      append-to-body="true"
+      class="avue-dialog"
+      width="40%"
+      @close="visibleCloseHandler"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="鍚嶇О锛�" prop="id">
+              <el-input v-model="form.id"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="鏍囩锛�" prop="name">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="鎻忚堪锛�" prop="description">
+              <el-input v-model="form.description" :rows="2" type="textarea"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+         <el-button @click="visibleCloseHandler">鍙� 娑�</el-button>
+         <el-button type="primary" @click="addSaveHandler">纭� 瀹�</el-button>
+        </span>
+    </el-dialog>
+
+    <!-- 瀵煎叆    -->
+    <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
+                 @updata="getTreeList"></upload-file>
+
+    <!-- 鏌ョ湅浣跨敤鑼冨洿    -->
+    <el-dialog
+      v-dialogDrag
+      :visible.sync="checkViewVisible"
+      append-to-body="true"
+      class="avue-dialog"
+      title="鏌ョ湅浣跨敤鑼冨洿"
+      width="60%"
+    >
+      <avue-crud
+        ref="checkViewCrud"
+        :data="checkViewData"
+        :option="checkViewOption"
+        :table-loading="checkViewLoading"
+        @search-change="checkHandleSearch"
+        @search-reset="checkHandleReset"
+      >
+      </avue-crud>
+    </el-dialog>
 
   </el-container>
 
 </template>
 
 <script>
-import {gridStatus} from "@/api/modeling/statusPool/api";
+import {gridStatus, addSave, editSave, deleteStatus, exportStatus, listUsed} from "@/api/modeling/statusPool/api";
+import func from "@/util/func";
+import basicOption from "@/util/basic-option";
 
 export default {
   name: "index",
   data() {
     return {
+      checkViewVisible: false,
+      checkViewData: [],
+      checkViewDataSearch: [],
+      checkViewLoading: false,
+      checkViewOption: {
+        ...basicOption,
+        addBtn: false,
+        menu: false,
+        searchMenuSpan: 8,
+        refreshBtn: false,
+        selection: false,
+        column: [
+          {
+            label: '鍚嶇О',
+            prop: 'TreeId',
+            sortable: true,
+          },
+          {
+            label: '鏉ユ簮',
+            prop: 'name',
+            sortable: true,
+            search: true
+          },
+          {
+            label: '璇存槑',
+            prop: 'description',
+          }
+        ]
+      },
+      tipList: [
+        "璇锋敞鎰忓悕绉颁笉鑳戒负绌�",
+      ],
+      upFileType: ['xls', 'xlsx'],
+      fileUrl: 'api/statusController/importStatus',
+      dialogTitle: '',
+      form: {
+        id: "",
+        name: "",
+        description: ""
+      },
+      rules: {
+        id: [
+          {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
+        ]
+      },
+      visible: false,
       treeOption: {
         height: 'auto',
         defaultExpandAll: false,
@@ -62,25 +195,173 @@
         }
       },
       treeData: [],
-      nodeRow:{}
+      nodeRow: {},
+      descriptionOption: {
+        labelStyle: 'text-align:center;width:120px',
+        contentStyle: 'width:240px;text-align:center;word-break;break-all;'
+      },
+      icons: {
+        id: 'el-icon-finished',
+        name: 'el-icon-tickets',
+        desc: 'el-icon-chat-line-square'
+      },
     }
   },
   created() {
     this.getTreeList();
   },
   methods: {
+    // 宸︿晶鏍戣姹�
     getTreeList() {
-      gridStatus().then(res => {
+      gridStatus({page: 1, limit: -1}).then(res => {
         const data = res.data.data;
         this.treeData = data;
-        this.tableLoading = false;
       }).catch(err => {
         this.$message.error(err)
       });
     },
+
+    // 鏍戣妭鐐圭偣鍑讳簨浠�
     nodeClick(row) {
       this.nodeRow = row;
-    }
+    },
+
+    // 鍒涘缓鎸夐挳
+    addClickHandler() {
+      this.visible = true;
+      this.dialogTitle = 'add';
+    },
+
+    // 缂栬緫鎸夐挳
+    editClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+      this.visible = true;
+      this.dialogTitle = 'edit';
+      this.form = this.nodeRow;
+    },
+
+    // 鍒犻櫎
+    delClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+      this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        const list = [this.nodeRow];
+        deleteStatus(list).then(res => {
+          if (res.data.code === 200) {
+            this.$message.success(res.data.obj);
+            this.getTreeList();
+            this.nodeRow = {};
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+    },
+
+    // 鍏抽棴瀵硅瘽妗�
+    visibleCloseHandler() {
+      const form = {
+        id: "",
+        name: "",
+        imagePath: "",
+        description: ""
+      }
+      this.form = form;
+      this.visible = false;
+      this.$refs.form.clearValidate();
+    },
+
+    // 鍒涘缓鎴栫紪杈戜繚瀛�
+    addSaveHandler() {
+      const saveFunction = this.dialogTitle === 'add' ? addSave : editSave;
+
+      saveFunction(this.form).then(res => {
+        if (res.data.code === 200) {
+          this.$message.success(res.data.obj);
+          this.getTreeList();
+          this.visible = false;
+        } else {
+          this.$message.error(res.data.obj);
+        }
+      }).catch(error => {
+        this.$message.error(error);
+      });
+    },
+
+    // 瀵煎嚭
+    exportClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+
+      exportStatus({statusOids: this.nodeRow.oid}).then(res => {
+        func.downloadFileByBlobHandler(res);
+        this.$message.success('瀵煎嚭鎴愬姛');
+      }).catch(err => {
+        this.$message.error(err);
+      })
+    },
+
+    // 瀵煎叆
+    uploadClickHandler() {
+      this.$refs.upload.visible = true;
+    },
+
+    // 鏌ョ湅浣跨敤鑼冨洿
+    checkViewClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+      listUsed({oid: this.nodeRow.oid}).then(res => {
+        if (res.data.code === 200) {
+          this.checkViewVisible = true;
+          const data = res.data.data;
+          data.forEach(item => {
+            item.name = item.id + `( ${item.name} )`;
+            item.TreeId = this.nodeRow.id;
+          })
+          this.checkViewData = res.data.data;
+          this.checkViewDataSearch = res.data.data;
+        }
+      })
+    },
+    // 鏌ョ湅浣跨敤鑼冨洿鏌ヨ
+    checkHandleSearch(params, done) {
+      const {name} = params;
+
+      if (!params.name) {
+        this.checkViewData = this.checkViewDataSearch;
+        return done();
+      }
+      ;
+
+      this.checkViewData = this.checkViewData.filter(item => {
+        return item.name && item.name.includes(name);
+      });
+
+      done();
+
+    },
+
+    // 鏌ョ湅浣跨敤鑼冨洿閲嶇疆
+    checkHandleReset() {
+      this.checkViewData = this.checkViewDataSearch;
+    },
+
   }
 }
 </script>
@@ -113,4 +394,8 @@
 .headerCon > .el-button:nth-child(7) {
   margin-left: 0;
 }
+
+.upload-demo {
+  margin-left: 20px;
+}
 </style>
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
index a042dbb..cecfaa4 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
@@ -1,13 +1,490 @@
 <template>
-  <p>鐗堟湰绠$悊</p>
+  <el-container>
+    <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="delClickHandler">鍒犻櫎
+            </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 plain size="small" style="width: 100px;text-align: center" type="primary"
+                       @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿
+            </el-button>
+          </div>
+          <!-- 宸︿晶鏍�         -->
+          <div style="height:  calc(100vh - 300px);">
+            <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
+          <span slot-scope="{ node, data }" class="el-tree-node__label">
+           <span style="font-size: 15px">
+              <i class="el-icon-s-promotion"></i>
+                {{ (node || {}).label }}
+            </span>
+          </span>
+            </avue-tree>
+          </div>
+        </div>
+      </basic-container>
+    </el-aside>
+
+    <el-main>
+      <basic-container>
+        <el-descriptions :column="1" border class="margin-top" size="medium" title="灞炴�т俊鎭�">
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.id"></i>
+              鍚嶇О
+            </template>
+            <el-tag v-if="nodeRow.id">{{ nodeRow.id }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.name"></i>
+              鏍囩
+            </template>
+            <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.jump"></i>
+              璺宠穬瀛楃
+            </template>
+            <el-tag v-if="nodeRow.jumpCharacter">{{ nodeRow.jumpCharacter }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.init"></i>
+              鍒濆鍊�
+            </template>
+            <el-tag v-if="nodeRow.initialValue">{{ nodeRow.initialValue }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.length"></i>
+              姝ラ暱
+            </template>
+            <el-tag v-if="nodeRow.stepLength">{{ nodeRow.stepLength }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.left"></i>
+              鍓嶇紑
+            </template>
+            <el-tag v-if="nodeRow.prefixion">{{ nodeRow.prefixion }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.right"></i>
+              鍚庣紑
+            </template>
+            <el-tag v-if="nodeRow.suffix">{{ nodeRow.suffix }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item :contentStyle="descriptionOption.contentStyle"
+                                :labelStyle="descriptionOption.labelStyle">
+            <template slot="label">
+              <i :class="icons.desc"></i>
+              鎻忚堪
+            </template>
+            <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag>
+          </el-descriptions-item>
+        </el-descriptions>
+      </basic-container>
+    </el-main>
+
+    <!-- 鏂板 淇敼   -->
+    <el-dialog
+      v-dialogDrag
+      :title="dialogTitle === 'add' ? '鍒涘缓' : '淇敼'"
+      :visible.sync="visible"
+      append-to-body="true"
+      class="avue-dialog"
+      width="40%"
+      @close="visibleCloseHandler"
+    >
+      <el-form ref="form" :model="form" :rules="rules" label-width="95px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="鍚嶇О锛�" prop="id">
+              <el-input v-model="form.id"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏍囩锛�" prop="name">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="璺宠穬瀛楃锛�" prop="jumpCharacter">
+              <el-input v-model="form.jumpCharacter"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍒濆鍊硷細" prop="initialValue">
+              <el-input v-model="form.initialValue"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="姝ラ暱锛�" prop="stepLength">
+              <el-input-number v-model="form.stepLength" :max="9" :min="1" label="鎻忚堪鏂囧瓧"></el-input-number>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍓嶇紑锛�" prop="prefixion">
+              <el-input v-model="form.prefixion"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍚庣紑锛�" prop="suffix">
+              <el-input v-model="form.suffix"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="鎻忚堪锛�" prop="description">
+              <el-input v-model="form.description" :rows="2" type="textarea"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+         <el-button @click="visibleCloseHandler">鍙� 娑�</el-button>
+         <el-button type="primary" @click="addSaveHandler">纭� 瀹�</el-button>
+        </span>
+    </el-dialog>
+
+    <!-- 瀵煎叆    -->
+    <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆"
+                 @updata="getTreeList"></upload-file>
+
+    <!-- 鏌ョ湅浣跨敤鑼冨洿    -->
+    <el-dialog
+      v-dialogDrag
+      :visible.sync="checkViewVisible"
+      append-to-body="true"
+      class="avue-dialog"
+      title="鏌ョ湅浣跨敤鑼冨洿"
+      width="60%"
+    >
+      <avue-crud
+        ref="checkViewCrud"
+        :data="checkViewData"
+        :option="checkViewOption"
+        :table-loading="checkViewLoading"
+        @search-change="checkHandleSearch"
+        @search-reset="checkHandleReset"
+      >
+      </avue-crud>
+    </el-dialog>
+  </el-container>
 </template>
 
 <script>
+import {
+  getVersionRuleAllList,
+  addVersionRule,
+  updateVersionRule,
+  deleteVersionRule,
+  exportVersionRule,
+  getUsedVersionRuleList
+} from "@/api/modeling/version/api";
+import func from "@/util/func";
+import basicOption from "@/util/basic-option";
+
 export default {
-  name: "index"
+  name: "index",
+  data() {
+    return {
+      checkViewVisible: false,
+      checkViewData: [],
+      checkViewDataSearch: [],
+      checkViewLoading: false,
+      checkViewOption: {
+        ...basicOption,
+        addBtn: false,
+        menu: false,
+        searchMenuSpan: 8,
+        refreshBtn: false,
+        selection: false,
+        column: [
+          {
+            label: '鍚嶇О',
+            prop: 'versionRuleName',
+            sortable: true,
+          },
+          {
+            label: '鏉ユ簮',
+            prop: 'source',
+            sortable: true,
+            search: true
+          },
+          {
+            label: '璇存槑',
+            prop: 'description',
+          }
+        ]
+      },
+      tipList: [
+        "鍚嶇О涓嶈兘涓虹┖涓斿彧鑳借緭鍏ヨ嫳鏂囧瓧绗�",
+        "璺宠穬瀛楃鍙兘杈撳叆鏁板瓧鎴栧瓧姣嶏紝骞朵笖浠ヨ嫳鏂囬�楀彿鍒嗛殧",
+        "鍒濆鍊煎彧鑳借緭鍏ユ暟瀛椼�佸瓧姣嶆垨鑻辨枃绗﹀彿",
+        "姝ラ暱涓嶈兘涓虹┖涓斿繀椤讳负1-9鐨勬暣鏁�",
+      ],
+      upFileType: ['xls', 'xlsx'],
+      fileUrl: 'api/revisionRuleController/importVersionRules',
+      rules: {
+        id: [
+          {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'},
+          {pattern: /^[a-zA-Z]+$/, message: '鍙兘杈撳叆鑻辨枃瀛楃', trigger: 'blur'}
+        ],
+        initialValue: [
+          {required: true, message: '璇疯緭鍏ュ垵濮嬪��', trigger: 'blur'},
+          {pattern: /^[a-zA-Z0-9!@#$%^&*()_+{}\[\]:;"'<>,.?/\\|-]*$/, message: '鍙兘杈撳叆鏁板瓧銆佸瓧姣嶆垨鑻辨枃绗﹀彿', trigger: 'blur'}
+        ],
+        jumpCharacter: [
+          {required: true, message: '璇疯緭鍏ヨ烦璺冨瓧绗�', trigger: 'blur'},
+          {pattern: /^[a-zA-Z0-9]+(?:,[a-zA-Z0-9]+)*$/, message: '鍙兘杈撳叆鏁板瓧鎴栧瓧姣嶏紝骞朵笖浠ラ�楀彿鍒嗛殧', trigger: 'blur'}
+        ]
+      },
+      form: {
+        id: '',
+        name: '',
+        jumpCharacter: '',
+        initialValue: '',
+        stepLength: 1,
+        prefixion: '',
+        suffix: '',
+        description: ''
+      },
+      visible: false,
+      dialogTitle: '',
+      nodeRow: {},
+      treeData: [],
+      treeOption: {
+        height: 'auto',
+        defaultExpandAll: false,
+        menu: false,
+        addBtn: false,
+        props: {
+          label: 'id',
+          value: 'id',
+          children: 'children'
+        }
+      },
+      descriptionOption: {
+        labelStyle: 'text-align:center;width:120px',
+        contentStyle: 'width:240px;text-align:center;word-break;break-all;'
+      },
+      icons: {
+        id: 'el-icon-finished',
+        name: 'el-icon-tickets',
+        jump: 'el-icon-mouse',
+        init: 'el-icon-s-promotion',
+        length: 'el-icon-collection-tag',
+        left: 'el-icon-caret-left',
+        right: 'el-icon-caret-right',
+        desc: 'el-icon-chat-line-square'
+      },
+    }
+  },
+  created() {
+    this.getTreeList();
+  },
+  methods: {
+    //宸︿晶鏍戞煡璇�
+    getTreeList() {
+      getVersionRuleAllList().then(res => {
+        console.log(res);
+        const data = res.data.data;
+        this.treeData = data;
+      }).catch(err => {
+        this.$message.error(err)
+      });
+    },
+
+    // 宸︿晶鏍戣鐐瑰嚮
+    nodeClick(row) {
+      this.nodeRow = row;
+    },
+
+    // 鍒涘缓鎸夐挳
+    addClickHandler() {
+      this.dialogTitle = 'add';
+      this.visible = true;
+    },
+
+    // 淇敼鎸夐挳
+    editClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+      this.visible = true;
+      this.dialogTitle = 'edit';
+      this.form = this.nodeRow;
+    },
+
+    // 鏂板淇敼瀵硅瘽妗嗗叧闂�
+    visibleCloseHandler() {
+      const form = {
+        id: '',
+        name: '',
+        jumpCharacter: '',
+        initialValue: '',
+        stepLength: 1,
+        prefixion: '',
+        suffix: '',
+        description: ''
+      }
+      this.form = form;
+      this.visible = false;
+      this.$refs.form.clearValidate();
+    },
+
+    // 鏂板 缂栬緫 淇濆瓨
+    addSaveHandler() {
+      const saveFunction = this.dialogTitle === 'add' ? addVersionRule : updateVersionRule;
+
+      saveFunction(this.form).then(res => {
+        if (res.data.code === 200) {
+          this.$message.success(res.data.obj);
+          this.getTreeList();
+          this.visible = false;
+        } else {
+          this.$message.error(res.data.obj);
+        }
+      }).catch(error => {
+        this.$message.error(error);
+      });
+    },
+
+    // 鍒犻櫎鎸夐挳
+    delClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+      this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        const list = [this.nodeRow];
+        deleteVersionRule(list).then(res => {
+          if (res.data.code === 200) {
+            this.$message.success(res.data.obj);
+            this.getTreeList();
+            this.nodeRow = {};
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+    },
+
+    // 瀵煎嚭
+    exportClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+
+      exportVersionRule({vrNames: this.nodeRow.id}).then(res => {
+        func.downloadFileByBlobHandler(res);
+        this.$message.success('瀵煎嚭鎴愬姛');
+      }).catch(err => {
+        this.$message.error(err);
+      })
+    },
+
+    // 瀵煎叆
+    uploadClickHandler() {
+      this.$refs.upload.visible = true;
+    },
+
+    // 鏌ョ湅浣跨敤鑼冨洿
+    checkViewClickHandler() {
+      if (func.isEmptyObject(this.nodeRow)) {
+        this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒');
+        return;
+      }
+      getUsedVersionRuleList({vrName: this.nodeRow.id}).then(res => {
+        if (res.data.code === 200) {
+          this.checkViewVisible = true;
+          const data = res.data.data;
+          this.checkViewData = res.data.data;
+          this.checkViewDataSearch = res.data.data;
+        }
+      })
+    },
+
+    // 鏌ョ湅浣跨敤鑼冨洿鏌ヨ
+    checkHandleSearch(params, done) {
+      const {source} = params;
+
+      if (!params.source) {
+        this.checkViewData = this.checkViewDataSearch;
+        return done();
+      }
+      ;
+
+      this.checkViewData = this.checkViewData.filter(item => {
+        return item.source && item.source.includes(source);
+      });
+
+      done();
+
+    },
+
+    // 鏌ョ湅浣跨敤鑼冨洿閲嶇疆
+    checkHandleReset() {
+      this.checkViewData = this.checkViewDataSearch;
+    },
+  }
 }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
+::v-deep {
+  .el-scrollbar__wrap {
+    overflow: auto !important;
+  }
+}
+
+.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;
+}
 
 </style>

--
Gitblit v1.9.3