gemercheung пре 7 месеци
родитељ
комит
25cfb4118c
1 измењених фајлова са 32 додато и 29 уклоњено
  1. 32 29
      src/view/organization/index.vue

+ 32 - 29
src/view/organization/index.vue

@@ -14,42 +14,22 @@
           <span style="padding-right: 100px">操作</span>
         </div>
         <div class="treeList">
-          <el-tree
-            style="width: 100%"
-            :props="{ children: 'children', label: 'name' }"
-            :data="organTrees"
-            node-key="id"
-            :current-node-key="user.info.id"
-            accordion
-            default-expand-all
-          >
+          <el-tree style="width: 100%" :props="{ children: 'children', label: 'name' }" :data="organTrees" node-key="id"
+            :current-node-key="user.info.id" accordion default-expand-all>
             <template #default="{ node, data }">
               <span class="custom-tree-node">
                 <span>{{ data.name }}</span>
-                <div
-                  class="butList oper-span"
-                  v-if="!topDeptIds.includes(Number(data.id))"
-                >
+                <div class="butList oper-span" v-if="!topDeptIds.includes(Number(data.id))">
                   <a @click.stop="openMap(data)"> 大屏链接 </a>
-                  <a
-                    @click.stop="showOrganizationDetail({ dept: data })"
-                    v-pdpath="['view']"
-                  >
+                  <a @click.stop="showOrganizationDetail({ dept: data })" v-pdpath="['view']">
                     查看
                   </a>
-                  <a
-                    @click.stop="setHandler(data)"
-                    :class="{ disable: user.info.deptId === data.id }"
-                    v-pdpath="['edit']"
-                  >
+                  <a @click.stop="setHandler(data)" :class="{ disable: user.info.deptId === data.id }"
+                    v-pdpath="['edit']">
                     编辑
                   </a>
-                  <a
-                    :class="{ disable: user.info.deptId === data.id }"
-                    style="color: var(--primaryColor)"
-                    @click.stop="delHandler(data.id)"
-                    v-pdpath="['del']"
-                  >
+                  <a :class="{ disable: user.info.deptId === data.id }" style="color: var(--primaryColor)"
+                    @click.stop="delHandler(data.id)" v-pdpath="['del']">
                     删除
                   </a>
                 </div>
@@ -72,9 +52,15 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import { RouteName, router } from "@/router";
 import { SuccessFilled } from "@element-plus/icons-vue";
 import { topDeptIds } from "@/constant/appDeptId";
+import { copyText } from "@/util";
 
 const openMap = (data: Organization) => {
-  window.open(`./map.html?deptId=${data.id}`);
+  const result = location.protocol + "//" + location.host + location.pathname + `/map.html?deptId=${data.id}`
+  console.log('result', result)
+  copyText(result);
+  ElMessage.success("链接复制成功");
+  // window.open(`./map.html?deptId=${data.id}`);
+
 };
 
 const organTrees = ref<Organization[]>([]);
@@ -135,6 +121,7 @@ onMounted(refresh);
   background-color: #fff;
   text-align: right;
 }
+
 .title {
   height: 56px;
   padding: 0 24px;
@@ -146,12 +133,15 @@ onMounted(refresh);
   background-color: #fff;
   border-bottom: 1px solid #e4e7ed;
 }
+
 .organiza-body {
   margin-top: 15px;
   background-color: #fff;
   padding: 15px;
+
   .tree {
     border: 1px solid #ebeef5;
+
     // margin-top: 24px;
     .treeTile {
       display: flex;
@@ -160,11 +150,13 @@ onMounted(refresh);
       background-color: #fafafa;
       padding: 12px 20px;
     }
+
     .treeList {
       max-height: 500px;
       overflow-y: auto;
       display: flex;
       justify-content: space-between;
+
       .custom-tree-node {
         flex: 1;
         display: flex;
@@ -172,11 +164,14 @@ onMounted(refresh);
         justify-content: space-between;
         font-size: 14px;
         padding-right: 8px;
+
         .butList {
           width: 200px;
+
           a {
             margin: 0 8px;
           }
+
           .disable {
             color: #bfbfbf !important;
             pointer-events: none;
@@ -186,10 +181,12 @@ onMounted(refresh);
     }
   }
 }
+
 .table-ctrl-right {
   .search-scene {
     margin: 0 20px 0 26px;
   }
+
   i {
     margin-left: 20px;
     font-size: 1.7rem;
@@ -205,15 +202,18 @@ onMounted(refresh);
 .camera-from {
   margin: 0 50px;
 }
+
 .share-from {
   width: 500px;
   margin: 0 auto;
 }
+
 .maker {
   font-weight: 400;
   color: #969799;
   line-height: 20px;
 }
+
 .oper-user {
   height: 40px;
   overflow: hidden; //超出的文本隐藏
@@ -228,6 +228,7 @@ onMounted(refresh);
   padding: 12px 10px;
   border-bottom: 1px solid #ebeef5;
 }
+
 .camera-from .el-select,
 .dispatch-file-from .el-select {
   width: 100%;
@@ -236,9 +237,11 @@ onMounted(refresh);
 .el-textarea__inner {
   font-family: "Microsoft YaHei";
 }
+
 .dispatch-detial .el-form-item__content {
   color: #323233;
 }
+
 .dispatch-detial .el-form-item__label {
   color: #646566;
 }