From fda6fcfc6598c4349d486ca71d57c74e33043d76 Mon Sep 17 00:00:00 2001
From: 王旭 <1377869194@qq.com>
Date: 星期一, 20 二月 2023 11:32:58 +0800
Subject: [PATCH] 数据管理页面样式统一修改

---
 src/views/datamanage/projectManage.vue |  192 +++++++++++++++++++++++------------------------
 1 files changed, 94 insertions(+), 98 deletions(-)

diff --git a/src/views/datamanage/projectManage.vue b/src/views/datamanage/projectManage.vue
index f493dd3..e0056ef 100644
--- a/src/views/datamanage/projectManage.vue
+++ b/src/views/datamanage/projectManage.vue
@@ -1,9 +1,11 @@
 <template>
   <div class="verSionBox">
-    <My-bread :list="[
+    <My-bread
+      :list="[
         `${$t('dataManage.dataManage')}`,
         `${$t('dataManage.projectManage')}`,
-      ]"></My-bread>
+      ]"
+    ></My-bread>
     <el-divider />
     <div class="verSionContent">
       <div class="verSion_leftTree subpage_Div">
@@ -21,15 +23,10 @@
       </div>
       <div class="verSion_rightContent subpage_Div">
         <el-form
-        style="    height: 44px;
-    padding: 1%;
-    display: flex;
-    flex-direction: row-reverse;
-    border-radius: 5px;
-    border: 1px solid #dcdfe6;"
           :inline="true"
           class="demo-form-inline"
         >
+        
           <el-form-item>
             <el-button
               v-if="btnStatus.insert"
@@ -38,16 +35,17 @@
               :disabled="count1 != 0 ? true : false"
               type="success"
               size="small"
-            >{{ $t('common.append') }}</el-button>
+              >{{ $t("common.append") }}</el-button
+            >
           </el-form-item>
         </el-form>
         <!-- <el-divider class="eldivider" /> -->
-        <div style="height: 80%; margin-top: 10px;">
+        <div class="table_box" style="height:calc(100% - 89px)">
           <el-table
             ref="filterTable"
             :data="dbTableData"
-            height="100%"
-            border
+            height="calc(100% - 57px)"
+            
             style="width: 100%"
           >
             <el-table-column
@@ -104,10 +102,7 @@
               prop="remarks"
               :label="$t('dataManage.projectObj.remarks')"
             />
-            <el-table-column
-              label="鎿嶄綔"
-              width="200"
-            >
+            <el-table-column label="鎿嶄綔" width="200">
               <template slot-scope="scope">
                 <el-button
                   v-if="btnStatus.delete"
@@ -115,24 +110,20 @@
                   icon="el-icon-delete"
                   size="small"
                   type="danger"
-                >{{ $t('common.delete') }}</el-button>
+                  >{{ $t("common.delete") }}</el-button
+                >
                 <el-button
                   v-if="btnStatus.update"
                   @click="EditProject(scope.row)"
                   icon="el-icon-edit"
                   type="info"
                   size="small"
-                >{{ $t('common.update') }}</el-button>
+                  >{{ $t("common.update") }}</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
-          <div
-            style="margin-top: 10px"
-            class="pagination_box"
-          >
-
-          </div>
-
+          <div style="margin-top: 10px" class="pagination_box"></div>
         </div>
       </div>
     </div>
@@ -170,13 +161,10 @@
             <el-input v-model="editFrom.projtype"></el-input>
           </el-form-item>
           <el-form-item :label="$t('dataManage.projectObj.location')">
-            <el-input
-              :disabled="true"
-              v-model="editFrom.geom"
-            ></el-input>
+            <el-input :disabled="true" v-model="editFrom.geom"></el-input>
             <el-link
               @click="ShowInner"
-              style="  margin-left: 20px"
+              style="margin-left: 20px"
               icon="el-icon-plus"
             >
             </el-link>
@@ -211,22 +199,16 @@
           </el-form-item>
         </el-form>
       </div>
-      <div
-        slot="footer"
-        class="dialog-footer"
-      >
+      <div slot="footer" class="dialog-footer">
         <el-button
           type="info"
           size="small"
           :disabled="behavior != '鏂板椤圭洰' ? true : false"
           @click="setRestEditFrom"
-        >{{ $t('common.reset') }}</el-button>
-        <el-button
-          size="small"
-          type="primary"
-          @click="insertEditFrom"
-        >{{
-          $t('common.confirm')
+          >{{ $t("common.reset") }}</el-button
+        >
+        <el-button size="small" type="primary" @click="insertEditFrom">{{
+          $t("common.confirm")
         }}</el-button>
       </div>
     </el-dialog>
@@ -241,13 +223,13 @@
   project_delete,
   project_update,
   project_selectLocation,
-} from '../../api/api';
-import ProjectOl from '../../components/ProjectOl.vue';
-import MyBread from '../../components/MyBread.vue';
-import moment from 'moment';
+} from "../../api/api";
+import ProjectOl from "../../components/ProjectOl.vue";
+import MyBread from "../../components/MyBread.vue";
+import moment from "moment";
 
 export default {
-  name: 'versionManage',
+  name: "versionManage",
   components: { MyBread, ProjectOl },
   data() {
     return {
@@ -257,13 +239,13 @@
       showMap: false,
       count: null,
       projectFrom: {},
-      editFrom: { geom: ' ' },
+      editFrom: { geom: " " },
       dirId: null,
       elProject: [],
       dirList: [], //el鏍戞暟鎹�
       defaultProps: {
-        children: 'children',
-        label: 'name',
+        children: "children",
+        label: "name",
       },
       dbTableData: [],
       btnStatus: {
@@ -301,13 +283,13 @@
       this.showMap = true;
     },
     outerClose(done) {
-      this.$confirm('纭鍏抽棴锛�')
+      this.$confirm("纭鍏抽棴锛�")
         .then((_) => {
           this.setRestEditFrom();
           this.getSelectProject();
           done();
         })
-        .catch((_) => { });
+        .catch((_) => {});
     },
     async innerClose() {
       this.showMap = false;
@@ -315,10 +297,12 @@
 
       var wkt = this.$wkt.parse(this.$store.state.projeOl);
 
-      const data = await project_selectLocation({ x: wkt.coordinates[0], y: wkt.coordinates[1] })
-      console.log(data.result)
+      const data = await project_selectLocation({
+        x: wkt.coordinates[0],
+        y: wkt.coordinates[1],
+      });
+      console.log(data.result);
       if (data.code == 200) {
-
         for (var i in data.result) {
           var key = data.result[i].key;
           var val = data.result[i].value;
@@ -334,18 +318,18 @@
       this.editFrom.geom = this.$store.state.projeOl;
     },
     async insertEditFrom() {
-      if (this.behavior == '鏂板椤圭洰') {
+      if (this.behavior == "鏂板椤圭洰") {
         this.editFrom.dirid = this.dirId;
         const data = await project_insert(this.editFrom);
         if (data.code != 200) {
-          this.$message.error('椤圭洰鏂板澶辫触');
+          this.$message.error("椤圭洰鏂板澶辫触");
           return;
         }
         this.outerVisible = false;
       } else {
         const data = await project_update(this.editFrom);
         if (data.code != 200) {
-          this.$message.error('椤圭洰淇敼澶辫触');
+          this.$message.error("椤圭洰淇敼澶辫触");
           return;
         }
         this.outerVisible = false;
@@ -355,40 +339,42 @@
       this.setRestEditFrom();
     },
     setRestEditFrom() {
-      this.editFrom = { geom: ' ' };
+      this.editFrom = { geom: " " };
       this.$store.state.projeOl = null;
     },
 
     //鍒犻櫎椤圭洰
     async deleteProject(row) {
-      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ラ」鐩�, 鏄惁缁х画?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(async () => {
-        const data = await project_delete({ gid: row.gid });
-        if (data.code == 200) {
+      this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ラ」鐩�, 鏄惁缁х画?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(async () => {
+          const data = await project_delete({ gid: row.gid });
+          if (data.code == 200) {
+            this.$message({
+              message: "鍒犻櫎鎴愬姛锛�",
+              type: "success",
+            });
+            this.getRoleTabelData();
+          } else {
+            this.$message({
+              message: "鍒犻櫎澶辫触锛�",
+              type: "warning",
+            });
+          }
+        })
+        .catch(() => {
           this.$message({
-            message: "鍒犻櫎鎴愬姛锛�",
-            type: "success",
+            type: "info",
+            message: "宸插彇娑堝垹闄�",
           });
-          this.getRoleTabelData();
-        } else {
-          this.$message({
-            message: "鍒犻櫎澶辫触锛�",
-            type: "warning",
-          });
-        }
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '宸插彇娑堝垹闄�'
         });
-      });
     },
     //淇敼椤圭洰
     EditProject(row) {
-      this.behavior = '淇敼椤圭洰';
+      this.behavior = "淇敼椤圭洰";
       this.outerVisible = true;
       this.editFrom = row;
       this.$store.state.projeOl = row.geom;
@@ -396,10 +382,10 @@
     //鏂板椤圭洰
     insertProject() {
       if (this.dirId == null) {
-        this.$message.error('璇烽�夋嫨闇�瑕佹柊澧炵殑鐩綍');
+        this.$message.error("璇烽�夋嫨闇�瑕佹柊澧炵殑鐩綍");
         return;
       }
-      this.behavior = '鏂板椤圭洰';
+      this.behavior = "鏂板椤圭洰";
       this.outerVisible = true;
     },
     //鐩綍鏍戠偣鍑讳簨浠�
@@ -414,7 +400,7 @@
       this.listLoader.dirid = this.dirId;
       const data = await project_selectByDirid(this.listLoader);
       if (data.code != 200) {
-        this.$message.error('鍒楄〃鑾峰彇澶辫触');
+        this.$message.error("鍒楄〃鑾峰彇澶辫触");
         return;
       }
 
@@ -431,7 +417,7 @@
     async getSelectdirTab() {
       const res = await project_selectDirAll();
       if (res.code != 200) {
-        this.$message.error('鐩綍鍒楄〃鑾峰彇澶辫触');
+        this.$message.error("鐩綍鍒楄〃鑾峰彇澶辫触");
         return;
       }
       this.dirList = this.treeData(res.result);
@@ -443,7 +429,7 @@
       return cloneData.filter((father) => {
         // 寰幆鎵�鏈夐」
         let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁
-        branchArr.length > 0 ? (father.children = branchArr) : ''; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊�
+        branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊�
         return father.pid == 0; // 杩斿洖涓�绾ц彍鍗�
       });
     },
@@ -458,26 +444,25 @@
   width: 98%;
   padding: 1%;
   .verSionContent {
-    width: 100%;
-    height: 92%;
+      width: 100%;
+    height: calc(100% - 75px);
     display: flex;
     justify-content: space-between;
     .verSion_leftTree {
-      width: 15%;
-      height: 91%;
-
+          width: calc(23% - 0px);
+      height: 100%;
+      padding: 10px;
       border-radius: 5px;
-      padding: 1%;
-      max-height: 670px;
+      box-sizing: border-box;
       overflow-y: auto;
     }
     .verSion_rightContent {
-      width: 80%;
-      height: 91%;
-      max-height: 670px;
+      width: 75%;
+      height: 100%;
       border-radius: 5px;
-      padding: 1%;
-      overflow-y: auto;
+      padding: 10px;
+      box-sizing: border-box;
+      border: 1px solid #dcdfe6;
     }
     .projectli {
       height: 46px;
@@ -502,5 +487,16 @@
     }
   }
 }
+.demo-form-inline{
+    padding: 8px;
+  // margin-top: 10px;
+  border-radius: 5px;
+  border: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  text-align: right;
+  .el-form-item {
+    margin: 5px;
+  }
+}
 </style>
- >
+

--
Gitblit v1.9.3