Browse Source

权限控制

zhuliu 1 năm trước cách đây
mục cha
commit
2ce4da7871

+ 2 - 2
src/router/index.js

@@ -181,7 +181,7 @@ const routes = [
             path: '/',
             name: '/',
             meta: {
-              title: '产品',
+              title: '产品/技术',
               sign: 'product',
               belong: 'Product',
               permission:'xiaoshi/product'
@@ -561,7 +561,7 @@ const routes = [
             path: '/403',
             name:'/403',
             meta: {
-              title: '事件',
+              title: '无权限',
               sign: '403',
               belong: 'errorPage'
             },

+ 8 - 0
src/views/components/dialog/menuDialog/contrast.vue

@@ -210,6 +210,10 @@ export default {
         this.form.projectId = this.projectId
     },
     submit(){
+        if(!this.$permission.FunPermissions('xiaoshi/annotationLibrary')){
+            this.$showPermissionDialog()
+            return false
+        }
         this.$refs.splitPage.getCheckList()
     },
     //获取子组件选中的特征
@@ -271,6 +275,10 @@ export default {
         this.$refs.image.showViewer = true
     },
     delContrast(){
+        if(!this.$permission.FunPermissions('xiaoshi/annotationLibrary')){
+            this.$showPermissionDialog()
+            return false
+        }
         var ids = [this.form.id]
         this.$confirm('确认删除该数据吗?', '提示', {
             confirmButtonText: '确定',

+ 3 - 0
src/views/components/errorPage/components/ErrorPageLayout.vue

@@ -48,6 +48,9 @@ export default {
       clearTimeout(this.timer)
     }
   },
+  beforeDestroy() {
+    clearTimeout(this.timer)
+  },
 }
 </script>
   

+ 1 - 1
src/views/layout/components/UserBar.vue

@@ -168,7 +168,7 @@ export default {
         },
         {
           value:'2',
-          label:'产品',
+          label:'产品/技术',
           path:'/product',
           belong:'Product'
         },

+ 11 - 0
src/views/layout/components/contextMenu.vue

@@ -55,6 +55,10 @@ export default {
     selectMark(id, selectType) {
       var Id = id.substring(1, id.length)
       if (selectType == 'p') {//批注
+        if(!this.$permission.FunPermissions('xiaoshi/annotationLibrary')){
+            this.$showPermissionDialog()
+            return false
+        }
         var index = this.highlight.piZhuContrastList.findIndex(item => {
           if (item.id == Id) {
             // 清空currentSelectObj,否则Id与id同时存在
@@ -79,6 +83,13 @@ export default {
 
     },
     getMethod(type) {
+      var types = ['wave','underscore','addHighlight','mark']
+      if(types.indexOf(type)!=-1){
+        if(!this.$permission.FunPermissions('xiaoshi/annotationLibrary')){
+            this.$showPermissionDialog()
+            return false
+        }
+      }
       if (this[type]) {
         this[type]()
       }

+ 2 - 2
src/views/product/components/dialog/addEditCategory.vue

@@ -111,9 +111,9 @@ export default {
         // this.form.showType = 0
       }
       if (row.id) {
-        this.title = '编辑产品类别'
+        this.title = '编辑产品/技术类别'
       } else {
-        this.title = '新增产品类别'
+        this.title = '新增产品/技术类别'
       }
       this.dialogVisible = true;
     },

+ 2 - 2
src/views/product/components/index.vue

@@ -80,10 +80,10 @@ export default {
       //检索字段
       searchFiled: [
         {
-          label: '产品类别名称',
+          label: '产品/技术类别名称',
           value: 'productName1',
           type: 1,
-          placeholder: '请输入产品类别名称'
+          placeholder: '请输入产品/技术类别名称'
         },
         {
           label: '产品名称',

+ 2 - 2
src/views/product/components/view/categoryTable.vue

@@ -78,7 +78,7 @@ export default {
             value:'name',
             field:'category_name',
             type:'String',
-            name:'产品类别名称'
+            name:'产品/技术类别名称'
           },
           {
             value:'licenseRate',
@@ -90,7 +90,7 @@ export default {
             value:'description',
             field:'category_description',
             type:'String',
-            name:'产品类别描述'
+            name:'描述'
           },
           {
             value:'createName',

+ 3 - 3
src/views/project/components/drawer/form.vue

@@ -73,13 +73,13 @@
             
             <template>
               <div>
-                <el-form-item label="产品类别/产品" prop="productId">
+                <el-form-item label="产品/技术" prop="productId">
                   <div>
                     <div v-if="ruleForm.products">
                       {{ ruleForm.products.name }}
-                      <span style="color:blue">
+                      <!-- <span style="color:blue">
                         ({{ ruleForm.products.treeType==2?'产品':'产品类别' }})
-                      </span>
+                      </span> -->
                       <span><i class="el-icon-error cursor_pointer" @click="delProduct"></i></span>
                     </div>
                     <el-button size="small" v-else @click="choseProduct">+ 选择</el-button>

+ 2 - 2
src/views/project/index.vue

@@ -25,8 +25,8 @@
                 </el-select>
               </div>
               <el-button-group class="margin-left_10" id="step3"  v-if="[2].indexOf(isOperate) == -1">
-                <el-button :type="queryShowType === '2' ? 'primary' : ''" @click="onChange2('2')"
-                  size="small">可视化</el-button>
+                <!-- <el-button :type="queryShowType === '2' ? 'primary' : ''" @click="onChange2('2')"
+                  size="small">可视化</el-button> -->
                 <el-button :type="queryShowType === '0' ? 'primary' : ''" @click="onChange2('0')"
                   size="small">列表</el-button>
                 <el-button :type="queryShowType === '1' ? 'primary' : ''" @click="onChange2('1')"

+ 3 - 3
src/views/project/patentCollection/index.vue

@@ -296,9 +296,9 @@ export default {
       //同族
       familyObj: {
         '0': '不区分同族',
-        'simpleFamilyId': '简单同族',
-        'inpadocFamilyId': 'INPADOC同族',
-        'patsnapFamilyId': '扩展同族',
+        // 'simpleFamilyId': '简单同族',
+        'inpadocFamilyId': '同族',
+        // 'patsnapFamilyId': '扩展同族',
       },
       //页大小
       sizeArr: [10, 20, 30, 40, 50, 100],