XiaXxxxxx 2 سال پیش
والد
کامیت
6de5368290

+ 2 - 2
src/api/system/system.ts

@@ -162,9 +162,9 @@ export const setRoleStatus = (id: number, status: number) => {
   return defHttp.put({ url: Api.setRoleStatus + id + '/' + status });
 };
 export const saveOrUpdateRoleInfoWithMenu = (params) => {
-  params.parentGid = session.getItem("adminRole").groupid
+  params.parentGid = session.getItem("adminRole").groupid || 'CEEFEC51A38740DBA3657F91C230784B';
   const formData = new FormData();
-  Object.keys(params).forEach((key) => formData.append(key, params[key]))
+  Object.keys(params).forEach((key) => formData.append(key, params[key]));
   return new Promise<void>((resolve, reject) => {
     defHttp.post({ url: Api.SaveOrUpdateRoleInfoWithMenu, params: formData }).then((res) => {
       resolve(res.datas)

+ 69 - 76
src/views/interface/index.vue

@@ -1,17 +1,19 @@
 <template>
-  <div :class="[`${prefixCls}-bottom`, '!dark:bg-dark-900']">
-    <div class="datacenter-left">
-      <div class="page-name">
-        <p>通用接口</p>
+  <div class="p-4">
+    <div class="interface">
+      <div class="datacenter-left">
+        <div class="page-name">
+          <p>通用接口</p>
+        </div>
+        <div class="ztree-container">
+          <p v-for="(i, k) in menu" :key="k" @click="scrollToSection(k, i)" :class="[`${action == k ? 'action' : ''}`]">{{
+            i.groupName }}({{ i.num }})</p>
+        </div>
       </div>
-      <div class="ztree-container">
-        <p v-for="(i, k) in menu" :key="k" @click="scrollToSection(k, i)" :class="[`${action == k ? 'action' : ''}`]">{{
-          i.groupName }}({{ i.num }})</p>
+      <div class="datacenter-right">
+        <AssemblyData></AssemblyData>
       </div>
     </div>
-    <div class="datacenter-right">
-      <AssemblyData></AssemblyData>
-    </div>
   </div>
 </template>
 
@@ -56,81 +58,72 @@ export default defineComponent({
 });
 </script>
 <style lang="less" scoped>
-.ztree-container p.action {
-  background: #0671DD;
-  color: #fff;
-}
+.p-4 {
+  height: 100%;
+  width: 100%;
 
-.account-center-bottom {
-  background: #fff;
-  height: calc(100vh - 80px);
-  overflow: hidden;
-}
+  .interface {
+    padding: 20px;
+    height: 100%;
+    background-color: #fff;
+    display: flex;
+    border-radius: 6px;
 
-.datacenter-right {
-  float: left;
-  width: calc(100vw - 320px);
-}
+    .datacenter-left {
+      width: 241px;
+      flex-shrink: 0;
+      height: 100%;
+      margin-right: 20px;
+      background: #F8F8F8;
 
-.ztree-container {
-  float: left;
-  overflow: auto;
-  width: 100%;
-  height: auto;
-  max-height: 976px;
-}
+      .page-name {
+        height: 40px;
+        border-bottom: solid 1px #DEDEDE;
+        box-sizing: border-box;
 
-.ztree-container p {
-  padding-left: 30px;
-  line-height: 40px;
-  margin-left: 9px;
-  width: 233px;
-  height: 40px;
-  text-align: left;
-  height: 40px;
-  background: #FFFFFF;
-  cursor: pointer;
-}
+        p {
+          height: 40px;
+          line-height: 40px;
+          font-size: 16px;
+          font-family: PingFang SC;
+          font-weight: bold;
+          color: #333333;
+          text-align: center;
+          margin-bottom: 0px;
+        }
+      }
 
-.ztree-container p:hover {
-  background: #0671DD;
-  color: #fff;
-}
+      .ztree-container {
+        padding: 0 4px;
+        width: 100%;
 
-.datacenter-left .page-name {
-  margin-bottom: 30px;
-  border-bottom: solid 1px #DEDEDE;
-}
+        p {
+          margin-top: 10px;
+          margin-bottom: 0;
+          line-height: 40px;
+          width: 100%;
+          height: 40px;
+          text-align: center;
+          background: #FFFFFF;
+          cursor: pointer;
 
-.datacenter-left .page-name p {
-  height: 42px;
-  line-height: 42px;
-  font-size: 16px;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #333333;
-  text-align: center;
-  margin-bottom: 0px;
-}
+          &:hover {
+            background: #0671DD;
+            color: #fff;
+          }
+        }
 
-.datacenter-left {
-  float: left;
-  width: 250px;
-  height: auto;
-  margin-right: 16px;
-  border-top: none;
-  background: #F8F8F8;
-  overflow: auto;
-  height: calc(100% - 20px);
-  max-height: 1306px;
-}
+        .action {
+          background: #0671DD;
+          color: #fff;
+        }
+      }
+    }
 
-.account-center {
-  &-bottom {
-    padding: 10px;
-    margin: 16px;
-    // background-color: @component-background;
-    border-radius: 3px;
+    .datacenter-right {
+      width: 100%;
+      height: 100%;
+    }
   }
 }
 </style>

+ 160 - 136
src/views/interface/item/AssemblyData.vue

@@ -1,21 +1,23 @@
 <template>
-  <Search></Search>
-  <div style="background-color: #f0f2f5" class="dark:bg-dark-900">
-    <div class="datacenter-right">
+  <div class="assembly-data">
+    <Search></Search>
+    <div class="datacenter-right-1">
       <div class="resource_list" id="map_list">
         <div v-for="(i, k) in list" :key="k" class="item">
-          <div><img :src="interfaceImg" alt="" srcset=""></div>
+          <div class="img-box"><img :src="interfaceImg" alt="" srcset=""></div>
           <div class="itemLetf">
-            <span>
-              <h1>{{ i.name }}</h1>
-              <b>
-                <span>加入申请库</span>
-                <span @click="showDrawer(i)" style="cursor: pointer;">查看详情</span>
-              </b>
-            </span>
-            <p class="remark" style="height: 32px;"><span>描述:</span>
-            <p v-html="i.remark"></p>
-            </p>
+            <div class="item-top">
+              <div class="title">{{ i.name }}</div>
+              <div class="opts-btn">
+                <div class="add-library btn">加入申请库</div>
+                <div class="interface-details btn" @click="showDrawer(i)">查看详情</div>
+              </div>
+            </div>
+            <div class="describle">
+              <div class="title">描述:</div>
+              <div class="text" v-html="i.remark"></div>
+            </div>
+            <div class="split-line"></div>
             <div class="leftBut">
               <p><span>当前版本:</span><span>{{ i.version }}</span></p>
               <p><span>调用次数:</span><span>{{ i.is_open || 0 }}</span></p>
@@ -141,7 +143,7 @@ export default defineComponent({
 
     const pageSizeOptions = ref(['10', '20', '30', '40', '50']);
     const current = ref(1);
-    const pageSize = ref(10);
+    const pageSize = ref(6);
     const total = ref(50);
     const onShowSizeChange = (current, pageSize) => {
       console.log(pageSize);
@@ -191,139 +193,161 @@ export default defineComponent({
 });
 </script>
 
-<style scoped>
-.datacenter-right {
-  position: relative;
-  height: auto;
-}
-
-.pagination {
-  width: calc(100% - 320px);
-  height: 40px;
-  position: fixed;
-  z-index: 4;
-  bottom: 16px;
-  background: #fff;
-}
-
-.pagination>ul {
-  float: right;
-}
-
-.remark span,
-.remark p {
-  display: inline-block;
-}
-
-#map_list {
-  overflow-y: scroll;
-  height: calc(100vh - 194px);
-  background: #fff;
-}
 
-#map_list::-webkit-scrollbar {
-  width: 1px;
-}
-
-.leftBut>p {
-  display: inline-block;
-  font-size: 14px;
-  font-weight: normal;
-  line-height: 16.38px;
-  letter-spacing: 0px;
-  color: #888888;
-  width: 25%;
-}
-
-.leftBut>p span:last-child {
-  color: #333;
-}
-
-.item b {
-  font-size: 16px;
-  font-weight: bold;
-  display: inline-block;
-  margin: 10px 0;
-}
 
-.item {
+<style scoped lang="less">
+.assembly-data {
   width: 100%;
-  height: 110px;
-  border-radius: 4px;
-  background: #FFFFFF;
-  border: 1px solid #DEDEDE;
-  padding: 10px;
-  float: left;
-  margin: 0px 20px 20px 0px;
-}
+  height: 100%;
 
-.item img {
-  width: 48px;
-  height: 48px;
-}
+  .datacenter-right-1 {
+    width: 100%;
+    position: relative;
+    height: calc(100% - 64px);
+    max-height: 810px;
+    // height: 890px;
 
-.item>div:first-child {
-  float: left;
-  width: 140px;
-  height: 90px;
-  overflow: hidden;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  border: solid 1px #f1eded;
-}
 
-.item>div:last-child {
-  float: left;
-  width: calc(100vw - 503px);
-  margin-left: 20px;
-}
 
-.itemLetf>span {
-  display: block;
-  height: 24px;
-  line-height: 24px;
-}
+    .resource_list {
+      width: 100%;
+      height: calc(100% - 45px);
+      max-height: 760px;
+      overflow: auto;
 
-.itemLetf>span>h1 {
-  font-size: 16px;
-  font-weight: bold;
-  line-height: 16px;
-  color: #333333;
-  float: left;
-}
+      &::-webkit-scrollbar {
+        width: 1px;
+      }
 
-.itemLetf>span>b {
-  float: right;
-  margin: 0px;
-  font-size: 14px;
-  font-weight: normal;
-  line-height: 16.38px;
-  letter-spacing: 0px;
-  color: #0671DD;
-}
+      .item {
+        margin-bottom: 20px;
+        width: 100%;
+        height: 110px;
+        border-radius: 4px;
+        background: #FFFFFF;
+        border: 1px solid #DEDEDE;
+        padding: 10px;
+        display: flex;
+        align-items: center;
+
+        &:last-child {
+          margin-bottom: 0;
+        }
 
-.itemLetf>span>b>span:first-child {
-  border-right: solid 1px #999999;
-  padding-right: 10px;
-}
+        .img-box {
+          width: 140px;
+          height: 90px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border: solid 1px #f1eded;
+          box-sizing: border-box;
+
+          img {
+            width: 48px;
+            height: 48px;
+          }
+        }
 
-.itemLetf>span>b>span:last-child {
-  padding-left: 10px;
-}
+        .itemLetf {
+          flex-grow: 1;
+          margin-left: 20px;
+          display: flex;
+          flex-direction: column;
+          justify-content: center;
+
+          .item-top {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+
+            .title {
+              font-family: Source Han Sans CN;
+              font-size: 16px;
+              font-weight: bold;
+              color: #333333;
+            }
+
+            .opts-btn {
+              margin-right: 10px;
+              display: flex;
+
+              .add-library {
+                margin-right: 9px;
+                padding-right: 9px;
+                border-right: 1px solid #0671DD;
+              }
+
+              .btn {
+                font-family: '阿里巴巴普惠体 2.0';
+                font-size: 14px;
+                font-weight: normal;
+                color: #0671DD;
+                user-select: none;
+                cursor: pointer;
+              }
+            }
+          }
+
+          .describle {
+            margin-top: 7px;
+            display: flex;
+
+            .title {
+              font-family: Source Han Sans CN;
+              font-size: 14px;
+              font-weight: normal;
+              color: #888888;
+            }
+
+            .text {
+              font-family: Source Han Sans CN;
+              font-size: 14px;
+              color: #333333;
+
+              p {
+                margin-bottom: 0 !important;
+              }
+            }
+          }
+
+          .split-line {
+            margin-top: 7px;
+            height: 1px;
+            background-color: #DEDEDE;
+          }
+
+          .leftBut {
+            margin-top: 7px;
+            display: flex;
+            justify-content: space-between;
+
+            p {
+              margin-bottom: 0;
+
+              &:last-child {
+                margin-right: 10px;
+              }
+            }
+          }
+        }
 
-.itemLetf>p {
-  text-align: left;
-  border-bottom: 1px solid #DEDEDE;
-  padding-bottom: 10px;
-}
+      }
+    }
 
-.itemLetf>p>span {
-  font-size: 14px;
-  font-weight: normal;
-  line-height: 16.38px;
-  letter-spacing: 0px;
-  color: #888888;
-  margin-right: 20px;
+    .pagination {
+      width: 100%;
+      height: 40px;
+      position: absolute;
+      // z-index: 4;
+      bottom: 0px;
+      right: 0;
+      // background: #fff;
+
+      ul {
+        float: right;
+      }
+    }
+  }
 }
 </style>

+ 3 - 3
src/views/interface/item/child/Search.vue

@@ -14,7 +14,7 @@
             <a-checkbox v-model:checked="checked2">测试数据1</a-checkbox>
             <a-checkbox v-model:checked="checked3">测试数据2</a-checkbox>
             <a-checkbox v-model:checked="checked4">测试数据3</a-checkbox> -->
-            共有<span>{{ num }}</span>个通用接口
+            共有<span>{{ num }}</span>个通用接口
         </div>
         <a-modal style="top: 50px" v-model:visible="visible" title="申请库" @ok="handleOk" width="1440px">
             <library></library>
@@ -96,14 +96,14 @@ export default defineComponent({
 
 .wrapper>span {
     display: inline-block;
-    margin-right: 30px
+    margin-right: 20px
 }
 
 .wrapper {
     width: 100%;
     height: 54px;
     padding: 11px;
-    margin-bottom: 20px;
+    margin-bottom: 10px;
     /* border-bottom: solid 1px #DEDEDE; */
     background: #F8F8F8;
     border-radius: 4px;

+ 135 - 105
src/views/resource/plat/index.vue

@@ -1,31 +1,34 @@
 <template>
-  <div :class="[`${prefixCls}-bottom`, '!dark:bg-dark-900']">
-    <div class="datacenter-left">
-      <div class="page-name">
-        <p>数据目录</p>
-      </div>
-      <div class="ztree-container">
-        <a-directory-tree :tree-data="treeData" v-model:expandedKeys="expandedKeys" v-model:selectedKeys="selectedKeys"
-          :replace-fields="{ children: 'child', key: 'id', value: 'name', title: 'name' }" v-if="treeData.length"
-          :defaultExpandAll="false" v-model:checkedKeys="checkedKeys">
-          <template #title0010><span style="color: #1890ff">sss</span></template>
-        </a-directory-tree>
+  <div class="p-4">
+    <div class="resoure-center">
+      <div class="datacenter-left">
+        <div class="page-name">
+          <p>数据目录</p>
+        </div>
+        <div class="ztree-container">
+          <a-directory-tree :tree-data="treeData" v-model:expandedKeys="expandedKeys" v-model:selectedKeys="selectedKeys"
+            v-if="treeData.length" :defaultExpandAll="false" v-model:checkedKeys="checkedKeys"
+            :replaceFields="replaceFields" @select="nodeSelect"
+            >
+            <template #title="item">{{ `${item.name}(${item.count})` }}</template>
+          </a-directory-tree>
+        </div>
       </div>
+      <Tabs>
+        <template v-for="item in  achieveList " :key="item.type">
+          <TabPane :tab="[`${item.typeName == '数据' ? '文件' : item.typeName}资源(${item.count})`]">
+            <component :is="item.type == 'MR'?'MapData':item.type == 'ER'?'SceneData':'FileData'" :listData="item.items"
+              :numb="1" />
+            <!-- <MapData v-if="item.type == 'MR'" :listData="item.items" /> -->
+            <!-- <FileData v-if="item.type == 'DR'" :listData="item.items" /> -->
+          </TabPane>
+        </template>
+      </Tabs>
     </div>
-    <Tabs>
-      <template v-for="item in  achieveList " :key="item.type">
-        <TabPane :tab="[`${item.typeName == '数据' ? '文件' : item.typeName}资源(${item.count})`]">
-          <component :is="item.type == 'MR'?'MapData':item.type == 'ER'?'SceneData':'FileData'" :listData="item.items"
-            :numb="1" />
-          <!-- <MapData v-if="item.type == 'MR'" :listData="item.items" /> -->
-          <!-- <FileData v-if="item.type == 'DR'" :listData="item.items" /> -->
-        </TabPane>
-      </template>
-    </Tabs>
   </div>
 </template>
 
-<script lang="ts">
+<script>
 import { Tabs } from 'ant-design-vue';
 import { defineComponent, ref, watch } from 'vue';
 import MapData from './item/MapData.vue';
@@ -33,8 +36,10 @@ import FileData from './item/FileData.vue';
 import SceneData from './item/SceneData.vue';
 import { onMounted } from 'vue';
 import { directoryTree, platList } from '/@/api/resource/plat';
+// import { getTreeRootId, getTreeList } from '/@/api/sys/dirManager';
+// import { session } from '/@/utils/Memory';
 
-const prefixCls = 'account-center-bottom'
+// const prefixCls = 'account-center-bottom'
 
 export default defineComponent({
   components: {
@@ -45,38 +50,134 @@ export default defineComponent({
     SceneData,
   },
   setup() {
+    const replaceFields = ref({
+      children:'child',
+      key:'id',
+      title:'name'
+    })
     const treeData = ref([]);
     const expandedKeys = ref([]);
     const selectedKeys = ref([]);
     const checkedKeys = ref([]);
     const achieveList = ref([]);
-    watch(expandedKeys, () => {
-      console.log('expandedKeys', expandedKeys);
-    });
-    watch(selectedKeys, () => {
-      console.log('selectedKeys', selectedKeys);
-    });
-    watch(checkedKeys, () => {
-      console.log('checkedKeys', checkedKeys);
-    });
+
+    const nodeSelect = (selectedKeys,{selectedNode,node})=>{
+      if(selectedKeys.length){
+        console.log(node.dataRef)
+      }
+    }
 
     onMounted(() => {
-      directoryTree().then((r) => { if (r) treeData.value = r });
+      directoryTree().then((r) => {
+        if (r) {
+          treeData.value = r[0].child[0].child
+          console.log(r[0].child[0].child);
+        }
+      });
       platList().then((r) => { if (r) console.log(r), achieveList.value = r });
     });
 
     return {
+      replaceFields,
       treeData,
       expandedKeys,
       selectedKeys,
       checkedKeys,
-      prefixCls: 'account-center',
+      // prefixCls: 'account-center',
       achieveList,
+      nodeSelect
     };
   },
 });
 </script>
 <style lang="less" scoped>
+.p-4 {
+  height: 100%;
+
+  .resoure-center {
+    padding: 20px;
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    border-radius: 6px;
+
+    .datacenter-left {
+      float: left;
+      width: 250px;
+      height: 100%;
+      margin-right: 16px;
+      border-top: none;
+      background: #F8F8F8;
+      max-height: 1306px;
+
+      .page-name {
+        height: 40px;
+        border-bottom: solid 1px #DEDEDE;
+        box-sizing: border-box;
+
+        p {
+          height: 40px;
+          line-height: 40px;
+          font-size: 16px;
+          font-family: PingFang SC;
+          font-weight: bold;
+          color: #333333;
+          text-align: center;
+          margin-bottom: 0px;
+        }
+      }
+
+      .ztree-container {
+        float: left;
+        overflow: auto;
+        width: 100%;
+        max-height: 800px;
+        height: calc(100% - 43px);
+        padding: 10px;
+
+        &::-webkit-scrollbar {
+          width: 3px;
+        }
+
+        &::-webkit-scrollbar-thumb {
+          border-radius: 2px;
+          background: #ccd5df;
+        }
+
+        &::-webkit-scrollbar-track {
+          display: none;
+        }
+
+        ::v-deep .ant-tree-treenode-selected {
+          .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-normal.ant-tree-node-selected::before {
+            background: #e0eaf5 !important;
+          }
+
+          .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-open.ant-tree-node-selected::before {
+            background: #e0eaf5 !important;
+          }
+
+          .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-close.ant-tree-node-selected::before {
+            background: #e0eaf5 !important;
+          }
+
+          .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-normal.ant-tree-node-selected {
+            color: #0671DD;
+          }
+
+          .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-open.ant-tree-node-selected {
+            color: #0671DD;
+          }
+
+          .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-close.ant-tree-node-selected {
+            color: #0671DD;
+          }
+        }
+      }
+    }
+  }
+}
+
 ::v-deep .ztree-container span.ant-tree-switcher span.anticon>svg {
   width: 20px;
   height: 20px;
@@ -89,80 +190,9 @@ export default defineComponent({
   overflow: hidden;
 }
 
-.ztree-container {
-  float: left;
-  overflow: auto;
-  width: 100%;
-  max-height: 760px;
-  padding: 10px;
-
-  &::-webkit-scrollbar {
-    width: 3px;
-  }
-
-  &::-webkit-scrollbar-thumb {
-    border-radius: 2px;
-    background: #ccd5df;
-  }
 
-  &::-webkit-scrollbar-track {
-    display: none;
-  }
 
-  ::v-deep .ant-tree-treenode-selected {
-    .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-normal.ant-tree-node-selected::before {
-      background: #e0eaf5 !important;
-    }
 
-    .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-open.ant-tree-node-selected::before {
-      background: #e0eaf5 !important;
-    }
-
-    .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-close.ant-tree-node-selected::before {
-      background: #e0eaf5 !important;
-    }
-
-    .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-normal.ant-tree-node-selected {
-      color: #0671DD;
-    }
-
-    .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-open.ant-tree-node-selected {
-      color: #0671DD;
-    }
-
-    .ant-tree-node-content-wrapper.ant-tree-node-content-wrapper-close.ant-tree-node-selected {
-      color: #0671DD;
-    }
-  }
-}
-
-.datacenter-left .page-name {
-  // background: #333333;
-  border-bottom: solid 1px #DEDEDE;
-}
-
-.datacenter-left .page-name p {
-  height: 42px;
-  line-height: 42px;
-  font-size: 16px;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #333333;
-  text-align: center;
-  margin-bottom: 0px;
-}
-
-.datacenter-left {
-  float: left;
-  width: 250px;
-  height: auto;
-  margin-right: 16px;
-  border-top: none;
-  background: #F8F8F8;
-  overflow: auto;
-  height: calc(100% - 20px);
-  max-height: 1306px;
-}
 
 .account-center {
   &-bottom {

+ 7 - 7
src/views/systemAdmin/system/position/index.vue

@@ -217,12 +217,12 @@ export default defineComponent({
                 key: 'name',
                 align: 'center'
             },
-            {
-                title: '岗位id',
-                dataIndex: 'id',
-                key: 'id',
-                align: 'center'
-            },
+            // {
+            //     title: '岗位id',
+            //     dataIndex: 'id',
+            //     key: 'id',
+            //     align: 'center'
+            // },
             {
                 title: '岗位职责',
                 dataIndex: 'duty',
@@ -230,7 +230,7 @@ export default defineComponent({
                 align: 'center'
             },
             {
-                title: '岗位排序',
+                title: '排序',
                 dataIndex: 'sort',
                 key: 'sort',
                 align: 'center'

+ 7 - 7
src/views/systemAdmin/system/zhiwei/index.vue

@@ -174,14 +174,14 @@ export default defineComponent({
                 key: 'departName',
                 align: 'center'
             },
+            // {
+            //     title: '职位id',
+            //     dataIndex: 'departid',
+            //     key: 'departid',
+            //     align: 'center'
+            // },
             {
-                title: '职位id',
-                dataIndex: 'departid',
-                key: 'departid',
-                align: 'center'
-            },
-            {
-                title: '职位排序',
+                title: '排序',
                 dataIndex: 'orderId',
                 key: 'orderId',
                 align: 'center'