From f6ebd1820968db8521bed86d25b183efe7eb877b Mon Sep 17 00:00:00 2001
From: lxl <lixuliang_hd@126.com>
Date: 星期四, 27 十月 2022 16:01:40 +0800
Subject: [PATCH] 权限

---
 src/api/api.js                            |   32 +-
 src/views/datamanage/dictionaryManage.vue |  334 ++++++++++++++++++++-----
 src/views/datamanage/addStyle.vue         |   20 +
 src/views/datamanage/versionManage.vue    |  101 ++++---
 src/views/datamanage/dataUpdata.vue       |   22 +
 src/views/datamanage/styleManage.vue      |  226 +++++++++--------
 src/views/datamanage/SpatialData.vue      |   18 +
 7 files changed, 515 insertions(+), 238 deletions(-)

diff --git a/src/api/api.js b/src/api/api.js
index 50d4b97..0a26a90 100644
--- a/src/api/api.js
+++ b/src/api/api.js
@@ -403,7 +403,7 @@
 export function select_meta_ByPageAndCount(params) {
   return request.get('/meta/selectByPageAndCount', { params: params });
 }
-// //鍏冩暟鎹鐞嗗垪琛ㄦ柊澧�
+//鍏冩暟鎹鐞嗗垪琛ㄦ柊澧�
 export function insertMeta(params) {
   return request.post('/meta/insert', params);
 }
@@ -434,11 +434,11 @@
 export function querySitePoint(size, index, name) {
   return service.get(
     '/LFServer/SitePoint/Query?pageSize=' +
-      size +
-      '&pageIndex=' +
-      (index - 1) +
-      '&name=' +
-      name
+    size +
+    '&pageIndex=' +
+    (index - 1) +
+    '&name=' +
+    name
   );
 }
 //璇锋眰绔欏満鐐规暟閲�
@@ -449,11 +449,11 @@
 export function queryStationSeries(size, index, name) {
   return service.get(
     '/LFServer/StationSeries/Query?pageSize=' +
-      size +
-      '&pageIndex=' +
-      (index - 1) +
-      '&name=' +
-      name
+    size +
+    '&pageIndex=' +
+    (index - 1) +
+    '&name=' +
+    name
   );
 }
 //璇锋眰绠¢亾涓績绾挎暟閲�
@@ -465,11 +465,11 @@
 export function queryMarker(size, index, name) {
   return service.get(
     '/LFServer/Marker/Query?pageSize=' +
-      size +
-      '&pageIndex=' +
-      (index - 1) +
-      '&name=' +
-      name
+    size +
+    '&pageIndex=' +
+    (index - 1) +
+    '&name=' +
+    name
   );
 }
 //璇锋眰鏍囨々鏁伴噺
diff --git a/src/views/datamanage/SpatialData.vue b/src/views/datamanage/SpatialData.vue
index 58dc6ae..da0a00a 100644
--- a/src/views/datamanage/SpatialData.vue
+++ b/src/views/datamanage/SpatialData.vue
@@ -16,6 +16,7 @@
             >鏌ヨ</el-button
           >
           <el-button
+          
             @click="resetForm('ruleForm')"
             icon="el-icon-refresh"
             type="info"
@@ -23,6 +24,7 @@
             >閲嶇疆</el-button
           >
           <el-button
+          v-if="btnStatus.delete"
             @click="DelFormData"
             icon="el-icon-delete"
             type="danger"
@@ -355,13 +357,29 @@
       currentPage: 1,
       searchName: "",
       multipleSelection: [],
+      btnStatus: {
+        select: false,
+        delete: false,
+        upload: false,
+        download: false,
+        insert: false,
+        update: false,
+      },
     };
   },
   created() {
     // this.getSPData(10, 1, "");
     // this.getSPCount("");
+    this.showPermsBtn();
   },
   methods: {
+    showPermsBtn() {
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
+      permsEntity
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+    },
     handleNodeClick(data) {
       this.closeDetial();
       this.changePag = false;
diff --git a/src/views/datamanage/addStyle.vue b/src/views/datamanage/addStyle.vue
index 0e1c8a9..6a52c6e 100644
--- a/src/views/datamanage/addStyle.vue
+++ b/src/views/datamanage/addStyle.vue
@@ -176,6 +176,14 @@
   },
   data() {
     return {
+      btnStatus: {
+        select: false,
+        delete: false,
+        upload: false,
+        download: false,
+        insert: false,
+        update: false,
+      },
       options: [
         {
           value: "DEM",
@@ -228,6 +236,14 @@
     },
   },
   methods: {
+    //鏄剧ず鏉冮檺鎸夐挳
+    showPermsBtn() {
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
+      permsEntity
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+    },
     startFromData() {
       this.count = 0;
       this.pageSize = 1;
@@ -240,8 +256,8 @@
       this.$router.push("/styleManage");
     },
     // 璇锋眰鏁版嵁
-    getStyleData(size, index,name) {
-      StyleQuery(size, index,name).then((res) => {
+    getStyleData(size, index, name) {
+      StyleQuery(size, index, name).then((res) => {
         console.log(res);
         this.tableData = res.data;
       });
diff --git a/src/views/datamanage/dataUpdata.vue b/src/views/datamanage/dataUpdata.vue
index 774d38b..791341d 100644
--- a/src/views/datamanage/dataUpdata.vue
+++ b/src/views/datamanage/dataUpdata.vue
@@ -61,7 +61,9 @@
             >閫夋嫨</el-button
           >
           <p class="show"></p>
+
           <el-button
+            v-if="btnStatus.upload"
             @click="uploadFile"
             icon="el-icon-thumb"
             type="success"
@@ -243,6 +245,14 @@
       currentPage: 1,
       pageSize: 10,
       pageNum: 1,
+      btnStatus: {
+        select: false,
+        delete: false,
+        upload: false,
+        download: false,
+        insert: false,
+        update: false,
+      },
     };
   },
 
@@ -290,10 +300,18 @@
     },
   },
   created() {
-    this.getMetaData(10, 1);
-    this.getMetaCount("");
+    // this.getMetaData(10, 1);
+    // this.getMetaCount("");
+    this.showPermsBtn();
   },
   methods: {
+    showPermsBtn() {
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
+      permsEntity
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+    },
     // 璇锋眰鏁版嵁
     getMetaData(size, index) {
       queryUploadData(size, index).then((res) => {
diff --git a/src/views/datamanage/dictionaryManage.vue b/src/views/datamanage/dictionaryManage.vue
index 050fcbc..b97d801 100644
--- a/src/views/datamanage/dictionaryManage.vue
+++ b/src/views/datamanage/dictionaryManage.vue
@@ -9,7 +9,10 @@
     <el-divider />
     <div class="searchComp">
       <el-form ref="ruleForm" :model="ruleForm" :inline="true">
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')" prop="name">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.tableName')"
+          prop="name"
+        >
           <el-select
             clearable
             v-model="queryName"
@@ -28,17 +31,19 @@
         <el-form-item>
           <el-button
             @click="InsertFormdialog = true"
+            v-if="btnStatus.insert"
             icon="el-icon-edit"
             type="success"
             size="small"
-            >{{$t('dataManage.dictionaryManageObj.add')}}</el-button
+            >{{ $t("dataManage.dictionaryManageObj.add") }}</el-button
           >
           <el-button
+            v-if="btnStatus.delete"
             @click="DelFormData"
             icon="el-icon-delete"
             type="danger"
             size="small"
-            >{{$t('dataManage.dictionaryManageObj.del')}}</el-button
+            >{{ $t("dataManage.dictionaryManageObj.del") }}</el-button
           >
         </el-form-item>
       </el-form>
@@ -54,14 +59,47 @@
             height="98%"
           >
             <el-table-column type="selection" width="55" />
-            <el-table-column prop="orderNum" :label="$t('dataManage.dictionaryManageObj.number')" />
-            <el-table-column min-width="100" prop="field" :label="$t('dataManage.dictionaryManageObj.fieldName')" />
-            <el-table-column min-width="90" prop="alias" :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" />
-            <el-table-column min-width="100" prop="type" :label="$t('dataManage.dictionaryManageObj.fieldType')" />
-            <el-table-column min-width="60" prop="len" :label="$t('dataManage.dictionaryManageObj.fieldLength')" />
-            <el-table-column min-width="60" prop="precision" :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" />
-            <el-table-column min-width="100" prop="tab" :label="$t('dataManage.dictionaryManageObj.rangeAssociationTable')" />
-            <el-table-column min-width="100" prop="bak" :label="$t('dataManage.dictionaryManageObj.remark')" />
+            <el-table-column
+              prop="orderNum"
+              :label="$t('dataManage.dictionaryManageObj.number')"
+            />
+            <el-table-column
+              min-width="100"
+              prop="field"
+              :label="$t('dataManage.dictionaryManageObj.fieldName')"
+            />
+            <el-table-column
+              min-width="90"
+              prop="alias"
+              :label="$t('dataManage.dictionaryManageObj.fieldAliasName')"
+            />
+            <el-table-column
+              min-width="100"
+              prop="type"
+              :label="$t('dataManage.dictionaryManageObj.fieldType')"
+            />
+            <el-table-column
+              min-width="60"
+              prop="len"
+              :label="$t('dataManage.dictionaryManageObj.fieldLength')"
+            />
+            <el-table-column
+              min-width="60"
+              prop="precision"
+              :label="$t('dataManage.dictionaryManageObj.FieldPrecision')"
+            />
+            <el-table-column
+              min-width="100"
+              prop="tab"
+              :label="
+                $t('dataManage.dictionaryManageObj.rangeAssociationTable')
+              "
+            />
+            <el-table-column
+              min-width="100"
+              prop="bak"
+              :label="$t('dataManage.dictionaryManageObj.remark')"
+            />
             <el-table-column
               min-width="100"
               prop="createTime"
@@ -85,15 +123,21 @@
               :label="$t('dataManage.dictionaryManageObj.updatePersonnel')"
             />
 
-            <el-table-column min-width="70" :label="$t('dataManage.dictionaryManageObj.operation')">
+            <el-table-column
+              min-width="70"
+              :label="$t('dataManage.dictionaryManageObj.operation')"
+            >
               <template slot-scope="scope">
-                <el-link @click="showDetail(scope.$index, scope.row)"
-                  >{{$t('dataManage.dictionaryManageObj.lookOver')}}</el-link
+                <el-link
+                  v-if="btnStatus.select"
+                  @click="showDetail(scope.$index, scope.row)"
+                  >{{ $t("dataManage.dictionaryManageObj.lookOver") }}</el-link
                 >
                 <el-link
+                  v-if="btnStatus.update"
                   @click="handleEdit(scope.$index, scope.row)"
                   style="margin-left: 10px"
-                  >{{$t('dataManage.dictionaryManageObj.revamp')}}</el-link
+                  >{{ $t("dataManage.dictionaryManageObj.revamp") }}</el-link
                 >
               </template>
             </el-table-column>
@@ -119,39 +163,87 @@
     <div class="infoBox" v-show="showinfoBox">
       <el-card class="box-card">
         <div slot="header" class="clearfix">
-          <span>{{$t('dataManage.dictionaryManageObj.particulars')}}</span>
+          <span>{{ $t("dataManage.dictionaryManageObj.particulars") }}</span>
           <div style="float: right; cursor: pointer" @click="closeDetial">
             <i class="el-icon-close"></i>
           </div>
         </div>
         <div class="contentBox">
-          <p>{{$t('dataManage.dictionaryManageObj.tableName')}}锛歿{ itemdetail.tab }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.tableName") }}锛歿{
+              itemdetail.tab
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.tableAliasName')}}锛歿{ itemdetail.tabDesc }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.tableAliasName") }}锛歿{
+              itemdetail.tabDesc
+            }}
+          </p>
           <el-divider></el-divider>
           <!-- <p>琛ㄧ被鍨嬶細{{ itemdetail.type }}</p>
           <el-divider></el-divider> -->
-          <p>{{$t('dataManage.dictionaryManageObj.fieldName')}}锛歿{ itemdetail.field }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.fieldName") }}锛歿{
+              itemdetail.field
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.fieldAliasName')}}锛歿{ itemdetail.alias }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.fieldAliasName") }}锛歿{
+              itemdetail.alias
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.fieldType')}}锛歿{ itemdetail.type }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.fieldType") }}锛歿{
+              itemdetail.type
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.fieldLength')}}锛歿{ itemdetail.len }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.fieldLength") }}锛歿{
+              itemdetail.len
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.FieldPrecision')}}锛歿{ itemdetail.precision }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.FieldPrecision") }}锛歿{
+              itemdetail.precision
+            }}
+          </p>
           <el-divider></el-divider>
           <!-- <p>鍊煎煙鍏宠仈琛細{{ itemdetail.domain_name }}</p>
           <el-divider></el-divider> -->
-          <p>{{$t('dataManage.dictionaryManageObj.remark')}}锛歿{ itemdetail.bak }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.remark") }}锛歿{
+              itemdetail.bak
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.creationTime')}}锛歿{ itemdetail.createTime }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.creationTime") }}锛歿{
+              itemdetail.createTime
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.createPersonnel')}}锛歿{ itemdetail.createUser }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.createPersonnel") }}锛歿{
+              itemdetail.createUser
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.updateTime')}}锛歿{ itemdetail.updateTime }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.updateTime") }}锛歿{
+              itemdetail.updateTime
+            }}
+          </p>
           <el-divider></el-divider>
-          <p>{{$t('dataManage.dictionaryManageObj.updatePersonnel')}}锛歿{ itemdetail.updateUser }}</p>
+          <p>
+            {{ $t("dataManage.dictionaryManageObj.updatePersonnel") }}锛歿{
+              itemdetail.updateUser
+            }}
+          </p>
         </div>
       </el-card>
     </div>
@@ -162,13 +254,22 @@
       :visible.sync="dialogFormVisible"
     >
       <el-form :model="upform">
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.number')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.number')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.orderNum" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.tableName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.tab" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.tableAliasName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.tableAliasName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.tabDesc" autocomplete="off"></el-input>
         </el-form-item>
         <!-- <el-form-item label="绫诲瀷" :label-width="formLabelWidth">
@@ -182,31 +283,53 @@
             <el-option label="闈㈠嚑浣�" value="闈㈠嚑浣�"></el-option>
           </el-select>
         </el-form-item> -->
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.field" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldAliasName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.alias" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldType')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldType')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.type" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldLength')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldLength')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.len" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.FieldPrecision')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.precision" autocomplete="off"></el-input>
         </el-form-item>
         <!-- <el-form-item label="鍊煎煙鍚嶇О" :label-width="formLabelWidth">
           <el-input v-model="upform.domain_name" autocomplete="off"></el-input>
         </el-form-item> -->
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.remark')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.remark')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="upform.bak" autocomplete="off"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">{{$t('dataManage.dictionaryManageObj.cancel')}}</el-button>
-        <el-button type="primary" @click="updateForm">{{$t('dataManage.dictionaryManageObj.confirm')}}</el-button>
+        <el-button @click="dialogFormVisible = false">{{
+          $t("dataManage.dictionaryManageObj.cancel")
+        }}</el-button>
+        <el-button type="primary" @click="updateForm">{{
+          $t("dataManage.dictionaryManageObj.confirm")
+        }}</el-button>
       </div>
     </el-dialog>
     <el-dialog
@@ -216,13 +339,22 @@
       :visible.sync="InsertFormdialog"
     >
       <el-form :model="insertform">
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.number')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.number')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.orderNum" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.tableName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.tableName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.tab" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.tableAliasName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.tableAliasName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.tabDesc" autocomplete="off"></el-input>
         </el-form-item>
         <!-- <el-form-item label="绫诲瀷" :label-width="formLabelWidth">
@@ -236,19 +368,34 @@
             <el-option label="闈㈠嚑浣�" value="闈㈠嚑浣�"></el-option>
           </el-select>
         </el-form-item> -->
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.field" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldAliasName')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldAliasName')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.alias" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldType')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldType')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.type" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.fieldLength')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.fieldLength')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.len" autocomplete="off"></el-input>
         </el-form-item>
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.FieldPrecision')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.FieldPrecision')"
+          :label-width="formLabelWidth"
+        >
           <el-input
             v-model="insertform.precision"
             autocomplete="off"
@@ -260,13 +407,20 @@
             autocomplete="off"
           ></el-input>
         </el-form-item> -->
-        <el-form-item :label="$t('dataManage.dictionaryManageObj.remark')" :label-width="formLabelWidth">
+        <el-form-item
+          :label="$t('dataManage.dictionaryManageObj.remark')"
+          :label-width="formLabelWidth"
+        >
           <el-input v-model="insertform.bak" autocomplete="off"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="InsertFormdialog = false">{{$t('dataManage.dictionaryManageObj.cancel')}}</el-button>
-        <el-button type="primary" @click="insertFromData">{{$t('dataManage.dictionaryManageObj.confirm')}}</el-button>
+        <el-button @click="InsertFormdialog = false">{{
+          $t("dataManage.dictionaryManageObj.cancel")
+        }}</el-button>
+        <el-button type="primary" @click="insertFromData">{{
+          $t("dataManage.dictionaryManageObj.confirm")
+        }}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -308,13 +462,29 @@
         pageSize: 10,
       },
       selectData: [],
+      btnStatus: {
+        select: false,
+        delete: false,
+        upload: false,
+        download: false,
+        insert: false,
+        update: false,
+      },
     };
   },
   created() {
     this.startQueryNameData();
     this.getSelectDictTab();
+    this.showPermsBtn();
   },
   methods: {
+    showPermsBtn() {
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
+      permsEntity
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+    },
     //涓嬫媺閫夐」璋冪敤
     async getSelectDictTab() {
       this.selectData = [];
@@ -377,20 +547,28 @@
     },
     //淇敼璇︽儏
     updateForm() {
-      this.$confirm(`${$t('dataManage.dictionaryManageObj.tipsUp')}`,`${$t('dataManage.dictionaryManageObj.tips')}`, {
-        confirmButtonText: `${$t('dataManage.dictionaryManageObj.confirm')}`,
-        cancelButtonText: `${$t('dataManage.dictionaryManageObj.cancel')}`,
-        type: "warning",
-      })
+      this.$confirm(
+        `${$t("dataManage.dictionaryManageObj.tipsUp")}`,
+        `${$t("dataManage.dictionaryManageObj.tips")}`,
+        {
+          confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`,
+          cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`,
+          type: "warning",
+        }
+      )
         .then(async () => {
           const data = await updateDict(this.upform);
           if (data.code != 200) {
-            this.$message.error(`${$t('dataManage.dictionaryManageObj.failModify')}`);
+            this.$message.error(
+              `${$t("dataManage.dictionaryManageObj.failModify")}`
+            );
           }
           this.dialogFormVisible = false;
           this.startQueryNameData();
           this.$message({
-            message: `${$t('dataManage.dictionaryManageObj.modifySuccessfully')}`,
+            message: `${$t(
+              "dataManage.dictionaryManageObj.modifySuccessfully"
+            )}`,
             type: "success",
           });
         })
@@ -426,20 +604,26 @@
     },
     //鏂板
     insertFromData() {
-      this.$confirm(`${$t('dataManage.dictionaryManageObj.tipsAdd')}`, `${$t('dataManage.dictionaryManageObj.tips')}`, {
-        confirmButtonText: `${$t('dataManage.dictionaryManageObj.confirm')}`,
-        cancelButtonText: `${$t('dataManage.dictionaryManageObj.cancel')}`,
-        type: "warning",
-      })
+      this.$confirm(
+        `${$t("dataManage.dictionaryManageObj.tipsAdd")}`,
+        `${$t("dataManage.dictionaryManageObj.tips")}`,
+        {
+          confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`,
+          cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`,
+          type: "warning",
+        }
+      )
         .then(async () => {
           const data = await insertDict(this.insertform);
           if (data.code != 200) {
-            this.$message.error( `${$t('dataManage.dictionaryManageObj.FailedAdd')}`);
+            this.$message.error(
+              `${$t("dataManage.dictionaryManageObj.FailedAdd")}`
+            );
           }
           this.InsertFormdialog = false;
           this.startQueryNameData();
           this.$message({
-            message: `${$t('dataManage.dictionaryManageObj.NewSuccess')}`,
+            message: `${$t("dataManage.dictionaryManageObj.NewSuccess")}`,
             type: "success",
           });
         })
@@ -457,19 +641,27 @@
       for (var i in this.multipleSelection) {
         std.push(this.multipleSelection[i].id);
       }
-      this.$confirm(`${$t('dataManage.dictionaryManageObj.tipsDelete')}`, `${$t('dataManage.dictionaryManageObj.tips')}`, {
-        confirmButtonText:`${$t('dataManage.dictionaryManageObj.confirm')}`,
-        cancelButtonText: `${$t('dataManage.dictionaryManageObj.cancel')}`,
-        type: "warning",
-      })
+      this.$confirm(
+        `${$t("dataManage.dictionaryManageObj.tipsDelete")}`,
+        `${$t("dataManage.dictionaryManageObj.tips")}`,
+        {
+          confirmButtonText: `${$t("dataManage.dictionaryManageObj.confirm")}`,
+          cancelButtonText: `${$t("dataManage.dictionaryManageObj.cancel")}`,
+          type: "warning",
+        }
+      )
         .then(async () => {
           const data = await deleteDicts({ ids: std.toString() });
           if (data.code != 200) {
-            this.$message.error(`${$t('dataManage.dictionaryManageObj.DeleteFailed')}`);
+            this.$message.error(
+              `${$t("dataManage.dictionaryManageObj.DeleteFailed")}`
+            );
           }
           this.$message({
             type: "success",
-            message:`${$t('dataManage.dictionaryManageObj.deletedSuccessfully')}`,
+            message: `${$t(
+              "dataManage.dictionaryManageObj.deletedSuccessfully"
+            )}`,
           });
           this.startQueryNameData();
         })
diff --git a/src/views/datamanage/styleManage.vue b/src/views/datamanage/styleManage.vue
index ce36f97..1ed9d6e 100644
--- a/src/views/datamanage/styleManage.vue
+++ b/src/views/datamanage/styleManage.vue
@@ -30,14 +30,14 @@
             size="small"
             >{{ $t('common.empty') }}</el-button
           >
-          <el-button
+          <el-button  v-if="btnStatus.insert"
             @click="InsertFormdialog = true"
             icon="el-icon-edit"
             type="success"
             size="small"
             >{{ $t('common.append') }}</el-button
           >
-          <el-button
+          <el-button  v-if="btnStatus.delete"
             @click="delStyleData"
             icon="el-icon-delete"
             type="danger"
@@ -365,20 +365,19 @@
           <el-input v-model="upform.fileGuid" disabled autocomplete="off"></el-input>
            <input
             name="file1"
-
             type="file"
             id="editFile"
             multiple="multiple"
             style="display: none"
             @change="editFile(0)"
           />
-           <el-link
+           <el-link 
             :underline="false"
             @click="geteditFile(0)"
             style="margin-left: 10px"
             ><i class="el-icon-plus"></i
           ></el-link>
-           <el-link
+           <el-link v-if="btnStatus.upload"
            :title="$t('common.upload')"
             :underline="false"
             @click="seteditFile(0)"
@@ -400,7 +399,7 @@
             style="display: none"
             @change="editFile(1)"
           />
-           <el-link
+           <el-link 
             :underline="false"
             @click="geteditFile(1)"
             style="margin-left: 10px"
@@ -615,23 +614,21 @@
 </template>
 
 <script>
-import $ from 'jquery';
-import moment from 'moment';
-import {
-  getToken
-} from '../../utils/auth.js'
-import MyBread from '../../components/MyBread.vue';
-import styleDirTree from './styleDirTree.vue';
-import styleDepTree from './styleDepTree.vue';
+import $ from "jquery";
+import moment from "moment";
+import { getToken } from "../../utils/auth.js";
+import MyBread from "../../components/MyBread.vue";
+import styleDirTree from "./styleDirTree.vue";
+import styleDepTree from "./styleDepTree.vue";
 import {
   select_Style_ByPageAndCount,
   insertStyle,
   deleteStyles,
   updateStyle,
-  upload_style
-} from '../../api/api';
+  upload_style,
+} from "../../api/api";
 export default {
-  name: 'styleManage',
+  name: "styleManage",
   components: { MyBread, styleDirTree, styleDepTree },
   data() {
     return {
@@ -639,15 +636,14 @@
       InsertFormdialog: false,
       showCata: false,
       upform: {},
-      formLabelWidth: '130px',
+      formLabelWidth: "130px",
       showinfoBox: false,
       itemdetail: {},
-      ruleForm: {
-      },
+      ruleForm: {},
 
       backupData: [],
 
-      searchName: '',
+      searchName: "",
       multipleSelection: [],
       upflag: false,
       /** */
@@ -668,32 +664,48 @@
         pageIndex: 1,
         pageSize: 10,
       },
+      btnStatus: {
+        select: false,
+        delete: false,
+        upload: false,
+        download: false,
+        insert: false,
+        update: false,
+      },
     };
   },
   created() {
     this.getRoleTabelData();
+    this.showPermsBtn();
   },
   methods: {
+    showPermsBtn() {
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
+      permsEntity
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+    },
     filesReset() {
-      document.getElementById('insertFile').reset();
-      document.getElementById('insertimageFile').reset();
+      document.getElementById("insertFile").reset();
+      document.getElementById("insertimageFile").reset();
       this.guidFile = null;
       this.fileGuid = null;
     },
     getInsertFile(res) {
       if (res == 0) {
-        $('#insertFile').click();
+        $("#insertFile").click();
       } else if (res == 1) {
-        $('#insertimageFile').click();
+        $("#insertimageFile").click();
       }
     },
     insertFile(res) {
       if (res == 0) {
-        var val = document.getElementById('insertFile').files;
+        var val = document.getElementById("insertFile").files;
         if (!val || !val.length) return;
         this.insertform.fileGuid = val[0].name;
       } else if (res == 1) {
-        var val = document.getElementById('insertimageFile').files;
+        var val = document.getElementById("insertimageFile").files;
         if (!val || !val.length) return;
         this.insertform.viewGuid = val[0].name;
       }
@@ -710,13 +722,13 @@
         if (val_data.code == 200) {
           this.guidFile = val_data.result;
           this.$message({
-            message: '涓婁紶鎴愬姛锛�',
-            type: 'success',
+            message: "涓婁紶鎴愬姛锛�",
+            type: "success",
           });
         } else {
           this.$message({
-            message: '涓婁紶澶辫触锛�',
-            type: 'warning',
+            message: "涓婁紶澶辫触锛�",
+            type: "warning",
           });
         }
       } else if (res == 1) {
@@ -730,31 +742,31 @@
         if (val_data.code == 200) {
           this.viewFile = val_data.result;
           this.$message({
-            message: '涓婁紶鎴愬姛锛�',
-            type: 'success',
+            message: "涓婁紶鎴愬姛锛�",
+            type: "success",
           });
         } else {
           this.$message({
-            message: '涓婁紶澶辫触锛�',
-            type: 'warning',
+            message: "涓婁紶澶辫触锛�",
+            type: "warning",
           });
         }
       }
     },
-     geteditFile(res) {
+    geteditFile(res) {
       if (res == 0) {
-        $('#editFile').click();
+        $("#editFile").click();
       } else if (res == 1) {
-        $('#editimageFile').click();
+        $("#editimageFile").click();
       }
     },
-   editFile(res) {
+    editFile(res) {
       if (res == 0) {
-        var val = document.getElementById('editFile').files;
+        var val = document.getElementById("editFile").files;
         if (!val || !val.length) return;
         this.upform.fileGuid = val[0].name;
       } else if (res == 1) {
-        var val = document.getElementById('editimageFile').files;
+        var val = document.getElementById("editimageFile").files;
         if (!val || !val.length) return;
         this.upform.viewGuid = val[0].name;
       }
@@ -771,13 +783,13 @@
         if (val_data.code == 200) {
           this.guidFile = val_data.result;
           this.$message({
-            message: '涓婁紶鎴愬姛锛�',
-            type: 'success',
+            message: "涓婁紶鎴愬姛锛�",
+            type: "success",
           });
         } else {
           this.$message({
-            message: '涓婁紶澶辫触锛�',
-            type: 'warning',
+            message: "涓婁紶澶辫触锛�",
+            type: "warning",
           });
         }
       } else if (res == 1) {
@@ -791,13 +803,13 @@
         if (val_data.code == 200) {
           this.viewFile = val_data.result;
           this.$message({
-            message: '涓婁紶鎴愬姛锛�',
-            type: 'success',
+            message: "涓婁紶鎴愬姛锛�",
+            type: "success",
           });
         } else {
           this.$message({
-            message: '涓婁紶澶辫触锛�',
-            type: 'warning',
+            message: "涓婁紶澶辫触锛�",
+            type: "warning",
           });
         }
       }
@@ -822,14 +834,14 @@
       const data = await deleteStyles({ ids: std.toString() });
       if (data.code == 200) {
         this.$message({
-          message: '鍒犻櫎鎴愬姛锛�',
-          type: 'success',
+          message: "鍒犻櫎鎴愬姛锛�",
+          type: "success",
         });
         this.getRoleTabelData();
       } else {
         this.$message({
-          message: '鍒犻櫎澶辫触锛�',
-          type: 'warning',
+          message: "鍒犻櫎澶辫触锛�",
+          type: "warning",
         });
       }
     },
@@ -871,13 +883,13 @@
     insertFromDataClose() {
       this.InsertFormdialog = false;
       this.insertform = {};
-       this.filesReset();
+      this.filesReset();
     },
     async insertFromData() {
       if (this.insertform.dirid == null || this.insertform.depid == null) {
         this.$message({
-          message: '璇烽�夋嫨鏍峰紡鎵�灞炵殑鐩綍鎴栧崟浣�',
-          type: 'warning',
+          message: "璇烽�夋嫨鏍峰紡鎵�灞炵殑鐩綍鎴栧崟浣�",
+          type: "warning",
         });
         return;
       }
@@ -894,25 +906,25 @@
 
         this.filesReset();
         this.$message({
-          message: '娣诲姞鎴愬姛锛�',
-          type: 'success',
+          message: "娣诲姞鎴愬姛锛�",
+          type: "success",
         });
         this.getRoleTabelData();
       } else {
         this.$message({
-          message: '娣诲姞澶辫触锛�',
-          type: 'warning',
+          message: "娣诲姞澶辫触锛�",
+          type: "warning",
         });
       }
     },
     async getRoleTabelData() {
-      if (this.listData.tab == '') {
+      if (this.listData.tab == "") {
         delete this.listData.tab;
       }
       this.listData.name = this.ruleForm.name;
       const data = await select_Style_ByPageAndCount(this.listData);
       if (data.code != 200) {
-        this.$message.error('鍒楄〃璋冪敤澶辫触');
+        this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
       this.tableData = data.result;
       this.count = data.count;
@@ -925,7 +937,7 @@
       if (date === undefined || date === null) {
         return;
       }
-      return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss');
+      return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss");
     },
     formatStatus(row, column) {
       let date = row[column.property];
@@ -937,28 +949,28 @@
       }
       switch (date) {
         case 1:
-          return '鍚敤';
+          return "鍚敤";
           break;
         case 0:
-          return '鍋滅敤';
+          return "鍋滅敤";
           break;
       }
     },
     /** */
     getflyFile() {
-      $('#flyFile').click();
+      $("#flyFile").click();
     },
     getImageFile() {
-      $('#imageFile').click();
+      $("#imageFile").click();
     },
     uploadflyFile() {
-      var val = document.getElementById('flyFile').files;
+      var val = document.getElementById("flyFile").files;
       if (!val || !val.length) return;
       if (!val || !val.length) return;
       var formData = new FormData();
-      formData.append('file0', val[0]);
-      var res = $.ajax(serverUrl + 'Style/Upload', {
-        type: 'post',
+      formData.append("file0", val[0]);
+      var res = $.ajax(serverUrl + "Style/Upload", {
+        type: "post",
         data: formData,
         async: false,
         cache: false,
@@ -980,12 +992,12 @@
     },
     //鍥剧墖涓婁紶
     uploadFile() {
-      var val = document.getElementById('imageFile').files;
+      var val = document.getElementById("imageFile").files;
       if (!val || !val.length) return;
       var formData = new FormData();
-      formData.append('file0', val[0]);
-      var res = $.ajax(serverUrl + 'Style/Upload', {
-        type: 'post',
+      formData.append("file0", val[0]);
+      var res = $.ajax(serverUrl + "Style/Upload", {
+        type: "post",
         data: formData,
         async: false,
         cache: false,
@@ -1014,8 +1026,8 @@
         this.insertform.path_id = this.$store.state.cataNode.id;
       }
 
-      this.$store.commit('changeCata', ''); //娓呯┖state鐨勯潰鍖呭睉
-      this.$store.commit('changeNode', ''); //娓呯┖state鐨勮妭鐐瑰璞�
+      this.$store.commit("changeCata", ""); //娓呯┖state鐨勯潰鍖呭睉
+      this.$store.commit("changeNode", ""); //娓呯┖state鐨勮妭鐐瑰璞�
       this.showCata = false;
     },
     startFromData() {
@@ -1039,7 +1051,7 @@
       });
     },
     addstyle() {
-      this.$router.push('/addstyle');
+      this.$router.push("/addstyle");
     },
     statusFormat(res) {
       switch (res) {
@@ -1060,15 +1072,15 @@
     async updateForm() {
       if (this.upform.dirid == null || this.upform.depid == null) {
         this.$message({
-          message: '璇烽�夋嫨鏍峰紡鎵�灞炵殑鐩綍鎴栧崟浣�',
-          type: 'warning',
+          message: "璇烽�夋嫨鏍峰紡鎵�灞炵殑鐩綍鎴栧崟浣�",
+          type: "warning",
         });
         return;
       }
       if (Number.isInteger(this.upform.status) == false) {
-        this.upform.status = this.statusFormat(this.upform.status)
+        this.upform.status = this.statusFormat(this.upform.status);
       }
-        if (this.guidFile != null) {
+      if (this.guidFile != null) {
         this.upform.fileGuid = this.guidFile;
       }
       if (this.viewFile != null) {
@@ -1079,28 +1091,26 @@
         this.dialogFormVisible = false;
         this.upform = {};
         this.$message({
-          message: '淇敼鎴愬姛锛�',
-          type: 'success',
+          message: "淇敼鎴愬姛锛�",
+          type: "success",
         });
         this.getRoleTabelData();
       } else {
         this.$message({
-          message: '淇敼澶辫触锛�',
-          type: 'warning',
+          message: "淇敼澶辫触锛�",
+          type: "warning",
         });
       }
-
-
     },
 
     removeUpdate() {
       this.upflag = false;
       this.dialogFormVisible = false;
       this.upform = {};
-       this.filesReset();
+      this.filesReset();
     },
     submitForm(formName) {
-      this.getRoleTabelData()
+      this.getRoleTabelData();
       // this.$refs[formName].validate((valid) => {
       //   if (valid) {
       //     this.searchName = this.ruleForm.name.trim();
@@ -1112,16 +1122,21 @@
       // });
     },
     resetForm(formName) {
-      this.ruleForm = {}
+      this.ruleForm = {};
       this.getRoleTabelData();
     },
     showDetail(index, row) {
       var token = getToken();
       this.showinfoBox = true;
       this.itemdetail = row;
-      this.itemdetail.createTime = this.formomentTime(this.itemdetail.createTime);
-      this.itemdetail.updateTime = this.formomentTime(this.itemdetail.updateTime);
-      this.itemdetail.imageFile = BASE_URL + "/res/download?guid=" + row.viewGuid + "&token=" + token
+      this.itemdetail.createTime = this.formomentTime(
+        this.itemdetail.createTime
+      );
+      this.itemdetail.updateTime = this.formomentTime(
+        this.itemdetail.updateTime
+      );
+      this.itemdetail.imageFile =
+        BASE_URL + "/res/download?guid=" + row.viewGuid + "&token=" + token;
     },
     closeDetial() {
       this.showinfoBox = false;
@@ -1129,37 +1144,36 @@
     },
 
     handleEdit(index, row) {
-
       this.upflag = true;
       this.dialogFormVisible = true;
       this.upform = row;
       this.upform.depValue = row.depName;
       this.upform.dirValue = row.dirName;
-      this.upform.status = this.forMontStatus(row.status)
+      this.upform.status = this.forMontStatus(row.status);
     },
     handleDelete(index, row) {
-      this.$confirm('纭畾鏄惁鍒犻櫎?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning',
+      this.$confirm("纭畾鏄惁鍒犻櫎?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
       })
         .then(() => {
           DeletestStyle([row.id]);
           this.$message({
-            type: 'success',
-            message: '鍒犻櫎鎴愬姛!',
+            type: "success",
+            message: "鍒犻櫎鎴愬姛!",
           });
           this.startFromData();
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     // 鑾峰彇澶氶��
 
     ShowWindowFly(res) {
       window.open(
-        ifreamUrl + '/LFWeb/poper.html?name=' + res,
-        '',
-        'height=800, width=1500, top=150, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no'
+        ifreamUrl + "/LFWeb/poper.html?name=" + res,
+        "",
+        "height=800, width=1500, top=150, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no"
       );
     },
   },
diff --git a/src/views/datamanage/versionManage.vue b/src/views/datamanage/versionManage.vue
index 77cc835..39c0286 100644
--- a/src/views/datamanage/versionManage.vue
+++ b/src/views/datamanage/versionManage.vue
@@ -20,19 +20,20 @@
             @click="onSubmit('ruleForm')"
             icon="el-icon-search"
             size="small"
-            >{{ $t('common.iquery') }}</el-button
+            >{{ $t("common.iquery") }}</el-button
           >
           <el-button
+            v-if="btnStatus.insert"
             @click="InsertFormdialog = true"
             icon="el-icon-plus"
             size="small"
-            >{{ $t('common.append') }}</el-button
+            >{{ $t("common.append") }}</el-button
           >
           <el-button
             @click="resetForm('ruleForm')"
             icon="el-icon-delete"
             size="small"
-            >{{ $t('common.empty') }}</el-button
+            >{{ $t("common.empty") }}</el-button
           >
         </el-form-item>
       </el-form>
@@ -92,16 +93,18 @@
             <el-table-column min-width="150" :label="$t('common.operate')">
               <template slot-scope="scope">
                 <el-button
+                  v-if="btnStatus.update"
                   @click="handleEdit(scope.$index, scope.row)"
                   type="warning"
                   size="small"
-                  >{{ $t('common.update') }}</el-button
+                  >{{ $t("common.update") }}</el-button
                 >
                 <el-button
+                  v-if="btnStatus.delete"
                   @click="handleDelete(scope.$index, scope.row)"
                   type="danger"
                   size="small"
-                  >{{ $t('common.delete') }}</el-button
+                  >{{ $t("common.delete") }}</el-button
                 >
               </template>
             </el-table-column>
@@ -170,7 +173,7 @@
             disabled
           ></el-input>
           <el-button style="margin-left: 20px" @click="showVerTree(2)">{{
-            $t('common.choose')
+            $t("common.choose")
           }}</el-button>
         </el-form-item>
         <el-form-item
@@ -182,10 +185,10 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="editFromDataClose">{{
-          $t('common.close')
+          $t("common.close")
         }}</el-button>
         <el-button @click="editFromData" type="primary">{{
-          $t('common.confirm')
+          $t("common.confirm")
         }}</el-button>
       </div>
     </el-dialog>
@@ -210,7 +213,7 @@
             disabled
           ></el-input>
           <el-button style="margin-left: 20px" @click="showVerTree(3)">{{
-            $t('common.choose')
+            $t("common.choose")
           }}</el-button>
         </el-form-item>
 
@@ -223,10 +226,10 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="insertFromDataClose">{{
-          $t('common.close')
+          $t("common.close")
         }}</el-button>
         <el-button @click="insertFromData" type="primary">{{
-          $t('common.confirm')
+          $t("common.confirm")
         }}</el-button>
       </div>
     </el-dialog>
@@ -236,10 +239,10 @@
       </div>
       <div class="btnBox">
         <el-button type="primary" size="small" @click="selectCataName">{{
-          $t('common.confirm')
+          $t("common.confirm")
         }}</el-button>
         <el-button type="primary" size="small" @click="showCata = false">{{
-          $t('common.close')
+          $t("common.close")
         }}</el-button>
       </div>
     </div>
@@ -252,18 +255,18 @@
   insertVersion,
   deleteVersion,
   updateVersion,
-} from '../../api/api';
-import verDirTree from './verDirTree.vue';
-import MyBread from '../../components/MyBread.vue';
-import verDirTrees from './verDirTrees.vue';
-import moment from 'moment';
+} from "../../api/api";
+import verDirTree from "./verDirTree.vue";
+import MyBread from "../../components/MyBread.vue";
+import verDirTrees from "./verDirTrees.vue";
+import moment from "moment";
 export default {
-  name: 'versionManage',
+  name: "versionManage",
   components: { MyBread, verDirTree, verDirTrees },
   data() {
     return {
       showCata: false,
-      formLabelWidth: '100px',
+      formLabelWidth: "100px",
       dialogFormVisible: false,
       InsertFormdialog: false,
       showinfoBox: false,
@@ -280,10 +283,19 @@
         pageIndex: 1,
         pageSize: 10,
       },
+      btnStatus: {
+        select: false,
+        delete: false,
+        upload: false,
+        download: false,
+        insert: false,
+        update: false,
+      },
     };
   },
   created() {
     this.getRoleTabelData();
+    this.showPermsBtn();
   },
   computed: {
     pathId() {
@@ -291,17 +303,24 @@
     },
   },
   methods: {
+    showPermsBtn() {
+      let currentPerms = this.$store.state.currentPerms;
+      let permsEntity = this.$store.state.permsEntity;
+      permsEntity
+        .filter((item) => item.perms == currentPerms)
+        .map((item) => (this.btnStatus[item.tag.substr(1)] = true));
+    },
     resetForm() {
       this.ruleForm = {};
       this.$store.state.verCateNode = {};
-      this.$bus.$emit('clearTressLabel', true);
+      this.$bus.$emit("clearTressLabel", true);
       this.getRoleTabelData();
     },
     onSubmit() {
       this.getRoleTabelData();
     },
     async getRoleTabelData() {
-      if (this.listData.tab == '') {
+      if (this.listData.tab == "") {
         delete this.listData.tab;
       }
 
@@ -310,7 +329,7 @@
       const data = await select_Ver_ByPageAndCount(this.listData);
 
       if (data.code != 200) {
-        this.$message.error('鍒楄〃璋冪敤澶辫触');
+        this.$message.error("鍒楄〃璋冪敤澶辫触");
       }
       this.tableData = data.result;
       this.count = data.count;
@@ -344,8 +363,8 @@
     async editFromData() {
       if (this.upform.depName == null) {
         this.$message({
-          message: '璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�',
-          type: 'warning',
+          message: "璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�",
+          type: "warning",
         });
         return;
       }
@@ -354,14 +373,14 @@
         this.dialogFormVisible = false;
         this.upform = {};
         this.$message({
-          message: '淇敼鎴愬姛锛�',
-          type: 'success',
+          message: "淇敼鎴愬姛锛�",
+          type: "success",
         });
         this.getRoleTabelData();
       } else {
         this.$message({
-          message: '淇敼澶辫触锛�',
-          type: 'warning',
+          message: "淇敼澶辫触锛�",
+          type: "warning",
         });
       }
     },
@@ -372,8 +391,8 @@
     async insertFromData() {
       if (this.insertform.dirid == null) {
         this.$message({
-          message: '璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�',
-          type: 'warning',
+          message: "璇烽�夋嫨瑙掕壊鎵�灞炲崟浣�",
+          type: "warning",
         });
         return;
       }
@@ -382,37 +401,37 @@
         this.InsertFormdialog = false;
         this.insertform = {};
         this.$message({
-          message: '娣诲姞鎴愬姛锛�',
-          type: 'success',
+          message: "娣诲姞鎴愬姛锛�",
+          type: "success",
         });
         this.getRoleTabelData();
       } else {
         this.$message({
-          message: '娣诲姞澶辫触锛�',
-          type: 'warning',
+          message: "娣诲姞澶辫触锛�",
+          type: "warning",
         });
       }
     },
     formatTime(row, column) {
       let date = row[column.property];
       if (date === undefined || date === null) {
-        return '';
+        return "";
       }
-      return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss');
+      return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss");
     },
     async handleDelete(index, row) {
       const data = await deleteVersion(row.id);
       if (data.code == 200) {
         this.InsertFormdialog = false;
         this.$message({
-          message: '鍒犻櫎鎴愬姛锛�',
-          type: 'success',
+          message: "鍒犻櫎鎴愬姛锛�",
+          type: "success",
         });
         this.getRoleTabelData();
       } else {
         this.$message({
-          message: '鍒犻櫎澶辫触锛�',
-          type: 'warning',
+          message: "鍒犻櫎澶辫触锛�",
+          type: "warning",
         });
       }
     },

--
Gitblit v1.9.3