瀏覽代碼

no message

xiaochan 1 年之前
父節點
當前提交
29b6133c9a
共有 1 個文件被更改,包括 29 次插入28 次删除
  1. 29 28
      src/views/data-base/data-base-api/components/DataBaseDialog.vue

+ 29 - 28
src/views/data-base/data-base-api/components/DataBaseDialog.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import {computed, ref} from "vue";
+import {ref} from "vue";
 import {
   apiPermissions,
   delCompanies, getApiListByCodeName,
@@ -25,10 +25,6 @@ const defaultProps = {
   label: 'node.name',
 }
 
-const height = computed(() => {
-  return window.innerHeight / 1.6
-})
-
 function childrenToElTree(children) {
   XEUtils.arrayEach(children, (item) => {
     item.id = item.node.id
@@ -93,29 +89,34 @@ defineExpose({
 
 <template>
   <el-dialog v-model="dialog" title="用户管理" width="60%">
-    <div style="display: flex">
-      <div style="width: max-content">
-        <el-input v-model="addName" style="width: 120px;" maxlength="100"/>
-        <el-button @click="addClick">新增</el-button>
-        <el-table :data="tokenList"
-                  @row-click="rowClick"
-                  :height="height"
-                  highlight-current-row>
-          <el-table-column label="名称" prop="name" width="120"/>
-          <el-table-column label="秘钥" prop="uuid" show-overflow-tooltip width="120"/>
-          <el-table-column>
-            <template #default="{row,$index}">
-              <el-button circle
-                         class="iconfont icon-fuzhi"
-                         type="info"
-                         @click="clickCopy(row.uuid)"/>
-              <el-button icon="Delete" circle type="danger" @click="delClick(row , $index)"/>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div style="flex: 1; overflow: auto" :style="{height :height +'px'}">
-        <el-button @click="saveClick">保存</el-button>
+    <div style="height: 500px" class="layout_container layout-horizontal">
+      <aside class="layout_container" style="width: 50%">
+        <header>
+          先调用 http://172.16.32.167:9205/permissions/getToken post 请求 参数 key 和 userCode
+          key 为下面的uuid userCode 为本院员工 code 这个接口返回一个token,使用这个token调用接口
+          <el-input v-model="addName" style="width: 120px;" maxlength="100"/>
+          <el-button @click="addClick">新增</el-button>
+          <el-button @click="saveClick">保存</el-button>
+        </header>
+        <div class="layout_main layout_el-table">
+          <el-table :data="tokenList"
+                    @row-click="rowClick"
+                    highlight-current-row>
+            <el-table-column label="名称" prop="name" width="120"/>
+            <el-table-column label="uuid" prop="uuid" show-overflow-tooltip width="120"/>
+            <el-table-column>
+              <template #default="{row,$index}">
+                <el-button circle
+                           class="iconfont icon-fuzhi"
+                           type="info"
+                           @click="clickCopy(row.uuid)"/>
+                <el-button icon="Delete" circle type="danger" @click="delClick(row , $index)"/>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </aside>
+      <div class="layout_main">
         <el-tree :data="data"
                  ref="treeRef"
                  :props="defaultProps"