Browse Source

Merge branch 'product' of http://1.116.113.26:8088/zhuliu/xiaoshi_system into product

zhuhao 1 year ago
parent
commit
3b055110f5

+ 2 - 0
src/main.js

@@ -33,6 +33,8 @@ import eventVisual from "@/views/event/components/details/showDialog";
 Vue.prototype.$eventVisual = eventVisual;
 import showTiShi from "./utils/model/tishi/index";
 Vue.prototype.$showTiShi = showTiShi;
+import showPermissionDialog from "./utils/model/noPermission/index";
+Vue.prototype.$showPermissionDialog = showPermissionDialog;
 
 //组件库
 import model from './utils/model'

+ 3 - 0
src/utils/common.js

@@ -229,6 +229,9 @@ export default {
 
   //查看图片
   checkViewer(guid) {
+    if(!guid){
+      return ''
+    }
     return `/api/fileManager/downloadFile?fileId=${guid}`
   },
 

+ 49 - 0
src/utils/model/noPermission/index.js

@@ -0,0 +1,49 @@
+import noPermission from './index.vue'
+import Vue from "vue"; // 导入vue
+ 
+// 将组件作为参数,使用vue提供的全局方法,创建一个构造函数
+let DrawerConstructor = Vue.extend(noPermission);
+ 
+let instance;
+ 
+/**
+ * 打开查看事件流程详情
+ * @param {Object} value 
+ * @example
+ * {Scenario:[],eventId:'',eventName:''}
+ * @returns 
+ */
+const permissionDialog = function() {
+    return new Promise((resolve, reject) => {
+        // 初始化实例,此时instance是一个组件实例,但未初始化未完成,这里的变量和方法优先组件内的变量和方法
+        instance = new DrawerConstructor({
+            data: function() {
+                return {
+                    show:true,
+                };
+            },
+            methods: {
+                onSelect: res => {
+                    unmount();
+                    resolve(res);
+                },
+                handleClose: () => {
+                    unmount();
+                    // reject();
+                }
+            }
+        });
+        // 卸载组件
+        const unmount = () => {
+            instance.show = false;
+        };
+        // 完成初始化
+        instance.$mount();
+ 
+        // 将组件添加到根节点body
+        document.body.appendChild(instance.$el);
+        instance.show = true;
+    });
+};
+ 
+export default permissionDialog;

+ 53 - 0
src/utils/model/noPermission/index.vue

@@ -0,0 +1,53 @@
+<template>
+    <div class="myNoPermission" v-if="show">
+        <div class="myNoPermission_content">
+            <i class="el-icon-info"></i>
+            <span class="margin-left_10">未配置角色权限,无法访问</span>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+        show:false
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {
+    var timer = setTimeout(()=>{
+        this.show = false
+        clearInterval(timer)
+    },2000)
+  },
+  methods: {},
+
+};
+</script>
+<style lang="scss" scoped>
+.myNoPermission{
+    position: absolute;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    margin: auto;
+    width: 220px;
+    height: 30px;
+    z-index: 9999;
+    padding: 20px;
+    border: none;
+    box-shadow: 0.01333rem 0.01333rem 0.26667rem rgba(0,0,0,0.3);
+    border-radius: 0.04rem;
+    background: #fff;
+    overflow: hidden;
+    .myNoPermission_content{
+        line-height: 30px;
+    }
+}
+</style>

+ 4 - 2
src/utils/model/route.vue

@@ -12,7 +12,7 @@
     <!-- <div @mouseup="up">
       gsdtuicsahcviodkfvdf
     </div> -->
-    <errorPage></errorPage>
+    <noPermission></noPermission>
   </div>
 </template>
 
@@ -21,12 +21,14 @@ import myView2 from './myView/index.vue'
 import avoidDirection from '@/views/report/avoid/components/avoidDirection.vue'
 import PatentField from '@/views/project/patentDetails/components/PatentField.vue'
 import errorPage from '@/views/components/errorPage/401.vue'
+import noPermission from './noPermission/index.vue'
 export default {
   components: {
     myView2,
     avoidDirection,
     PatentField,
-    errorPage
+    errorPage,
+    noPermission
   },
   props: {},
   data() {

+ 1 - 1
src/views/project/patentCollection/components/mixins/index.js

@@ -290,7 +290,7 @@ export const handleData = {
       var row = this.highlight[key]
       if (row.length > 0) {
         for (let i = 0; i < row.length; i++) {
-          if (row[i].patentNo == this.patent.patentNo || (key == 'contrastList' && this.evidence && row[i].literatureId == this.evidence.id)) {
+          if (row[i].patentNo == this.patent.patentNo || (key == 'contrastList'&& (this.patent.patentNo != this.signPatentNo) && this.evidence && row[i].literatureId == this.evidence.id)) {
             if (row[i][obj[key][3]].indexOf(field) != -1) {
               var a = {}
               a.Type = 1

+ 12 - 7
src/views/project/patentDetails/components/patentDetails.vue

@@ -6,10 +6,10 @@
           <div style="display: flex;justify-content: space-between;align-items: center;height:50px">
             <div style="text-align: start;padding-left: 10px;position: relative;">
               <!-- <div style="width: 260px;"> -->
-              <img src="@/assets/visual/fixed.png" width="20px" height="20px" v-if="fix === true && value == true"
-                @click="qx" style="" />
-              <img src="@/assets/visual/unfixed.png" width="20px" height="20px" v-if="fix === false && value == true"
-                @click="gd" style="" />
+              <img src="@/assets/visual/fixed.png" width="20px" height="20px" v-if="fix === true && value == true && !lock"
+                @click="fix = false" style="" />
+              <img src="@/assets/visual/unfixed.png" width="20px" height="20px" v-if="fix === false && value == true  && !lock"
+                @click="fix = true" style="" />
 
               <!-- </div> -->
 
@@ -176,6 +176,12 @@ export default {
       type: String,
       default: '2'//判断是不是从专题库进入专利详情1为专题库(专题库已传1)2为报告(报告未传2)
     },
+    value:{
+      default:false
+    },
+    lock:{
+      default:false
+    }
   },
   data() {
     return {
@@ -285,13 +291,12 @@ export default {
       activeOption: 'PatentField',
       activeMenu: 'PatentBasic',
       activeMenu2: '',
-      value: false,
       patent: {},
     };
   },
   watch: {
     patentNo(val) {
-      if (val) {
+      if (val && !this.fix) {
         this.getPatent()
         this.getPiZhuData(val)
       }
@@ -308,7 +313,7 @@ export default {
   },
   created() { },
   mounted() {
-
+    
     this.getPatent()
     this.getPiZhuData()
   },

+ 1 - 1
src/views/project/patentDetails/components/patentMessage/mixins/index.js

@@ -83,7 +83,7 @@ export const patentDetails = {
     //打开弹窗
     showMenu(e) {
       var menuContent = []
-      if (this.reportType == 1 || this.reportType == 2) {
+      if ((this.reportType == 1 || this.reportType == 2) && this.patent.patentNo!=this.signPatentNo) {
         menuContent = [
           {
             name: "对比",

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

@@ -8,12 +8,12 @@
         <div slot="left" style="width:100%">
           <notPatentDetails v-if="evidenceType == 1" :projectId="projectId" :signPatentNo="signPatentNo" :reportType="reportType" :evidence="evidenceData"></notPatentDetails>
           <!-- <Patent-Details :patentNo="patentNo" :projectId="projectId" :taskId="taskId"></Patent-Details> -->
-          <component v-else :is='components' :patentNo="patentNo" :evidence="evidenceData" :outside="outside" :projectType="projectType" :signPatentNo="signPatentNo"  :projectId="projectId" :taskId="taskId"
+          <component v-else :is='components' :patentNo="(signPatentNo && showView)?signPatentNo:patentNo" :value="showView" :evidence="evidenceData" :outside="outside" :projectType="projectType" :lock="signPatentNo?true:false" :signPatentNo="signPatentNo"  :projectId="projectId" :taskId="taskId"
             :reportType="reportType" :isResult="isResult"></component>
         </div>
         <div slot="right" style="width:100%">
           <notPatentDetails v-if="evidenceType == 1" :projectId="projectId" :signPatentNo="signPatentNo" :reportType="reportType" :evidence="evidenceData"></notPatentDetails>
-          <Patent-Details v-else :patentNo="patentNo" :outside="outside" :projectType="projectType" :evidence="evidenceData" :signPatentNo="signPatentNo" :reportType="reportType" :projectId="projectId" :taskId="taskId"></Patent-Details>
+          <Patent-Details v-else :patentNo="patentNo" :outside="outside" :value="showView" :projectType="projectType" :evidence="evidenceData" :signPatentNo="signPatentNo" :reportType="reportType" :projectId="projectId" :taskId="taskId"></Patent-Details>
         </div>
       </my-View>
     </div>