浏览代码

语义分析配置化

cxmo 1 年之前
父节点
当前提交
ef9a6bc46b

+ 12 - 0
src/utils/buttonConfig.js

@@ -305,3 +305,15 @@ export const sandboxPermission = {
     sandbox_del:'sandbox:del',//删除
     sandbox_saveView:'sandbox:saveView',//添加/编辑/查看
 }
+/*
+ * --------------------------------------------------------------------------语义分析------------------------------------------------
+*/
+export const semanticPermission = {
+    /*-----------文档管理--------- */
+    docPage_save:'docPage:save',//添加编辑文档
+    /*-----------文档对比--------- */
+    saPage_save:'saPage:save',//添加编辑对比文档
+    /*-----------标签管理--------- */
+    tagPage_del:'tagPage:del',
+    tagPage_save:'tagPage:save',//添加编辑标签
+}

+ 4 - 2
src/views/semantics_manage/documentPage.vue

@@ -4,7 +4,8 @@
     <!-- 目录栏 -->
     <div class="catalog-wrap page-block-wrap catalog-block" id="left">
       <div class="btn-box">
-        <el-button type="primary" @click="toPage('addFile')">添加文档</el-button>
+        <el-button v-permission="permissionBtn.semanticPermission.docPage_save"
+            type="primary" @click="toPage('addFile')">添加文档</el-button>
       </div>
       <div class="select-wrap">
         <el-select
@@ -133,7 +134,8 @@
             <!-- <li>文档主题:{{docInfo.Theme}}</li> -->
             <li>文档分类:{{docInfo.ClassifyName}}</li>
           </ul>
-          <el-button type="primary" @click="handleEdit('file',selectNode)">编辑</el-button>
+          <el-button v-permission="permissionBtn.semanticPermission.docPage_save"
+            type="primary" @click="handleEdit('file',selectNode)">编辑</el-button>
         </div>
         <div class="file-content overflow-hide-scrollbar">
           <p v-for="block in docInfo.SectionList" :key="block.SaDocSectionId">{{block.innerText}}</p>

+ 4 - 2
src/views/semantics_manage/semanticsPage.vue

@@ -4,7 +4,8 @@
     <!-- 目录栏 -->
     <div class="catalog-wrap page-block-wrap catalog-block" id="left">
       <div class="btn-box">
-        <el-button type="primary" @click="toPage('addFile')">添加文档对比</el-button>
+        <el-button v-permission="permissionBtn.semanticPermission.saPage_save"
+            type="primary" @click="toPage('addFile')">添加文档对比</el-button>
         <!-- <el-button type="primary" plain @click="toPage('tag')">标签管理</el-button> -->
       </div>
       <div class="select-wrap">
@@ -124,7 +125,8 @@
             <li>{{semanticInfo.Title}}</li>
             <li style="margin-left:auto;">作者:{{semanticInfo.SysAdminName}}</li>
             <li>创建时间:{{semanticInfo.CreateTime}}</li>
-            <li style="min-width: auto;"><el-button type="primary" @click="handleEdit('file',selectNode)">编辑</el-button></li>
+            <li style="min-width: auto;"><el-button v-permission="permissionBtn.semanticPermission.saPage_save"
+                type="primary" @click="handleEdit('file',selectNode)">编辑</el-button></li>
           </ul>
           <div class="pic-wrap">
             <img class="pic" :src="semanticInfo.ResultImg" v-if="semanticInfo.ResultImg">

+ 6 - 3
src/views/semantics_manage/tagPage.vue

@@ -2,7 +2,8 @@
   <!-- 标签管理 -->
   <div class="document-tag-page-wrap page-block-wrap">
     <div class="tool-box">
-      <el-button type="primary" @click="handleOperate('add',{})">添加标签</el-button>
+      <el-button v-permission="permissionBtn.semanticPermission.tagPage_save"
+        type="primary" @click="handleOperate('add',{})">添加标签</el-button>
       <el-input v-model="searchText" clearable prefix-icon="el-icon-search" placeholder="请输入标签名称" @input="searchHandle"></el-input>
     </div>
     <div class="table-box">
@@ -23,8 +24,10 @@
         </el-table-column>
         <el-table-column  label="操作" align="center">
           <template slot-scope="{row}">
-            <el-button type="text"  @click="handleOperate('edit',row)">编辑</el-button>
-            <el-button type="text"  style="color:red;" @click="handleOperate('delete',row)">删除</el-button>
+            <el-button v-permission="permissionBtn.semanticPermission.tagPage_save"
+                type="text"  @click="handleOperate('edit',row)">编辑</el-button>
+            <el-button v-permission="permissionBtn.semanticPermission.tagPage_del"
+                type="text"  style="color:red;" @click="handleOperate('delete',row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>

+ 1 - 2
src/views/system_manage/mock.js

@@ -1360,5 +1360,4 @@ export const mockList = [
         }
       ]
     }
-  ]
-  
+  ]