Browse Source

项目权限

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

+ 9 - 0
src/api/newApi/common.js

@@ -258,5 +258,14 @@ export default {
   },
   
 
+   /**
+  * 查询人员在项目里的角色
+  * @param {*} data 
+  * @returns 
+  */
+   getProjectPermissions(data) {
+    return axios.post("/xiaoshi/patentShare/getProjectPermissions", data);
+  },
+  
 
 };

+ 4 - 0
src/utils/common.js

@@ -346,6 +346,10 @@ export default {
    * @param {*} type 导入类型
    */
   toImportParent(data, type) {
+    if(!(this.$permission.FunPermissions('xiaoshi/patentImport'))){
+      this.$showPermissionDialog()
+      return false
+    }
     var types = {
       1: '/import',
       2: '/PatentNoImport',

+ 16 - 2
src/utils/permissions.js

@@ -17,6 +17,7 @@ export default {
   // },
   //报告权限
   reportPermission(reportId, roles){
+    return true
     if(!reportId){
         return true
     }
@@ -53,18 +54,31 @@ export default {
     }
     var obj = data[projectId]
     if(!obj){
-
+      var projectIds = [projectId]
+      await Api.getProjectPermissions(projectIds).then(response=>{
+        if(response.code == 200){
+          var d = response.data.data[projectId]
+          data[projectId] = d
+          sessionStorage.setItem('projectPermission',JSON.stringify(data))
+          obj = d
+        }
+      })
     }
     if(!obj){
       return false
     }
-    return true
+    // 0创建人 1负责人 2被分享人 3参与人
+    if(obj.includes('0')||obj.includes('1')||obj.includes('3')){
+      return true
+    }
+    return false
   },
   /**
    * 功能权限
    * @param {String} str 
    */
   FunPermissions(str){
+    return true
     const user = Store.state.user.userinfo
     if(user.roleType){
       return true

+ 11 - 10
src/views/patentMining/components/fileMessage.vue

@@ -177,19 +177,20 @@ export default {
           let arr = ['流程节点', '最终文件']
           arr.forEach(item => {
             var obj = this.searchFiled.find(item2 => { return item2.label == item })
-            if (item == '流程节点') {//流程节点
-              obj.options = this.pathOptions
-            } else {//最终文件
-              let isFile = [
-                {label:'是',value:true},
-                {label:'否',value:false},
-              ]
-              obj.options = isFile
+            if(obj){
+              if (item == '流程节点') {//流程节点
+                obj.options = this.pathOptions
+              } else {//最终文件
+                let isFile = [
+                  {label:'是',value:true},
+                  {label:'否',value:false},
+                ]
+                obj.options = isFile
+              }
             }
+            
           })
           
-          console.log(this.pathOptions);
-          
         }
       })
     },

+ 43 - 0
src/views/product/components/jsMind/components/imageViewer/dom.js

@@ -0,0 +1,43 @@
+/* istanbul ignore next */
+
+import Vue from 'vue';
+
+const isServer = Vue.prototype.$isServer;
+const SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g;
+const MOZ_HACK_REGEXP = /^moz([A-Z])/;
+const ieVersion = isServer ? 0 : Number(document.documentMode);
+
+/* istanbul ignore next */
+export const on = (function () {
+  if (!isServer && document.addEventListener) {
+    return function (element, event, handler) {
+      if (element && event && handler) {
+        element.addEventListener(event, handler, false);
+      }
+    };
+  } else {
+    return function (element, event, handler) {
+      if (element && event && handler) {
+        element.attachEvent('on' + event, handler);
+      }
+    };
+  }
+})();
+
+/* istanbul ignore next */
+export const off = (function () {
+  if (!isServer && document.removeEventListener) {
+    return function (element, event, handler) {
+      if (element && event) {
+        element.removeEventListener(event, handler, false);
+      }
+    };
+  } else {
+    return function (element, event, handler) {
+      if (element && event) {
+        element.detachEvent('on' + event, handler);
+      }
+    };
+  }
+})();
+

+ 450 - 0
src/views/product/components/jsMind/components/imageViewer/index.vue

@@ -0,0 +1,450 @@
+<template>
+    <transition name="viewer-fade">
+      <div class="el-image-viewer__wrapper" :style="{ 'z-index': zIndex }">
+        <div class="el-image-viewer__mask"></div>
+        <!-- CLOSE -->
+        <span class="el-image-viewer__btn el-image-viewer__close" @click="hide">
+          <i class="el-icon-circle-close"></i>
+        </span>
+        <!-- ARROW -->
+        <template v-if="!isSingle">
+          <span class="el-image-viewer__btn el-image-viewer__prev" :class="{ 'is-disabled': !infinite && isFirst }" @click="prev">
+            <i class="el-icon-arrow-left" />
+          </span>
+          <span class="el-image-viewer__btn el-image-viewer__next" :class="{ 'is-disabled': !infinite && isLast }" @click="next">
+            <i class="el-icon-arrow-right" />
+          </span>
+        </template>
+        <!-- ACTIONS -->
+        <div class="el-image-viewer__btn el-image-viewer__actions">
+          <div class="el-image-viewer__actions__inner">
+            <i class="el-icon-zoom-out" style="margin-right: 10px;" @click="handleActions('zoomOut')"></i>
+            <i class="el-icon-zoom-in" style="margin-right: 10px;" @click="handleActions('zoomIn')"></i>
+            <i class="el-icon-refresh" @click="handleActions('clocelise')"></i>
+            <i class="el-image-viewer__actions__divider"></i>
+            <i :class="mode.icon" @click="toggleMode"></i>
+            <i class="el-image-viewer__actions__divider"></i>
+            <i class="el-icon-refresh-left" @click="handleActions('anticlocelise')"></i>
+            <i class="el-icon-refresh-right" @click="handleActions('clocelise')"></i>
+          </div>
+        </div>
+        <!-- CANVAS -->
+        <div class="el-image-viewer__canvas">
+          <div v-for="(url, i) in urlList" v-if="i === index">
+          
+            <img ref="img" class="el-image-viewer__img" :key="url" :src="currentImg" :style="imgStyle" @load="handleImgLoad" @error="handleImgError" @mousedown="handleMouseDown">
+          </div>
+        </div>
+      </div>
+    </transition>
+</template>
+  
+<script>
+  import { on, off } from './dom';
+  import { rafThrottle, isFirefox } from './util';
+  
+  const Mode = {
+    CONTAIN: {
+      name: 'contain',
+      icon: 'el-icon-full-screen'
+    },
+    ORIGINAL: {
+      name: 'original',
+      icon: 'el-icon-c-scale-to-original'
+    }
+  };
+  const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel';
+  export default {
+    name: 'elImageViewer',
+    props: {
+      urlList: {
+        type: Array,
+        default: () => []
+      },
+      zIndex: {
+        type: Number,
+        default: 2300
+      },
+      onSwitch: {
+        type: Function,
+        default: () => { }
+      },
+      onClose: {
+        type: Function,
+        default: () => { }
+      }
+    },
+    data () {
+      return {
+        index: 0,
+        isShow: false,
+        infinite: true,
+        loading: false,
+        mode: Mode.CONTAIN,
+        transform: {
+          scale: 1,
+          deg: 0,
+          offsetX: 0,
+          offsetY: 0,
+          enableTransition: false
+        }
+      };
+    },
+    components: {
+    },
+    computed: {
+      isSingle () {
+        return this.urlList.length <= 1;
+      },
+      isFirst () {
+        return this.index === 0;
+      },
+      isLast () {
+        return this.index === this.urlList.length - 1;
+      },
+
+      currentImg () {
+        return this.urlList[this.index]
+      },
+
+      imgStyle () {
+        const { scale, deg, offsetX, offsetY, enableTransition } = this.transform;
+        const style = {
+          transform: `scale(${scale}) rotate(${deg}deg)`,
+          transition: enableTransition ? 'transform .3s' : '',
+          'margin-left': `${offsetX}px`,
+          'margin-top': `${offsetY}px`
+        };
+        if (this.mode === Mode.CONTAIN) {
+          style.maxWidth = style.maxHeight = '100%';
+        }
+        return style;
+      }
+    },
+    watch: {
+      index: {
+        handler: function (val) {
+          this.reset();
+          this.onSwitch(val);
+        }
+      },
+      currentImg (val) {
+        this.$nextTick(_ => {
+          const $img = this.$refs.img[0];
+          if (!$img.complete) {
+            this.loading = true;
+          }
+        });
+      }
+    },
+    methods: {
+      hide () {
+        this.deviceSupportUninstall();
+        this.onClose();
+      },
+      deviceSupportInstall () {
+        this._keyDownHandler = rafThrottle(e => {
+          const keyCode = e.keyCode;
+          switch (keyCode) {
+            // ESC
+            case 27:
+              this.hide();
+              break;
+            // SPACE
+            case 32:
+              this.toggleMode();
+              break;
+            // LEFT_ARROW
+            case 37:
+              this.prev();
+              break;
+            // UP_ARROW
+            case 38:
+              this.handleActions('zoomIn');
+              break;
+            // RIGHT_ARROW
+            case 39:
+              this.next();
+              break;
+            // DOWN_ARROW
+            case 40:
+              this.handleActions('zoomOut');
+              break;
+          }
+        });
+        this._mouseWheelHandler = rafThrottle(e => {
+          const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
+          if (delta > 0) {
+            this.handleActions('zoomIn', {
+              zoomRate: 0.015,
+              enableTransition: false
+            });
+          } else {
+            this.handleActions('zoomOut', {
+              zoomRate: 0.015,
+              enableTransition: false
+            });
+          }
+        });
+        on(document, 'keydown', this._keyDownHandler);
+        on(document, mousewheelEventName, this._mouseWheelHandler);
+      },
+      deviceSupportUninstall () {
+        off(document, 'keydown', this._keyDownHandler);
+        off(document, mousewheelEventName, this._mouseWheelHandler);
+        this._keyDownHandler = null;
+        this._mouseWheelHandler = null;
+      },
+      handleImgLoad (e) {
+        this.loading = false;
+      },
+      handleImgError (e) {
+        this.loading = false;
+        e.target.alt = '加载失败';
+      },
+      handleMouseDown (e) {
+        if (this.loading || e.button !== 0) return;
+        const { offsetX, offsetY } = this.transform;
+        const startX = e.pageX;
+        const startY = e.pageY;
+        this._dragHandler = rafThrottle(ev => {
+          this.transform.offsetX = offsetX + ev.pageX - startX;
+          this.transform.offsetY = offsetY + ev.pageY - startY;
+        });
+        on(document, 'mousemove', this._dragHandler);
+        on(document, 'mouseup', ev => {
+          off(document, 'mousemove', this._dragHandler);
+        });
+        e.preventDefault();
+      },
+      reset () {
+        this.transform = {
+          scale: 1,
+          deg: 0,
+          offsetX: 0,
+          offsetY: 0,
+          enableTransition: false
+        };
+      },
+      toggleMode () {
+        if (this.loading) return;
+        const modeNames = Object.keys(Mode);
+        const modeValues = Object.values(Mode);
+        const index = modeValues.indexOf(this.mode);
+        const nextIndex = (index + 1) % modeNames.length;
+        this.mode = Mode[modeNames[nextIndex]];
+        this.reset();
+      },
+      prev () {
+        if (this.isFirst && !this.infinite) return;
+        const len = this.urlList.length;
+        this.index = (this.index - 1 + len) % len;
+      },
+      next () {
+        if (this.isLast && !this.infinite) return;
+        const len = this.urlList.length;
+        this.index = (this.index + 1) % len;
+      },
+      handleActions (action, options = {}) {
+        if (this.loading) return;
+        const { zoomRate, rotateDeg, enableTransition } = {
+          zoomRate: 0.2,
+          rotateDeg: 90,
+          enableTransition: true,
+          ...options
+        };
+        const { transform } = this;
+        switch (action) {
+          case 'zoomOut':
+            if (transform.scale > 0.2) {
+              transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
+            }
+            break;
+          case 'zoomIn':
+            transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
+            break;
+          case 'clocelise':
+            transform.deg += rotateDeg;
+            break;
+          case 'anticlocelise':
+            transform.deg -= rotateDeg;
+            break;
+        }
+        transform.enableTransition = enableTransition;
+      }
+    },
+    mounted () {
+      this.deviceSupportInstall();
+    }
+  };
+  </script>
+  <style  scoped>
+  .el-image__error,
+  .el-image__inner,
+  .el-image__placeholder {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .el-image {
+    position: relative;
+    display: inline-block;
+    overflow: hidden;
+  }
+  
+  .el-image__inner {
+    vertical-align: top;
+  }
+  
+  .el-image__inner--center {
+    position: relative;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    display: block;
+  }
+  
+  .el-image__error,
+  .el-image__placeholder {
+    background: #f5f7fa;
+  }
+  
+  .el-image__error {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    font-size: 14px;
+    color: #c0c4cc;
+    vertical-align: middle;
+  }
+  
+  .el-image__preview {
+    cursor: pointer;
+  }
+  
+  .el-image-viewer__wrapper {
+    
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+  }
+  
+  .el-image-viewer__btn {
+    position: absolute;
+    z-index: 1;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 50%;
+    opacity: 0.8;
+    cursor: pointer;
+    box-sizing: border-box;
+    user-select: none;
+  }
+  
+  .el-image-viewer__close {
+    top: 40px;
+    right: 40px;
+    width: 40px;
+    height: 40px;
+    font-size: 40px;
+  }
+  
+  .el-image-viewer__canvas {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  
+  .el-image-viewer__actions {
+    left: 50%;
+    bottom: 30px;
+    transform: translateX(-50%);
+    width: 100px;
+    height: 44px;
+    padding: 0 23px;
+    background-color: #606266;
+    border-color: #fff;
+    border-radius: 22px;
+  }
+  
+  .el-image-viewer__actions__inner {
+    width: 100%;
+    height: 100%;
+    text-align: justify;
+    cursor: default;
+    font-size: 23px;
+    color: #fff;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+  }
+  
+  .el-image-viewer__prev {
+    left: 40px;
+  }
+  
+  .el-image-viewer__next,
+  .el-image-viewer__prev {
+    top: 50%;
+    transform: translateY(-50%);
+    width: 44px;
+    height: 44px;
+    font-size: 24px;
+    color: #fff;
+    background-color: #606266;
+    border-color: #fff;
+  }
+  
+  .el-image-viewer__next {
+    right: 40px;
+    text-indent: 2px;
+  }
+  
+  .el-image-viewer__mask {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    opacity: 0.5;
+    background: #000;
+  }
+  
+  .viewer-fade-enter-active {
+    animation: viewer-fade-in 0.3s;
+  }
+  
+  .viewer-fade-leave-active {
+    animation: viewer-fade-out 0.3s;
+  }
+  
+  @keyframes viewer-fade-in {
+    0% {
+      transform: translate3d(0, -20px, 0);
+      opacity: 0;
+    }
+  
+    to {
+      transform: translateZ(0);
+      opacity: 1;
+    }
+  }
+  
+  @keyframes viewer-fade-out {
+    0% {
+      transform: translateZ(0);
+      opacity: 1;
+    }
+  
+    to {
+      transform: translate3d(0, -20px, 0);
+      opacity: 0;
+    }
+  }
+  </style>
+  

+ 8 - 0
src/views/product/components/jsMind/components/imageViewer/types.js

@@ -0,0 +1,8 @@
+export function isString(obj) {
+    return Object.prototype.toString.call(obj) === '[object String]';
+  }
+  export function isObject(obj) {
+    return Object.prototype.toString.call(obj) === '[object Object]';
+  }
+  
+  

+ 39 - 0
src/views/product/components/jsMind/components/imageViewer/util.js

@@ -0,0 +1,39 @@
+import Vue from 'vue';
+import {
+  isString,
+  isObject
+} from './types';
+
+const hasOwnProperty = Object.prototype.hasOwnProperty;
+
+export const isFirefox = function () {
+  return !Vue.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
+};
+
+export const autoprefixer = function (style) {
+  if (typeof style !== 'object') return style;
+  const rules = ['transform', 'transition', 'animation'];
+  const prefixes = ['ms-', 'webkit-'];
+  rules.forEach(rule => {
+    const value = style[rule];
+    if (rule && value) {
+      prefixes.forEach(prefix => {
+        style[prefix + rule] = value;
+      });
+    }
+  });
+  return style;
+};
+
+export function rafThrottle(fn) {
+  let locked = false;
+  return function (...args) {
+    if (locked) return;
+    locked = true;
+    window.requestAnimationFrame(_ => {
+      fn.apply(this, args);
+      locked = false;
+    });
+  };
+}
+

+ 357 - 0
src/views/product/components/jsMind/components/jsmind/js/jsmind.draggable.js

@@ -0,0 +1,357 @@
+/*
+ * Released under BSD License
+ * Copyright (c) 2014-2015 hizzgdev@163.com
+ * 
+ * Project Home:
+ *   https://github.com/hizzgdev/jsmind/
+ */
+
+(function ($w) {
+    'use strict';
+    var $d = $w.document;
+    var __name__ = 'jsMind';
+    var jsMind = $w[__name__];
+    if (!jsMind) { return; }
+    if (typeof jsMind.draggable != 'undefined') { return; }
+
+    var jdom = jsMind.util.dom;
+    var jcanvas = jsMind.util.canvas;
+
+    var clear_selection = 'getSelection' in $w ? function () {
+        $w.getSelection().removeAllRanges();
+    } : function () {
+        $d.selection.empty();
+    };
+
+    var options = {
+        line_width: 5,
+        lookup_delay: 500,
+        lookup_interval: 80
+    };
+
+    jsMind.draggable = function (jm) {
+        this.jm = jm;
+        this.e_canvas = null;
+        this.canvas_ctx = null;
+        this.shadow = null;
+        this.shadow_w = 0;
+        this.shadow_h = 0;
+        this.active_node = null;
+        this.target_node = null;
+        this.target_direct = null;
+        this.client_w = 0;
+        this.client_h = 0;
+        this.offset_x = 0;
+        this.offset_y = 0;
+        this.hlookup_delay = 0;
+        this.hlookup_timer = 0;
+        this.capture = false;
+        this.moved = false;
+    };
+
+    jsMind.draggable.prototype = {
+        init: function () {
+            this._create_canvas();
+            this._create_shadow();
+            this._event_bind();
+        },
+
+        resize: function () {
+            this.jm.view.e_nodes.appendChild(this.shadow);
+            this.e_canvas.width = this.jm.view.size.w;
+            this.e_canvas.height = this.jm.view.size.h;
+        },
+
+        _create_canvas: function () {
+            var c = $d.createElement('canvas');
+            this.jm.view.e_panel.appendChild(c);
+            var ctx = c.getContext('2d');
+            this.e_canvas = c;
+            this.canvas_ctx = ctx;
+        },
+
+        _create_shadow: function () {
+            var s = $d.createElement('jmnode');
+            s.style.visibility = 'hidden';
+            s.style.zIndex = '3';
+            s.style.cursor = 'move';
+            s.style.opacity = '0.7';
+            this.shadow = s;
+        },
+
+        reset_shadow: function (el) {
+            var s = this.shadow.style;
+            this.shadow.innerHTML = el.innerHTML;
+            s.left = el.style.left;
+            s.top = el.style.top;
+            s.width = el.style.width;
+            s.height = el.style.height;
+            s.backgroundImage = el.style.backgroundImage;
+            s.backgroundSize = el.style.backgroundSize;
+            s.transform = el.style.transform;
+            this.shadow_w = this.shadow.clientWidth;
+            this.shadow_h = this.shadow.clientHeight;
+
+        },
+
+        show_shadow: function () {
+            if (!this.moved) {
+                this.shadow.style.visibility = 'visible';
+            }
+        },
+
+        hide_shadow: function () {
+            this.shadow.style.visibility = 'hidden';
+        },
+
+        clear_lines: function () {
+            jcanvas.clear(this.canvas_ctx, 0, 0, this.jm.view.size.w, this.jm.view.size.h);
+        },
+
+        _magnet_shadow: function (node) {
+            if (!!node) {
+                this.canvas_ctx.lineWidth = options.line_width;
+                this.canvas_ctx.strokeStyle = 'rgba(0,0,0,0.3)';
+                this.canvas_ctx.lineCap = 'round';
+                this.clear_lines();
+                jcanvas.lineto(this.canvas_ctx,
+                    node.sp.x,
+                    node.sp.y,
+                    node.np.x,
+                    node.np.y);
+            }
+        },
+
+        _lookup_close_node: function () {
+            var root = this.jm.get_root();
+            var root_location = root.get_location();
+            var root_size = root.get_size();
+            var root_x = root_location.x + root_size.w / 2;
+
+            var sw = this.shadow_w;
+            var sh = this.shadow_h;
+            var sx = this.shadow.offsetLeft;
+            var sy = this.shadow.offsetTop;
+
+            var ns, nl;
+
+            var direct = (sx + sw / 2) >= root_x ?
+                jsMind.direction.right : jsMind.direction.left;
+            var nodes = this.jm.mind.nodes;
+            var node = null;
+            var min_distance = Number.MAX_VALUE;
+            var distance = 0;
+            var closest_node = null;
+            var closest_p = null;
+            var shadow_p = null;
+            for (var nodeid in nodes) {
+                var np, sp;
+                node = nodes[nodeid];
+                if (node.isroot || node.direction == direct) {
+                    if (node.id == this.active_node.id) {
+                        continue;
+                    }
+                    ns = node.get_size();
+                    nl = node.get_location();
+                    if (direct == jsMind.direction.right) {
+                        if (sx - nl.x - ns.w <= 0) { continue; }
+                        distance = Math.abs(sx - nl.x - ns.w) + Math.abs(sy + sh / 2 - nl.y - ns.h / 2);
+                        np = { x: nl.x + ns.w - options.line_width, y: nl.y + ns.h / 2 };
+                        sp = { x: sx + options.line_width, y: sy + sh / 2 };
+                    } else {
+                        if (nl.x - sx - sw <= 0) { continue; }
+                        distance = Math.abs(sx + sw - nl.x) + Math.abs(sy + sh / 2 - nl.y - ns.h / 2);
+                        np = { x: nl.x + options.line_width, y: nl.y + ns.h / 2 };
+                        sp = { x: sx + sw - options.line_width, y: sy + sh / 2 };
+                    }
+                    if (distance < min_distance) {
+                        closest_node = node;
+                        closest_p = np;
+                        shadow_p = sp;
+                        min_distance = distance;
+                    }
+                }
+            }
+            var result_node = null;
+            if (!!closest_node) {
+                result_node = {
+                    node: closest_node,
+                    direction: direct,
+                    sp: shadow_p,
+                    np: closest_p
+                };
+            }
+            return result_node;
+        },
+
+        lookup_close_node: function () {
+            var node_data = this._lookup_close_node();
+            if (!!node_data) {
+                this._magnet_shadow(node_data);
+                this.target_node = node_data.node;
+                this.target_direct = node_data.direction;
+            }
+        },
+
+        _event_bind: function () {
+            var jd = this;
+            var container = this.jm.view.container;
+            jdom.add_event(container, 'mousedown', function (e) {
+                var evt = e || event;
+                jd.dragstart.call(jd, evt);
+            });
+            jdom.add_event(container, 'mousemove', function (e) {
+                var evt = e || event;
+                jd.drag.call(jd, evt);
+            });
+            jdom.add_event(container, 'mouseup', function (e) {
+                var evt = e || event;
+                jd.dragend.call(jd, evt);
+            });
+            jdom.add_event(container, 'touchstart', function (e) {
+                var evt = e || event;
+                jd.dragstart.call(jd, evt);
+            });
+            jdom.add_event(container, 'touchmove', function (e) {
+                var evt = e || event;
+                jd.drag.call(jd, evt);
+            });
+            jdom.add_event(container, 'touchend', function (e) {
+                var evt = e || event;
+                jd.dragend.call(jd, evt);
+            });
+            jdom.add_event(container, 'handleDrag', function (e) {
+                var evt = e || event;
+                jd.dragend.call(jd, evt);
+            });
+        },
+
+        dragstart: function (e) {
+            if (!this.jm.get_editable()) { return; }
+            if (this.capture) { return; }
+            this.active_node = null;
+
+            var jview = this.jm.view;
+            var el = e.target || event.srcElement;
+            if (el.tagName.toLowerCase() != 'jmnode') { return; }
+            var nodeid = jview.get_binded_nodeid(el);
+            if (!!nodeid) {
+                var node = this.jm.get_node(nodeid);
+                if (!node.isroot) {
+                    this.reset_shadow(el);
+                    this.active_node = node;
+                    this.offset_x = (e.clientX || e.touches[0].clientX) - el.offsetLeft;
+                    this.offset_y = (e.clientY || e.touches[0].clientY) - el.offsetTop;
+                    this.client_hw = Math.floor(el.clientWidth / 2);
+                    this.client_hh = Math.floor(el.clientHeight / 2);
+                    if (this.hlookup_delay != 0) {
+                        $w.clearTimeout(this.hlookup_delay);
+                    }
+                    if (this.hlookup_timer != 0) {
+                        $w.clearInterval(this.hlookup_timer);
+                    }
+                    var jd = this;
+                    this.hlookup_delay = $w.setTimeout(function () {
+                        jd.hlookup_delay = 0;
+                        jd.hlookup_timer = $w.setInterval(function () {
+                            jd.lookup_close_node.call(jd);
+                        }, options.lookup_interval);
+                    }, options.lookup_delay);
+                    this.capture = true;
+                }
+            }
+        },
+
+        drag: function (e) {
+            if (!this.jm.get_editable()) { return; }
+            if (this.capture) {
+                e.preventDefault();
+                this.show_shadow();
+                this.moved = true;
+                clear_selection();
+                var px = (e.clientX || e.touches[0].clientX) - this.offset_x;
+                var py = (e.clientY || e.touches[0].clientY) - this.offset_y;
+                var cx = px + this.client_hw;
+                var cy = py + this.client_hh;
+                this.shadow.style.left = px + 'px';
+                this.shadow.style.top = py + 'px';
+                clear_selection();
+            }
+        },
+
+        dragend: function (e) {
+            if (!this.jm.get_editable()) { return; }
+            if (this.capture) {
+                if (this.hlookup_delay != 0) {
+                    $w.clearTimeout(this.hlookup_delay);
+                    this.hlookup_delay = 0;
+                    this.clear_lines();
+                }
+                if (this.hlookup_timer != 0) {
+                    $w.clearInterval(this.hlookup_timer);
+                    this.hlookup_timer = 0;
+                    this.clear_lines();
+                }
+                if (this.moved) {
+                    var src_node = this.active_node;
+                    var target_node = this.target_node;
+                    var target_direct = this.target_direct;
+                    this.move_node(src_node, target_node, target_direct);
+                }
+                this.hide_shadow();
+            }
+            this.moved = false;
+            this.capture = false;
+        },
+
+        move_node: function (src_node, target_node, target_direct) {
+            var shadow_h = this.shadow.offsetTop;
+            if (!!target_node && !!src_node && !jsMind.node.inherited(src_node, target_node)) {
+                // lookup before_node
+                var sibling_nodes = target_node.children;
+                var sc = sibling_nodes.length;
+                var node = null;
+                var delta_y = Number.MAX_VALUE;
+                var node_before = null;
+                var beforeid = '_last_';
+                while (sc--) {
+                    node = sibling_nodes[sc];
+                    if (node.direction == target_direct && node.id != src_node.id) {
+                        var dy = node.get_location().y - shadow_h;
+                        if (dy > 0 && dy < delta_y) {
+                            delta_y = dy;
+                            node_before = node;
+                            beforeid = '_first_';
+                        }
+                    }
+                }
+                if (!!node_before) { beforeid = node_before.id; }
+                this.jm.move_node(src_node.id, beforeid, target_node.id, target_direct);
+                this.handleDrag(src_node, target_node, target_direct)
+            }
+            this.active_node = null;
+            this.target_node = null;
+            this.target_direct = null;
+        },
+        // 新增自定义方法
+        handleDrag: function (src_node, target_node, target_direct) {
+        },
+
+        jm_event_handle: function (type, data) {
+            if (type === jsMind.event_type.resize) {
+                this.resize();
+            }
+        }
+    };
+
+    var draggable_plugin = new jsMind.plugin('draggable', function (jm) {
+        var jd = new jsMind.draggable(jm);
+        jd.init();
+        jm.add_event_listener(function (type, data) {
+            jd.jm_event_handle.call(jd, type, data);
+        });
+    });
+
+    jsMind.register_plugin(draggable_plugin);
+
+})(window);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2930 - 0
src/views/product/components/jsMind/components/jsmind/js/jsmind.js


+ 349 - 0
src/views/product/components/jsMind/components/jsmind/js/jsmind.screenshot.js

@@ -0,0 +1,349 @@
+/*
+ * Released under BSD License
+ * Copyright (c) 2014-2015 hizzgdev@163.com
+ * 
+ * Project Home:
+ *   https://github.com/hizzgdev/jsmind/
+ */
+
+(function($w){
+    'use strict';
+
+    var __name__ = 'jsMind';
+    var jsMind = $w[__name__];
+    if(!jsMind){return;}
+    if(typeof jsMind.screenshot != 'undefined'){return;}
+
+    var $d = $w.document;
+    var $c = function(tag){return $d.createElement(tag);};
+
+    var css = function(cstyle,property_name){
+        return cstyle.getPropertyValue(property_name);
+    };
+    var is_visible = function(cstyle){
+        var visibility = css(cstyle,'visibility');
+        var display  = css(cstyle,'display');
+        return (visibility !== 'hidden' && display !== 'none');
+    };
+    var jcanvas = jsMind.util.canvas;
+    jcanvas.rect = function (ctx,x,y,w,h,r) {
+        if (w < 2 * r) r = w / 2;
+        if (h < 2 * r) r = h / 2;
+        ctx.moveTo(x+r, y);
+        ctx.arcTo(x+w, y,   x+w, y+h, r);
+        ctx.arcTo(x+w, y+h, x,   y+h, r);
+        ctx.arcTo(x,   y+h, x,   y,   r);
+        ctx.arcTo(x,   y,   x+w, y,   r);
+    };
+
+    jcanvas.text_multiline = function(ctx,text,x,y,w,h,lineheight){
+        var line = '';
+        var text_len = text.length;
+        var chars = text.split('');
+        var test_line = null;
+        ctx.textAlign = 'left';
+        ctx.textBaseline = 'top';
+        for(var i=0;i<text_len;i++){
+            test_line = line + chars[i];
+            if(ctx.measureText(test_line).width > w && i>0){
+                ctx.fillText(line,x,y);
+                line = chars[i];
+                y += lineheight;
+            }else{
+                line = test_line;
+            }
+        }
+        ctx.fillText(line,x,y);
+    };
+
+    jcanvas.text_ellipsis = function(ctx,text,x,y,w,h){
+        var center_y = y+h/2;
+        var text = jcanvas.fittingString(ctx,text,w);
+        ctx.textAlign = 'left';
+        ctx.textBaseline = 'middle';
+        ctx.fillText(text,x,center_y,w);
+    };
+
+    jcanvas.fittingString = function(ctx,text,max_width) {
+        var width = ctx.measureText(text).width;
+        var ellipsis = '…'
+        var ellipsis_width = ctx.measureText(ellipsis).width;
+        if (width<=max_width || width<=ellipsis_width) {
+            return text;
+        } else {
+            var len = text.length;
+            while (width>=max_width-ellipsis_width && len-->0) {
+                text = text.substring(0, len);
+                width = ctx.measureText(text).width;
+            }
+            return text+ellipsis;
+        }
+    };
+
+    jcanvas.image = function(ctx,backgroundUrl,x,y,w,h,r,rotation,callback){
+        var img = new Image();
+        img.onload = function () {
+            ctx.save();
+            ctx.translate(x,y);
+            ctx.save();
+            ctx.beginPath();
+            jcanvas.rect(ctx,0,0,w,h,r);
+            ctx.closePath();
+            ctx.clip();
+            ctx.translate(w/2,h/2);
+            ctx.rotate(rotation*Math.PI/180);
+            ctx.drawImage(img,-w/2,-h/2);
+            ctx.restore();
+            ctx.restore();
+            callback();
+        }
+        img.src = backgroundUrl;
+    };
+
+    jsMind.screenshot = function(jm){
+        this.jm = jm;
+        this.canvas_elem = null;
+        this.canvas_ctx = null;
+        this._inited = false;
+    };
+
+    jsMind.screenshot.prototype = {
+        init:function(){
+            if(this._inited){return;}
+            // console.log('init');
+            var c = $c('canvas');
+            var ctx = c.getContext('2d');
+
+            this.canvas_elem = c;
+            this.canvas_ctx = ctx;
+            this.jm.view.e_panel.appendChild(c);
+            this._inited = true;
+            this.resize();
+        },
+
+        shoot:function(callback){
+            this.init();
+            this._watermark();
+            var jms = this;
+            this._draw(function(){
+                if(!!callback){
+                    callback(jms);
+                }
+                jms.clean();
+            });
+        },
+
+        shootDownload: function(){
+            this.shoot(function(jms){
+                jms._download();
+            });
+        },
+
+        shootAsDataURL: function(callback){
+            this.shoot(function(jms){
+                callback(jms.canvas_elem.toDataURL());
+            });
+        },
+
+        resize:function(){
+            if(this._inited){
+                this.canvas_elem.width=this.jm.view.size.w;
+                this.canvas_elem.height=this.jm.view.size.h;
+            }
+        },
+
+        clean:function(){
+            var c = this.canvas_elem;
+            this.canvas_ctx.clearRect(0,0,c.width,c.height);
+        },
+
+        _draw:function(callback){
+            var ctx = this.canvas_ctx;
+            ctx.textAlign = 'left';
+            ctx.textBaseline = 'top';
+            this._draw_lines();
+            this._draw_nodes(callback);
+        },
+
+        _watermark:function(){
+            var c = this.canvas_elem;
+            var ctx = this.canvas_ctx;
+            ctx.textAlign='right';
+            ctx.textBaseline='bottom';
+            ctx.fillStyle='#000';
+            ctx.font='11px Verdana,Arial,Helvetica,sans-serif';
+            ctx.fillText('hizzgdev.github.io/jsmind',c.width-5.5,c.height-2.5);
+            ctx.textAlign='left';
+            ctx.fillText($w.location,5.5,c.height-2.5);
+        },
+
+        _draw_lines:function(){
+            this.jm.view.show_lines(this.canvas_ctx);
+        },
+
+        _draw_nodes:function(callback){
+            var nodes = this.jm.mind.nodes;
+            var node;
+            for(var nodeid in nodes){
+                node = nodes[nodeid];
+                this._draw_node(node);
+            }
+
+            function check_nodes_ready() {
+                // console.log('check_node_ready'+new Date());
+                var allOk = true;
+                for(var nodeid in nodes){
+                    node = nodes[nodeid];
+                    allOk = allOk & node.ready;
+                }
+
+                if(!allOk) {
+                    $w.setTimeout(check_nodes_ready, 200);
+                } else {
+                    $w.setTimeout(callback, 200);
+                }
+            }
+            check_nodes_ready();
+        },
+
+        _draw_node:function(node){
+            var ctx = this.canvas_ctx;
+            var view_data = node._data.view;
+            var node_element = view_data.element;
+            var ncs = getComputedStyle(node_element);
+            if(!is_visible(ncs)){
+                node.ready = true;
+                return;
+            }
+
+            var bgcolor = css(ncs,'background-color');
+            var round_radius = parseInt(css(ncs,'border-top-left-radius'));
+            var color = css(ncs,'color');
+            var padding_left = parseInt(css(ncs,'padding-left'));
+            var padding_right = parseInt(css(ncs,'padding-right'));
+            var padding_top = parseInt(css(ncs,'padding-top'));
+            var padding_bottom = parseInt(css(ncs,'padding-bottom'));
+            var text_overflow = css(ncs,'text-overflow');
+            var font = css(ncs,'font-style')+' '+
+                        css(ncs,'font-variant')+' '+
+                        css(ncs,'font-weight')+' '+
+                        css(ncs,'font-size')+'/'+css(ncs,'line-height')+' '+
+                        css(ncs,'font-family');
+
+            var rb = {x:view_data.abs_x,
+                      y:view_data.abs_y,
+                      w:view_data.width+1,
+                      h:view_data.height+1};
+            var tb = {x:rb.x+padding_left,
+                      y:rb.y+padding_top,
+                      w:rb.w-padding_left-padding_right,
+                      h:rb.h-padding_top-padding_bottom};
+
+            ctx.font=font;
+            ctx.fillStyle = bgcolor;
+            ctx.beginPath();
+            jcanvas.rect(ctx, rb.x, rb.y, rb.w, rb.h, round_radius);
+            ctx.closePath();
+            ctx.fill();
+
+            ctx.fillStyle = color;
+            if ('background-image' in node.data) {
+                var backgroundUrl = css(ncs,'background-image').slice(5, -2);
+                node.ready = false;
+                var rotation = 0;
+                if ('background-rotation' in node.data) {
+                    rotation = node.data['background-rotation'];
+                }
+                jcanvas.image(ctx, backgroundUrl, rb.x, rb.y, rb.w, rb.h, round_radius, rotation,
+                    function() {
+                        node.ready = true;
+                    });
+            }
+            if (!!node.topic) {
+                if(text_overflow === 'ellipsis'){
+                    jcanvas.text_ellipsis(ctx, node.topic, tb.x, tb.y, tb.w, tb.h);
+                }else{
+                    var line_height = parseInt(css(ncs,'line-height'));
+                    jcanvas.text_multiline(ctx, node.topic, tb.x, tb.y, tb.w, tb.h,line_height);
+                }
+            }
+            if(!!view_data.expander){
+                this._draw_expander(view_data.expander);
+            }
+            if (!('background-image' in node.data)) {
+                node.ready = true;
+            }
+        },
+
+        _draw_expander:function(expander){
+            var ctx = this.canvas_ctx;
+            var ncs = getComputedStyle(expander);
+            if(!is_visible(ncs)){ return; }
+
+            var style_left = css(ncs,'left');
+            var style_top = css(ncs,'top');
+            var font = css(ncs,'font');
+            var left = parseInt(style_left);
+            var top = parseInt(style_top);
+            var is_plus = expander.innerHTML === '+';
+
+            ctx.lineWidth = 1;
+
+            ctx.beginPath();
+            ctx.arc(left+7,top+7,5,0,Math.PI*2,true);
+            ctx.moveTo(left+10,top+7);
+            ctx.lineTo(left+4,top+7);
+            if(is_plus){
+                ctx.moveTo(left+7,top+4);
+                ctx.lineTo(left+7,top+10);
+            }
+            ctx.closePath();
+            ctx.stroke();
+        },
+
+        _download:function(){
+            var c = this.canvas_elem;
+            var name = this.jm.mind.name+'.png';
+
+            if (navigator.msSaveBlob && (!!c.msToBlob)) {
+                var blob = c.msToBlob();
+                navigator.msSaveBlob(blob,name);
+            } else {
+                var bloburl = this.canvas_elem.toDataURL();
+                var anchor = $c('a');
+                if ('download' in anchor) {
+                    anchor.style.visibility = 'hidden';
+                    anchor.href = bloburl;
+                    anchor.download = name;
+                    $d.body.appendChild(anchor);
+                    var evt = $d.createEvent('MouseEvents');
+                    evt.initEvent('click', true, true);
+                    anchor.dispatchEvent(evt);
+                    $d.body.removeChild(anchor);
+                } else {
+                    location.href = bloburl;
+                }
+            }
+        },
+
+        jm_event_handle:function(type,data){
+            if(type === jsMind.event_type.resize){
+                this.resize();
+            }
+        }
+    };
+
+    var screenshot_plugin = new jsMind.plugin('screenshot',function(jm){
+        var jss = new jsMind.screenshot(jm);
+        jm.screenshot = jss;
+        jm.shoot = function(){
+            jss.shoot();
+        };
+        jm.add_event_listener(function(type,data){
+            jss.jm_event_handle.call(jss,type,data);
+        });
+    });
+
+    jsMind.register_plugin(screenshot_plugin);
+
+})(window);

+ 159 - 0
src/views/product/components/jsMind/components/jsmind/style/jsmind.css

@@ -0,0 +1,159 @@
+/*
+ * Released under BSD License
+ * Copyright (c) 2014-2015 hizzgdev@163.com
+ * 
+ * Project Home:
+ *   https://github.com/hizzgdev/jsmind/
+ */
+
+/* important section */
+.jsmind-inner{position:relative;overflow:auto;width:100%;height:100%;}/*box-shadow:0 0 2px #000;*/
+.jsmind-inner{
+    moz-user-select:-moz-none;
+    -moz-user-select:none;
+    -o-user-select:none;
+    -khtml-user-select:none;
+    -webkit-user-select:none;
+    -ms-user-select:none;
+    user-select:none;
+}
+
+/* z-index:1 */
+canvas{position:absolute;z-index:1;}
+
+/* z-index:2 */
+jmnodes{position:absolute;z-index:2;background-color:rgba(0,0,0,0);}/*background color is necessary*/
+jmnode{position:absolute;cursor:default;max-width:400px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
+jmexpander{position:absolute;width:11px;height:11px;display:block;overflow:hidden;line-height:12px;font-size:12px;text-align:center;border-radius:6px;border-width:1px;border-style:solid;cursor:pointer;}
+
+/* default theme */
+jmnode{padding:10px;background-color:#fff;color:#333;border-radius:5px;box-shadow:1px 1px 1px #666;font:16px/1.125 Verdana,Arial,Helvetica,sans-serif;}
+jmnode:hover{box-shadow:2px 2px 8px #000;background-color:#ebebeb;color:#333;}
+jmnode.selected{background-color:#11f;color:#fff;box-shadow:2px 2px 8px #000;}
+jmnode.root{font-size:24px;}
+jmexpander{border-color:gray;}
+jmexpander:hover{border-color:#000;}
+
+@media screen and (max-device-width: 1024px) {
+    jmnode{padding:5px;border-radius:3px;font-size:14px;}
+    jmnode.root{font-size:21px;}
+}
+/* primary theme */
+jmnodes.theme-primary jmnode{background-color:#428bca;color:#fff;border-color:#357ebd;}
+jmnodes.theme-primary jmnode:hover{background-color:#3276b1;border-color:#285e8e;}
+jmnodes.theme-primary jmnode.selected{background-color:#f1c40f;color:#fff;}
+jmnodes.theme-primary jmnode.root{}
+jmnodes.theme-primary jmexpander{}
+jmnodes.theme-primary jmexpander:hover{}
+
+/* warning theme */
+jmnodes.theme-warning jmnode{background-color:#f0ad4e;border-color:#eea236;color:#fff;}
+jmnodes.theme-warning jmnode:hover{background-color:#ed9c28;border-color:#d58512;}
+jmnodes.theme-warning jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-warning jmnode.root{}
+jmnodes.theme-warning jmexpander{}
+jmnodes.theme-warning jmexpander:hover{}
+
+/* danger theme */
+jmnodes.theme-danger jmnode{background-color:#d9534f;border-color:#d43f3a;color:#fff;}
+jmnodes.theme-danger jmnode:hover{background-color:#d2322d;border-color:#ac2925;}
+jmnodes.theme-danger jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-danger jmnode.root{}
+jmnodes.theme-danger jmexpander{}
+jmnodes.theme-danger jmexpander:hover{}
+
+/* success theme */
+jmnodes.theme-success jmnode{background-color:#5cb85c;border-color:#4cae4c;color:#fff;}
+jmnodes.theme-success jmnode:hover{background-color:#47a447;border-color:#398439;}
+jmnodes.theme-success jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-success jmnode.root{}
+jmnodes.theme-success jmexpander{}
+jmnodes.theme-success jmexpander:hover{}
+
+/* info theme */
+jmnodes.theme-info jmnode{background-color:#5dc0de;border-color:#46b8da;;color:#fff;}
+jmnodes.theme-info jmnode:hover{background-color:#39b3d7;border-color:#269abc;}
+jmnodes.theme-info jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-info jmnode.root{}
+jmnodes.theme-info jmexpander{}
+jmnodes.theme-info jmexpander:hover{}
+
+/* greensea theme */
+jmnodes.theme-greensea jmnode{background-color:#1abc9c;color:#fff;}
+jmnodes.theme-greensea jmnode:hover{background-color:#16a085;}
+jmnodes.theme-greensea jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-greensea jmnode.root{}
+jmnodes.theme-greensea jmexpander{}
+jmnodes.theme-greensea jmexpander:hover{}
+
+/* nephrite theme */
+jmnodes.theme-nephrite jmnode{background-color:#2ecc71;color:#fff;}
+jmnodes.theme-nephrite jmnode:hover{background-color:#27ae60;}
+jmnodes.theme-nephrite jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-nephrite jmnode.root{}
+jmnodes.theme-nephrite jmexpander{}
+jmnodes.theme-nephrite jmexpander:hover{}
+
+/* belizehole theme */
+jmnodes.theme-belizehole jmnode{background-color:#3498db;color:#fff;}
+jmnodes.theme-belizehole jmnode:hover{background-color:#2980b9;}
+jmnodes.theme-belizehole jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-belizehole jmnode.root{}
+jmnodes.theme-belizehole jmexpander{}
+jmnodes.theme-belizehole jmexpander:hover{}
+
+/* wisteria theme */
+jmnodes.theme-wisteria jmnode{background-color:#9b59b6;color:#fff;}
+jmnodes.theme-wisteria jmnode:hover{background-color:#8e44ad;}
+jmnodes.theme-wisteria jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-wisteria jmnode.root{}
+jmnodes.theme-wisteria jmexpander{}
+jmnodes.theme-wisteria jmexpander:hover{}
+
+/* asphalt theme */
+jmnodes.theme-asphalt jmnode{background-color:#34495e;color:#fff;}
+jmnodes.theme-asphalt jmnode:hover{background-color:#2c3e50;}
+jmnodes.theme-asphalt jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-asphalt jmnode.root{}
+jmnodes.theme-asphalt jmexpander{}
+jmnodes.theme-asphalt jmexpander:hover{}
+
+/* orange theme */
+jmnodes.theme-orange jmnode{background-color:#f1c40f;color:#fff;}
+jmnodes.theme-orange jmnode:hover{background-color:#f39c12;}
+jmnodes.theme-orange jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-orange jmnode.root{}
+jmnodes.theme-orange jmexpander{}
+jmnodes.theme-orange jmexpander:hover{}
+
+/* pumpkin theme */
+jmnodes.theme-pumpkin jmnode{background-color:#e67e22;color:#fff;}
+jmnodes.theme-pumpkin jmnode:hover{background-color:#d35400;}
+jmnodes.theme-pumpkin jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-pumpkin jmnode.root{}
+jmnodes.theme-pumpkin jmexpander{}
+jmnodes.theme-pumpkin jmexpander:hover{}
+
+/* pomegranate theme */
+jmnodes.theme-pomegranate jmnode{background-color:#e74c3c;color:#fff;}
+jmnodes.theme-pomegranate jmnode:hover{background-color:#c0392b;}
+jmnodes.theme-pomegranate jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-pomegranate jmnode.root{}
+jmnodes.theme-pomegranate jmexpander{}
+jmnodes.theme-pomegranate jmexpander:hover{}
+
+/* clouds theme */
+jmnodes.theme-clouds jmnode{background-color:#ecf0f1;color:#333;}
+jmnodes.theme-clouds jmnode:hover{background-color:#bdc3c7;}
+jmnodes.theme-clouds jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-clouds jmnode.root{}
+jmnodes.theme-clouds jmexpander{}
+jmnodes.theme-clouds jmexpander:hover{}
+
+/* asbestos theme */
+jmnodes.theme-asbestos jmnode{background-color:#95a5a6;color:#fff;}
+jmnodes.theme-asbestos jmnode:hover{background-color:#7f8c8d;}
+jmnodes.theme-asbestos jmnode.selected{background-color:#11f;color:#fff;}
+jmnodes.theme-asbestos jmnode.root{}
+jmnodes.theme-asbestos jmexpander{}
+jmnodes.theme-asbestos jmexpander:hover{}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1267 - 0
src/views/product/components/jsMind/components/mind.vue


+ 23 - 0
src/views/product/components/jsMind/index.vue

@@ -0,0 +1,23 @@
+<template>
+    <div>
+        <mind :row="row"></mind>
+    </div>
+</template>
+<script>
+import mind from './components/mind.vue'
+export default{
+    components:{
+        mind,
+    },
+    data() {
+        return {
+            
+        }
+    },
+    computed:{
+        type:{//1是产品类别,2是产品
+            default:1
+        }
+    }
+}
+</script>

+ 5 - 1
src/views/project/index.vue

@@ -396,7 +396,11 @@ export default {
       this.$refs.field.open(this.fieldList)
     },
     //操作列
-    handleOption({ option, row ,isLast}) {
+    async handleOption({ option, row ,isLast}) {
+      if(!(await this.$permission.projectPermission(row.id))){
+        this.$showPermissionDialog()
+        return false
+      }
       switch (option) {
         case '0'://Excel导入
           this.patentImport(row,1)

+ 2 - 2
src/views/project/patentDetails/components/patentMessage/PatentRight.vue

@@ -7,9 +7,9 @@
         </el-tabs>
       </el-header>
       <el-main>
-        <div v-if="name != 2" v-html="getViewDom(patent.claim, '权利要求'+tabItem.label, 'column')" :style="setStyle()" :data-type="'权利要求'+tabItem.label"></div>
+        <div class="height_100" v-if="name != 2" v-html="getViewDom(patent.claim, '权利要求'+tabItem.label, 'column')" :style="setStyle()" :data-type="'权利要求'+tabItem.label"></div>
         
-        <div v-else>
+        <div v-else class="height_100">
           <my-view>
             <div slot="left">
               <myTree :list="patent.patentRightTree" style="height: 100%" :props="{

+ 5 - 1
src/views/report/components/index.vue

@@ -496,7 +496,11 @@ export default {
       this.$refs.ReportForm.open(form)
     },
     //操作列
-    handleOption({ option, row, isLast }) {
+    async handleOption({ option, row, isLast }) {
+      if(!(await this.$permission.projectPermission(row.id))){
+        this.$showPermissionDialog()
+        return false
+      }
       this.$s.setSession('params', row)
       switch (option) {
         case '0'://分享

+ 4 - 1
src/views/task/components/index.vue

@@ -519,7 +519,10 @@ export default {
             }
           }
           var obj3 = this.searchFiled.find(item => { return item.label == '流程节点' })
-          obj3.options = this.pathOptions
+          if(obj3){
+            obj3.options = this.pathOptions
+          }
+          
 
         }
       })