From af3837ce8a096fd9835dce06a1e55d48b63c75c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cyiyousong=E2=80=9D?= <鈥測ousong_yi@foxmail.com鈥�>
Date: Tue, 18 Jul 2023 17:56:02 +0800
Subject: [PATCH] =?UTF-8?q?pref:=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?=
 =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../InterfaceManage/components/Details.vue    | 132 ++++++++++++++++--
 1 file changed, 122 insertions(+), 10 deletions(-)

diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/productManage/components/InterfaceManage/components/Details.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/productManage/components/InterfaceManage/components/Details.vue
index 96488215..b2b33dd4 100644
--- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/productManage/components/InterfaceManage/components/Details.vue
+++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/productManage/components/InterfaceManage/components/Details.vue
@@ -10,8 +10,8 @@
       ref="ruleForm"
       :model="detailsForm"
       :rules="detailsRules"
-      :label-col="{ span: 4 }"
-      :wrapper-col="{ span: 20 }"
+      :label-col="{ span: 5 }"
+      :wrapper-col="{ span: 19 }"
     >
       <a-row :gutter="16">
         <a-col :span="12">
@@ -93,8 +93,14 @@
               showSearch
               optionFilterProp="label"
             >
-              <a-select-option value="1" label="鍒嗛挓"> 鍒嗛挓 </a-select-option>
-              <a-select-option value="2" label="灏忔椂"> 灏忔椂 </a-select-option>
+              <a-select-option
+                v-for="(v, key) of dict.limitStrategy"
+                :key="key"
+                :value="Number(key)"
+                :label="v"
+              >
+                {{ v }}
+              </a-select-option>
             </a-select>
           </a-form-model-item>
         </a-col>
@@ -116,7 +122,7 @@
               <a-select-option
                 v-for="(item, index) of dict.interfaceTag"
                 :key="index"
-                :value="index"
+                :value="Number(index)"
               >
                 {{ item }}
               </a-select-option>
@@ -131,11 +137,29 @@
               placeholder="璇烽€夋嫨"
               allowClear
             >
-              <a-select-option value="1"> 鑷缓鍙戝竷 </a-select-option>
-              <a-select-option value="2"> 瀵规帴杞寲 </a-select-option>
+              <a-select-option :value="1"> 鑷缓鍙戝竷 </a-select-option>
+              <a-select-option :value="2"> 瀵规帴杞寲 </a-select-option>
             </a-select>
           </a-form-model-item>
         </a-col>
+        <a-col :span="12">
+          <a-form-model-item label="娴佹帶淇℃伅" prop="authInfo">
+            <a-input
+              v-model="detailsForm.authInfo"
+              placeholder="璇疯緭鍏�"
+              allowClear
+            />
+          </a-form-model-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-model-item label="鎺堟潈淇℃伅" prop="flowInfo">
+            <a-input
+              v-model="detailsForm.flowInfo"
+              placeholder="璇疯緭鍏�"
+              allowClear
+            />
+          </a-form-model-item>
+        </a-col>
         <a-col :span="12">
           <a-form-model-item label="璇锋眰璺緞" prop="requestUrl">
             <a-input
@@ -292,6 +316,42 @@
           娣诲姞鍙傛暟
         </a-button>
       </div>
+      <!-- 鍙樻洿璁板綍 -->
+      <div class="flex aic jcb mt20">
+        <h1 class="title_">鍙樻洿璁板綍</h1>
+      </div>
+
+      <a-table
+        size="middle"
+        bordered
+        :row-key="(record) => record.id"
+        :locale="{ emptyText: '鏃�' }"
+        :pagination="false"
+        :columns="table_columns2"
+        :dataSource="updatePam.table"
+      >
+        <template slot="鐗堟湰鍙�" slot-scope="text, record">
+          <a-input v-model="record.version" placeholder="璇疯緭鍏�" allowClear />
+        </template>
+
+        <template slot="鍙樻洿璇存槑" slot-scope="text, record">
+          <a-input v-model="record.remark" placeholder="璇疯緭鍏�" allowClear />
+        </template>
+
+        <template slot="operation" slot-scope="text, record, index">
+          <a-button
+            type="link"
+            @click="delTabRow('updatePam', index)"
+            style="color: #ff4420"
+            >鍒犻櫎</a-button
+          >
+        </template>
+      </a-table>
+      <div class="table_footer">
+        <a-button type="primary" class="addclass" @click="addUpdatePam">
+          娣诲姞璁板綍
+        </a-button>
+      </div>
       <div class="drawer_footer">
         <a-button type="primary" class="addclass" @click="modalSubmit">
           淇濆瓨
@@ -326,6 +386,10 @@ export default {
         authorizeInfo: undefined,
         contentType: undefined,
         interfaceTag: undefined,
+        authInfo: "", // 鎺堟潈淇℃伅
+        flowInfo: "", // 娴佹帶淇℃伅
+        // 鍙樻洿淇℃伅
+        productInterfaceLogList: [],
         inEncrypt: 0,
         outEncrypt: 0,
       },
@@ -402,6 +466,31 @@ export default {
           },
         },
       ],
+      table_columns2: [
+        {
+          title: "鐗堟湰鍙�",
+          align: "center",
+          width: "18%",
+          scopedSlots: {
+            customRender: "鐗堟湰鍙�",
+          },
+        },
+        {
+          title: "鍙樻洿璇存槑",
+          align: "center",
+          scopedSlots: {
+            customRender: "鍙樻洿璇存槑",
+          },
+        },
+        {
+          title: "鎿嶄綔",
+          align: "center",
+          width: "60px",
+          scopedSlots: {
+            customRender: "operation",
+          },
+        },
+      ],
       requestPam: {
         type: "path",
         table: [],
@@ -417,6 +506,14 @@ export default {
           },
         ],
       },
+      updatePam: {
+        table: [
+          {
+            version: ``,
+            remark: ``,
+          },
+        ],
+      },
       errorCode_columns: [
         {
           title: "Http Code",
@@ -503,6 +600,7 @@ export default {
         this.detailsForm = res.data;
         this.requestPam = JSON.parse(res.data.requestParameters);
         this.responsePam = JSON.parse(res.data.responseParameters);
+        this.updatePam.table = this.detailsForm.productInterfaceLogList || [];
       });
     },
     modalSubmit() {
@@ -512,15 +610,14 @@ export default {
           if (json.network.length) json.network = json.network.join(",");
           json.requestParameters = JSON.stringify(this.requestPam);
           json.responseParameters = JSON.stringify(this.responsePam);
+          json.productInterfaceLogList = this.updatePam.table;
           getInterfaceSave(json).then((res) => {
-            let { code, msg } = res;
+            let { code } = res;
             if (code == 1) {
               this.$message.success("淇濆瓨鎴愬姛");
               this.resetForm();
               this.modalInfo.visible = false;
               this.$parent.getList();
-            } else {
-              this.$message.error(msg);
             }
           });
         } else {
@@ -561,6 +658,13 @@ export default {
         describe: ``,
       });
     },
+
+    addUpdatePam() {
+      this.updatePam.table.push({
+        version: ``,
+        remark: ``,
+      });
+    },
     delTabRow(key, index) {
       this[key].table.splice(index, 1);
     },
@@ -583,6 +687,14 @@ export default {
             },
           ],
         };
+        this.updatePam = {
+          table: [
+            {
+              version: ``,
+              remark: ``,
+            },
+          ],
+        };
         this.modalInfo.visible = false;
       });
     },
-- 
2.24.3