zhuliu 1 tahun lalu
induk
melakukan
2d34c258db

+ 3 - 3
public/专利培育布局A1.svg

@@ -205,12 +205,12 @@
       </text>
     </g>
     <!-- 线 -->
-    <g id="SvgjsG113899" transform="translate(280.3333333333335,18.994856516519462)">
+    <g id="SvgjsG113899" transform="translate(280.3333333333335,18.994856516519462)" style='{{ 专利培育布局 , css }}'>
       <path id="SvgjsPath1208" d="M 10.5 0L 10.5 40" stroke="#e74f4c" stroke-width="1" fill="none"></path>
       <path id="SvgjsPath1209" d="M 0 0L 21 0L 21 40L 0 40Z" stroke="none" fill="none"></path>
     </g>
     <!-- 栏位 -->
-    <g id="SvgjsG122099" transform="translate(300.3333333333335,26.994856516519462)">
+    <g id="SvgjsG122099" transform="translate(300.3333333333335,26.994856516519462)" style='{{ 专利培育布局 , css }}'>
       <path id="SvgjsPath1221" d="M 0 0L 55.66666666666663 0L 55.66666666666663 40L 0 40Z" stroke="none" fill="none">
       </path>
       <g id="SvgjsG122299">
@@ -222,7 +222,7 @@
       </g>
     </g>
     <!-- 数量 -->
-    <g id="SvgjsG119999" transform="translate(335.3333333333335,24.994856516519462)">
+    <g id="SvgjsG119999" transform="translate(335.3333333333335,24.994856516519462)" style='{{ 专利培育布局 , css }}'>
       <path id="SvgjsPath120099" d="M 0 0L 45.49999999999966 0L 45.49999999999966 44.99475065867236L 0 44.99475065867236Z" stroke="none" fill="none"></path>
       <g id="SvgjsG1201">
         <text id="SvgjsText120299" font-family="思源黑体" text-anchor="end" font-size="13px" width="46px" fill="#e74f4c" font-weight="700" align="middle" lineHeight="125%" anchor="end" family="思源黑体" size="13px" weight="700" font-style="" opacity="1" y="3.3723753293361796" transform="rotate(0)">

+ 3 - 19
src/utils/direct/index.js

@@ -14,24 +14,6 @@ const draggable = (el, binding) => {
 
 
 //下拉框懒加载
-// const SelectLazyLoading=(el,binding)=>{
-//    console.log(el)
-//     let SELECT_DOM = el.querySelector(".el-select-dropdown .el-select-dropdown__wrap") || el.querySelector('.el-autocomplete-suggestion__wrap') ;
-//     console.log(SELECT_DOM)
-//     if(!SELECT_DOM){
-//         return false
-//     }
-//     SELECT_DOM.addEventListener("scroll", function () {
-//         // scrollHeight:当前所有选项的高度
-//       // scrollTop:滚动的距离
-//       // clientHeight:下拉框的高度
-//       console.log(SELECT_DOM,this.scrollHeight , this.scrollTop , this.clientHeight,this.scrollHeight - this.scrollTop - 1 <= this.clientHeight)
-//       let condition = this.scrollHeight - this.scrollTop - 1 <= this.clientHeight;
-//       if (condition) {
-//         binding.value();
-//       }
-//     });
-// }
 const SelectLazyLoading={
     inserted(el,binding){
         let SELECT_DOM = el.querySelector(".el-select-dropdown .el-select-dropdown__wrap") || el.querySelector('.el-autocomplete-suggestion__wrap') ;
@@ -76,11 +58,13 @@ const DivHeight={
     }
 }
 
+
+
 const directives = {
     draggable,
     SelectLazyLoading,
     disabled,
-    DivHeight
+    DivHeight,
 };
 // 这种写法可以批量注册指令
 export default {

+ 3 - 1
src/utils/model/svg/customSvg.vue

@@ -21,6 +21,7 @@ export default {
       type: String,
       default: '竞争对手威胁应对'
     },
+
   },
   watch: {
     'QuestionTotal'(val) {
@@ -106,6 +107,8 @@ export default {
               var value = this.getColor(arr[0].trim(),arr[1].trim())
             }else if(arr[1].trim() == 'icon'){
               var value = this.getIcon(arr[0].trim(),arr[1].trim())
+            }else if(arr[1].trim() == 'css'){
+              var value = this.getCss(arr[0].trim(),arr[1].trim())
             }
             else{
               var value = this.getTotal(arr[0].trim(),arr[1].trim())
@@ -117,7 +120,6 @@ export default {
     },
     //查看单个事件流程图
     getQuestion(val){
-      console.log(val)
     }
   },
 }

+ 7 - 1
src/utils/model/svg/mixins.js

@@ -6,7 +6,7 @@ export default {
       type:[Array,Object]
     },
     QuestionTotal:Array,
-    questionName:String
+    eventName:String
   },
   components: {
     // Popover,
@@ -77,6 +77,12 @@ export default {
         return 'url(#SvgjsPattern1100)'
       }
     },
+    getCss(title){
+      if(this.eventName){
+        return 'display:none'
+      }
+      return 'display:block'
+    },
     getQuestionTotal(type) {
       if(this.QuestionTotal.length>0){
         const total = this.QuestionTotal.find(item=>{return item.name == type}).count

+ 17 - 3
src/views/event/components/index.vue

@@ -47,11 +47,14 @@
             :groupBy='groupingValue'
             :groupingOption="groupingOption"
             :searchOption="searchOption"
+            :sign="true"
+            :scenarioName="scenarioName"
+            @toFlowPath="toFlowPath"
             :handleMessage="handleMessage"
           ></component>
         </div>
       </el-main>
-      <el-footer class="pagination">
+      <el-footer class="pagination" v-if="viewSelectedBtn != 'visual'">
         <el-pagination
           background
           layout="total, sizes, prev, pager, next, jumper"
@@ -73,6 +76,8 @@
 <script>
 import Table from './view/table.vue'
 import Card from './view/card.vue'
+import visual from '@/views/visual/components/sceneSVG.vue';
+import flowPath from '@/views/visual/title/index.vue'
 import mergeTable from './view/mergeTable.vue';
 import addEvent from './dialog/addEvent.vue';
 import fields from '@/views/components/dialog/fields.vue';
@@ -80,6 +85,8 @@ export default {
   components: {
     Table,
     Card,
+    visual,
+    flowPath,
     mergeTable,
     addEvent,
     fields
@@ -95,8 +102,8 @@ export default {
       searchFiled: [],
       //检索条件
       searchOption: {
-        scenarioNames:this.scenarioId,
-        name:this.eventName
+        scenarioNames:this.scenarioId || (localStorage.scenarioName?[Number(localStorage.scenarioName)]:''),
+        name:this.eventName || localStorage.searchContent
       },
       //分组的值
       groupingValue: '',
@@ -132,6 +139,8 @@ export default {
       showView: false,
       //操作回馈
       handleMessage:'',
+      //应用场景名称
+      scenarioName:''
     };
   },
   watch: {
@@ -159,6 +168,11 @@ export default {
     this.getList()
   },
   methods: {
+    //打开应用场景处理流程界面
+    toFlowPath(title){
+      this.scenarioName = title
+      this.viewSelected = 'flowPath'
+    },
     //显示栏位管理
     getFieldList(data){
       this.columnList = data

+ 76 - 16
src/views/home/components/echarts/components/event.vue

@@ -5,20 +5,89 @@
 <script>
 export default {
   components: {},
-  props: {},
+  props: {
+    resize:''
+  },
   data() {
-    return {};
+    return {
+      chart:null,
+      eventData:[]
+    };
+  },
+  watch: {
+    resize(val){
+      if(val){
+        this.handleSizeChange()
+      }
+    }
+  },
+  computed: {
+    scenario(){
+      return this.$store.state.dictMessage.scenario
+    }
   },
-  watch: {},
-  computed: {},
   created() {},
   mounted() {
-    this.initChart();
+    this.init()
   },
   methods: {
+    handleSizeChange(){
+      this.$nextTick(()=>{
+        this.chart.resize()
+      }) 
+    },
+    async init(){
+      if(this.scenario && this.scenario.length>0){
+        let params = {
+          current:1,
+          size:999,//分页信息
+          searchQuery:'',//检索条件
+          orderDTOList: [
+            {
+              "orderBy": "createTime",
+              "orderType": 1
+            }
+          ],//排序
+          groupBy:'scenarioNames',//分组信息
+        }
+        var data = []
+        await this.$api.groupEvent(params).then(res => {
+          if (res.code == 200) {
+            data=res.data.data.values
+          }
+        }).catch(err => {
+          data = []
+        })
+      }
+      this.scenario.forEach((item,index) => {
+        var obj = data.find(i=>{
+          return i.value == item.id
+        })
+        var event = {}
+        event.name = item.name
+        event.id = item.id
+        if(obj){
+          event.value = obj.count
+        }else{
+          event.value = 0
+        }
+        this.eventData.push(event)
+      });
+      this.initChart()
+    },
     initChart() {
       const chartDom = this.$refs.eventEcharts;
-      this.$echarts.init(chartDom).setOption(
+      this.chart = this.$echarts.init(chartDom)
+      this.chart.on('click',(params)=>{
+        localStorage.scenarioName = params.data.id
+        this.$router.push({
+          name:'Event',
+        })
+        setTimeout(function () {
+          localStorage.removeItem('scenarioName')
+        }, 1000);
+      })
+      this.chart.setOption(
         {
           tooltip: {
             trigger: "item",
@@ -61,16 +130,7 @@ export default {
               radius: ["50%", "80%"],
               center: ["0", "50%"],
               left:'25%',
-              data: [
-                { value: 1048, name: "专利培育布局" },
-                { value: 735, name: "产品上市/出口风险控制" },
-                { value: 580, name: "侵权纠纷" },
-                { value: 484, name: "专利盘点与运维" },
-                { value: 300, name: "专利维权" },
-                { value: 300, name: "科技与重大立项专利导航" },
-                { value: 300, name: "IPO上市" },
-                { value: 300, name: "竞争对手威胁应对" },
-              ],
+              data: this.eventData,
             },
           ],
           emphasis: {

+ 80 - 8
src/views/home/components/echarts/components/report.vue

@@ -6,20 +6,92 @@
 import * as echarts from 'echarts'
 export default {
   components: {},
-  props: {},
+  props: {
+    resize:''
+  },
   data() {
-    return {};
+    return {
+      reportData:{
+        type:[],
+        count:[]
+      },
+      chart:null
+    };
+  },
+  watch: {
+    resize(val){
+      if(val){
+        this.handleSizeChange()
+      }
+    }
+  },
+  computed: {
+    reportType(){
+      return this.$store.state.dictMessage.dictMessage.REPORT_TYPE
+    }
   },
-  watch: {},
-  computed: {},
   created() {},
   mounted() {
-    this.initChart();
+    this.init()
   },
   methods: {
+    handleSizeChange(){
+      this.$nextTick(()=>{
+        this.chart.resize()
+      }) 
+    },
+    async init(){
+      if(this.reportType && this.reportType.length>0){
+        let params = {
+          current:1,
+          size:999,//分页信息
+          searchQuery: '',//检索条件
+          orderDTOList: [
+            {
+              "orderBy": "createTime",
+              "orderType": 1
+            }
+          ],//排序
+          groupBy: 'reportTypeName',//分组信息
+        }
+        var data = []
+       await this.$api.groupReportProject(params).then(res => {
+          if (res.code == 200) {
+            data = res.data.data.values
+          }
+        }).catch(error => {
+          data = []
+        })
+      }
+      this.reportType.forEach((item,index) => {
+        var obj = data.find(i=>{
+          return i.value == item.dictChildValue
+        })
+        this.reportData.type.push(item.dictChildLabel)
+        if(obj){
+          this.reportData.count.push(obj.count)
+        }else{
+          this.reportData.count.push(0)
+        }
+      });
+      this.initChart()
+    },
     initChart() {
       const chartDom = this.$refs.reportEcharts;
-      this.$echarts.init(chartDom).setOption({
+      this.chart = this.$echarts.init(chartDom)
+      this.chart.on('click',(params)=>{
+        var obj = this.reportType.find(item=>{
+          return item.dictChildLabel == params.name
+        })
+        localStorage.reportType = obj.dictChildValue
+        this.$router.push({
+          name:'AllReport',
+        })
+        setTimeout(function () {
+          localStorage.removeItem('reportType')
+        }, 1000);
+      })
+      this.chart.setOption({
         tooltip: {
             trigger: 'axis',
             axisPointer: {
@@ -32,7 +104,7 @@ export default {
           bottom:'30'
         },
         xAxis: {
-          data: ['无效分析', '稳定行分析', '第三方意见', '侵权分析','FTO调查','回避设计','无效应对'],
+          data: this.reportData.type,
           axisLabel: {
             show: false,
             // inside: true,
@@ -98,7 +170,7 @@ export default {
                 fontWeight:'bold',
                 fontsize:18
             },
-            data: [220, 182, 191, 234,220,250,666],
+            data: this.reportData.count,
           },
         ],
       });

+ 20 - 4
src/views/home/components/echarts/components/task.vue

@@ -5,20 +5,36 @@
 <script>
   export default {
     components: {},
-    props: {},
+    props: {
+      resize:''
+    },
     data() {
-      return {};
+      return {
+        chart:null
+      };
+    },
+    watch: {
+      resize(val){
+        if(val){
+          this.handleSizeChange()
+        }
+      }
     },
-    watch: {},
     computed: {},
     created() {},
     mounted() {
       this.initChart();
     },
     methods: {
+      handleSizeChange(){
+        this.$nextTick(()=>{
+          this.chart.resize()
+        }) 
+      },
       initChart() {
         const chartDom = this.$refs.taskEcharts;
-        this.$echarts.init(chartDom).setOption(
+        this.chart = this.$echarts.init(chartDom)
+        this.chart.setOption(
             {
             tooltip: {
                 trigger: 'item'

+ 7 - 7
src/views/home/components/echarts/index.vue

@@ -1,14 +1,14 @@
 <template> 
-  <div class="home_echarts" v-if="show">
+  <div class="home_echarts">
     <div class="left" id='step3'>
-      <report-echart></report-echart>
+      <report-echart :resize="resize"></report-echart>
     </div>
     <div class="right">
         <div class="top" id='step4'>
-          <task-echart></task-echart>
+          <task-echart :resize="resize"></task-echart>
         </div>
         <div class="bottom" id='step5'>
-          <event-echart></event-echart>
+          <event-echart :resize="resize"></event-echart>
         </div>
     </div>
   </div>
@@ -27,7 +27,7 @@ export default {
   props: {},
   data() {
     return {
-      show:true
+      resize:true
     };
   },
   watch: {},
@@ -35,9 +35,9 @@ export default {
   created() {},
   mounted() {
     window.addEventListener('resize',()=>{
-      this.show = false
+      this.resize = false
       this.$nextTick(()=>{
-        this.show = true
+        this.resize = true
       })
     })
   },

+ 1 - 1
src/views/home/components/visualRouter.vue

@@ -2,7 +2,7 @@
   <div class="height_100">
     <el-container>
         <el-aside width="300px">
-            <el-form ref="form" :model="form" label-width="120px" size="mini">
+            <el-form ref="form" :model="form" label-width="130px" size="mini">
                 <el-form-item label="事件名称:">
                     <myTooltip :content="form.name" >
                         <div v-html="$commonJS.getColumnData(form, {type:'String',value:'name'})" class="noWrap"></div>

+ 4 - 4
src/views/home/index.vue

@@ -87,7 +87,7 @@ export default {
       options: [
         {
           label: '专利数据库',
-          value: 'Workspace',
+          value: 'Project',
           placeholder: '请输入专利数据库名称'
         },
         {
@@ -102,7 +102,7 @@ export default {
         },
         {
           label: '事件',
-          value: 'QuestionEvent',
+          value: 'Event',
           placeholder: '请输入事件名称'
         },
         {
@@ -113,7 +113,7 @@ export default {
       ],
       queryParams: {
         content: '',
-        select: 'Workspace'
+        select: 'Project'
       },
     }
   },
@@ -130,7 +130,7 @@ export default {
         name:this.queryParams.select,
       })
       setTimeout(function () {
-        localStorage.searchContent = ''
+        localStorage.removeItem('searchContent')
       }, 1000);
     },
     

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

@@ -258,7 +258,7 @@ export default {
           this.$api.adminLogout().then(response => {
             this.$cookie.remove("token")
             this.$router.push({ path: '/login' })
-            localStorage.removeItem('VUEX_STORE')
+            localStorage.removeItem('vuex')
           })
           break;
         case 'changePwd':

+ 1 - 1
src/views/layout/components/guide.js

@@ -252,7 +252,7 @@ const config ={
     stagePadding: 10,
     // showButtons: [ 'next','prev', 'close'], //1 pass an array of buttons to show
     allowKeyboardControl:true,
-    allowClose: false, // 禁止点击外部关闭
+    allowClose: true, // 禁止点击外部关闭
     showProgress:true,
     progressText:'{{current}}/{{total}}',
     doneBtnText: '完成', // 结束按钮的文字

+ 8 - 4
src/views/layout/index.vue

@@ -60,7 +60,7 @@ export default {
     $route() {
       this.button = this.$route.meta.button || []
       this.showProjectName = this.$route.meta.showProjectName
-      this.openGuide(this.$route.meta.sign)
+      this.guide()
     },
     showProjectName(val){
       this.projectName = this.$s.getSession('projectName')
@@ -76,7 +76,7 @@ export default {
     this.$store.commit('SET_PREFIX', '/')
     
     this.getRouter()
-    await this.getPermissions() 
+    // await this.getPermissions() 
     if (this.id) {
       this.$store.commit('SET_PROJECT_ID', parseInt(this.id))
     }
@@ -85,10 +85,14 @@ export default {
       await this.$store.dispatch('getCustomField', this.projectId)
       await this.$store.dispatch('getSystemField', this.projectId)
     }
-    this.openGuide(this.$route.meta.sign)
+    this.guide()
   },
   methods: {
-    
+    guide(){
+      if(this.$route.meta.sign == 'home'){
+        this.openGuide(this.$route.meta.sign)
+      }
+    },
     //获取专利数据库权限
     async getPermissions() {
       const response = await this.$api.getPermissions()

+ 1 - 1
src/views/patentMining/components/view/card.vue

@@ -33,7 +33,7 @@
                   </myTooltip>
                 </el-form-item>
                 <el-form-item label="相关事件:">
-                  <myTooltip :content="item.eventNames" >
+                  <myTooltip :content="$commonJS.getColumnData(item, {type:'Array',value:'eventNames'})" >
                     <div v-html="$commonJS.getColumnData(item, {type:'Array',value:'eventNames'})" class="noWrap"></div>
                   </myTooltip>
                 </el-form-item>

+ 4 - 2
src/views/patentMining/components/viewIndex.vue

@@ -65,7 +65,8 @@ export default {
   props: {
     isOperate: '',
     matterId:{},
-    scenarioId:{}
+    scenarioId:{},
+    eventName:''
   },
   data() {
     return {
@@ -109,7 +110,8 @@ export default {
       searchOption: {
         scenarioNames:this.scenarioId,
         matterNames:this.matterId,
-        name:localStorage.searchContent
+        name:localStorage.searchContent,
+        eventNames:this.eventName
       },
       // table栏位信息
       columnList: [],

+ 96 - 10
src/views/project/components/TotalChart.vue

@@ -1,20 +1,49 @@
 <template>
   <div class="project-total-chart" v-if="show">
-    <div id="total-scenario" class="chart-content" :style="{ width }"></div>
-    <div id="total-type" class="chart-content" :style="{ width }"></div>
-    <div id="total-client" class="chart-content" :style="{ width }"></div>
-    <div id="total-create" class="chart-content" :style="{ width }"></div>
+    <div id="total-scenarioNames" class="chart-content" :style="{ width }"></div>
+    <div id="total-matterNames" class="chart-content" :style="{ width }"></div>
+    <div id="total-entrustNameTrue" class="chart-content" :style="{ width }"></div>
+    <div id="total-createTimeMonth" class="chart-content" :style="{ width }"></div>
   </div>
 </template>
 
 <script>
 export default {
+  props:{
+    searchOption:{
+      type:Object,
+      default:()=>{
+        return {}
+      }
+    },
+    scenario:[],
+    matter:[]
+  },
   data() {
     return {
       chartData: {},
       show: false,
       fullWidth: document.documentElement.clientWidth,
       width: 0,
+      chart:{},
+      types:[
+          {
+            label:'应用场景',
+            value:'scenarioNames'
+          },
+          {
+            label:'调查类型',
+            value:'matterNames'
+          },
+          {
+            label:'委托方',
+            value:'entrustNameTrue'
+          },
+          {
+            label:'创建月份',
+            value:'createTimeMonth'
+          },
+        ]
     };
   },
   created() {
@@ -22,30 +51,87 @@ export default {
   },
   watch: {
     fullWidth() {
-      this.refresh();
+      this.resizeChart();
     },
   },
-  mounted() {},
+  mounted() {
+    this.refresh()
+  },
   methods: {
     handleResize(event) {
       this.fullWidth = document.documentElement.clientWidth;
     },
+    resizeChart(){
+      this.types.forEach(item => {
+        this.chart[item.value].resize()
+      });
+    },
     refresh() {
       this.show = true;
       this.width = this.fullWidth / 4 - 10 + "px";
       this.$nextTick(() => {
-        this.initChart1(this.chartData.scenario, "scenario", "应用场景");
-        this.initChart1(this.chartData.type, "type", "调查类型");
-        this.initChart1(this.chartData.client, "client", "委托方");
-        this.initChart1(this.chartData.create, "create", "创建月份");
+        this.types.forEach(item => {
+          if(item.value == 'scenarioNames'){
+            item.option = this.scenario
+          }
+          if(item.value == 'matterNames'){
+            item.option = this.matter
+          }
+          this.getData(item)
+        });
+        // this.initChart1(this.chartData.scenario, "scenario", "应用场景");
+        // this.initChart1(this.chartData.type, "type", "调查类型");
+        // this.initChart1(this.chartData.client, "client", "委托方");
+        // this.initChart1(this.chartData.create, "create", "创建月份");
       });
     },
+    async getData(item){
+      var params = {
+        searchQuery:this.$commonJS.objectToString(this.searchOption),
+        orderDTOList: [
+          {
+            "orderBy": "createTime",
+            "orderType": 1
+          } 
+        ],//排序
+        groupBy: item.value,//分组的值
+      }
+      var data = []
+      await this.$api.groupPatentProject(params).then(response => {
+        if(response.code == 200){
+          data = response.data.data.values
+        }
+        
+      }).catch(error => {
+        data = []
+      })
+      var chartData = {}
+      if(item.option){
+        item.option.forEach((item,index) => {
+          var obj = data.find(i=>{
+            return i.value == item.id
+          })
+          if(obj){
+            chartData[item.name] = obj.count
+          }else{
+            chartData[item.name] = 0
+          }
+        });
+      }else{
+        for(var i = 0;i<data.length;i++){
+          chartData[data[i].name] = data[i].count
+        }
+      }
+      console.log(chartData)
+      this.initChart1(chartData, item.value, item.label);
+    },
     initData(data) {
       this.chartData = data;
       this.refresh();
     },
     initChart(id) {
       const chartDom = document.getElementById(`total-${id}`);
+      this.chart[id] = this.$echarts.init(chartDom)
       return this.$echarts.init(chartDom);
     },
     initChart1(data, key, name) {

+ 4 - 2
src/views/project/components/view/table.vue

@@ -11,8 +11,10 @@
 
         <el-table-column v-for="item in column.filter(item=>!item.ifHidden)" :render-header=" $commonJS.renderHeaderMethods" :key="item.value" :prop="item.value" :label="item.name" sortable="custom" align="center">
           <template slot-scope="scope">
-            <div v-if="['name','reportProjectNum'].includes(item.value)">
-              <el-link @click="handleClick(scope.row, item.value)" v-html="$commonJS.getColumnData(scope.row, item)"></el-link>
+            <div v-if="['name'].includes(item.value)">
+              <el-link @click="handleClick(scope.row, item.value)">
+                <span  v-html="$commonJS.getColumnData(scope.row, item)"></span>
+              </el-link>
             </div>
             <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
           </template>

+ 22 - 33
src/views/project/index.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="workspace height_100">
-    <div shadow="never" class="workspace-card nopadding height_100">
-      <div class="query-top" v-if="[2].indexOf(isOperate) == -1">
+      <!-- <div class="query-top" v-if="[2].indexOf(isOperate) == -1">
         <el-collapse>
           <el-collapse-item title="图表预览" name="1">
             <div class="chart-box">
@@ -9,7 +8,7 @@
             </div>
           </el-collapse-item>
         </el-collapse>
-      </div>
+      </div> -->
       <div class="height_100">
         <el-container v-if="showView">
           <el-header>
@@ -27,6 +26,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 === '0' ? 'primary' : ''" @click="onChange2('0')"
                   size="small">列表</el-button>
                 <el-button :type="queryShowType === '1' ? 'primary' : ''" @click="onChange2('1')"
@@ -43,20 +44,14 @@
               </el-dropdown>
             </div>
           </el-header>
-          <el-main class="workspace-main">
-            <div v-loading="loading">
+          <el-main class="workspace-main height_100">
+            <div v-loading="loading" class="height_100">
               <component v-if="showView" :is="viewType" v-bind="$attrs" v-on="$listeners" :isOperate="isOperate"
-                :tableData="dataList" :groupBy="group" :groupingOption="groupingOption" :searchOption="searchOption"
+                :tableData="dataList" :groupBy="group" :groupingOption="groupingOption" :searchOption="searchOption" :scenario="commonData" :matter="matter"
                 :queryParams="queryParams" :column="fieldList" @option="handleOption" @on-sort="handleSort" :handleMessage="handleMessage"></component>
             </div>
-            <div class="pagination" v-if="[2].indexOf(isOperate) == -1">
-              <el-pagination background layout="total, prev, pager, next, jumper"
-                :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
-                @current-change="handleCurrentChange" :total="total">
-              </el-pagination>
-            </div>
           </el-main>
-          <el-footer class="pagination" v-if="[2].indexOf(isOperate) != -1">
+          <el-footer class="pagination" v-if="[2].indexOf(isOperate) == -1 && this.queryShowType != '2'">
             <el-pagination backgroundx layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
               :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
             </el-pagination>
@@ -64,7 +59,6 @@
         </el-container>
       </div>
 
-    </div>
     <project-form-drawer @submit="getMessage" :common-data="commonData" ref="projectFormDrawer" />
     <field ref="field" type="patentProject" @getFieldList="getFieldList"></field>
 
@@ -98,7 +92,8 @@ export default {
   props: {
     isOperate: '',
     matterId:{},
-    scenarioId:{}
+    scenarioId:{},
+    eventName:''
   },
   data() {
     return {
@@ -108,7 +103,8 @@ export default {
       searchOption: {
         scenarioNames:this.scenarioId,
         matterNames:this.matterId,
-        name:localStorage.searchContent
+        name:localStorage.searchContent,
+        eventNames:this.eventName
       },
       //专利数据库数据总数
       total: 0,
@@ -179,11 +175,6 @@ export default {
     this.fieldList = await this.$commonJS.getCustomField('patentProject')
     //获取检索字段和分组字段
     await this.getColumn()
-    //获取应用场景统计
-    // if ([2].indexOf(this.isOperate) == -1) {
-    //   this.getScenarioAndTypeTotal();
-    // }
-
     //获取专利数据库列表
     this.getList()
     this.showViews()
@@ -240,13 +231,7 @@ export default {
       })
       this.showViews()
     },
-    //获取应用场景统计
-    getScenarioAndTypeTotal() {
-      this.$api.getScenarioAndTypeTotal().then((response) => {
-        this.queryTotal = response.data;
-        this.$refs.totalChart.initData(response.data);
-      });
-    },
+
     //检索
     search(val) {
       let params = {}
@@ -347,13 +332,17 @@ export default {
     },
     //切换table、卡片视图
     onChange2(type) {
-      this.group = ''
-      if (type == '0') {//type为0时是table页面
-        this.viewType = 'Table'
-      } else {//type为1时是卡片页面
-        this.viewType = 'Card'
+      var viewTypes = {
+        '0':'Table',
+        '1':'Card',
+        '2':'TotalChart'
       }
+      this.group = ''
       this.queryShowType = type
+      this.viewType = viewTypes[type]
+      if(type == 2){
+        return false
+      }
       this.queryParams.current = 1
       this.getList()
       // this.onChange()

+ 7 - 7
src/views/report/components/index.vue

@@ -74,7 +74,8 @@ export default {
   props: {
     isOperate: '',
     matterId:{},
-    scenarioId:{}
+    scenarioId:{},
+    eventName:''
   },
   data() {
     return {
@@ -101,8 +102,10 @@ export default {
       //检索条件
       searchOption: {
         name: localStorage.searchContent,
+        reportType:localStorage.reportType? [localStorage.reportType]:'',
         scenarioNames:this.scenarioId,
-        matterNames:this.matterId
+        matterNames:this.matterId,
+        eventNames:this.eventName
       },
       //分组的值
       groupingValue: '',
@@ -288,10 +291,7 @@ export default {
           }
         }
       })
-      this.showView = false
-      this.$nextTick(() => {
-        this.showView = true
-      })
+      this.showViews()
     },
     // 处理检索字段为array类型的问题
     handleSearchArray(obj) {
@@ -427,7 +427,7 @@ export default {
     reportVisual() {
       this.$api.reportVisual(this.queryParams).then(response => {
         if (response.code == 200) {
-          this.$refs.reportVisual.open(response.data)
+          // this.$refs.reportVisual.open(response.data)
         }
       })
     },

+ 4 - 2
src/views/report/components/view/table.vue

@@ -11,10 +11,12 @@
           </template>
         </el-table-column>
 
-        <el-table-column v-for="item in column" :key="item.value" :prop="item.value" :render-header=" $commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
+        <el-table-column v-for="item in column.filter(item=>!item.ifHidden)" :key="item.value" :prop="item.value" :render-header=" $commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
           <template slot-scope="scope">
             <div v-if="['name'].includes(item.value)">
-              <el-link @click="handleItem(scope.row,item.value)" v-html="$commonJS.getColumnData(scope.row,item)"></el-link>
+              <el-link @click="handleItem(scope.row,item.value)">
+                <span  v-html="$commonJS.getColumnData(scope.row,item)"></span>
+              </el-link>
             </div>
             <div v-else-if="['eventNames','cronNames'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row,item)"></div>
             <div v-else v-html="$commonJS.getColumnData(scope.row,item)"></div>

+ 167 - 0
src/views/report/components/view/visual.vue

@@ -0,0 +1,167 @@
+<template>
+    <div class="chart" v-if="show" :style="{height: height }">
+      <div v-for="(item,index) in domList.filter(item=>{return item.typeValue!=6})" :key="item.reportType">
+        <div v-if="index%2==0" style="display:flex">
+          <div class="items" :id="domList[index].reportType"></div>
+          <div class="items" v-if="domList[index+1]" :id="domList[index+1].reportType"></div>
+        </div>
+        
+      </div>
+    </div>
+</template>
+<script>
+  
+  export default {
+    props: ["data"],
+    data() {
+      return {
+        show: false,
+        chartData: [],
+        domList:[
+          {
+            reportType:'FTO调查',
+          },
+          {
+            reportType:'无效分析',
+          },
+          {
+            reportType:'侵权分析',
+          },
+          {
+            reportType:'第三方意见',
+          },
+          {
+            reportType:'稳定性分析',
+          },
+          {
+            reportType:'回避设计',
+          },
+          {
+            reportType:'无效应对报告',
+          },
+        ],
+        fullWidth: document.documentElement.clientWidth,
+        height:document.documentElement.clientHeight,
+        width: 0,
+        reportAsDicItem:{
+          "0":"INVALID_ASSESS",
+          "1":"THIRD_ASSESS",
+          "2":"STABILITY_ASSESS",
+          "3":"FTO_ASSESS",
+          "4":"TORT_ASSESS",
+          "5":"AVOID_ASSESS",
+        },
+      };
+    },
+    watch: {
+      fullWidth() {
+        this.show = false
+        this.$nextTick(()=>{
+          this.refresh();
+        })
+        
+      },
+    },
+    created(){
+      window.addEventListener('resize', this.handleResize)
+    },
+    mounted() {},
+    methods: {
+      handleResize(event) {
+        this.fullWidth = document.documentElement.clientWidth
+      },
+      refresh() {
+        this.show = true;
+        this.width = (this.fullWidth / 2) -220 + 'px'
+        this.height = document.documentElement.clientHeight - 240 +'px'
+        this.$nextTick(() => {
+          this.chartData.forEach((item) => {
+            if(item.typeValue != 6){
+              this.initChart1(item, item.reportType, item.reportType+'('+ item.reportNum +')');
+            }
+            
+          });
+        });
+      },
+      open(data) {
+        this.chartData = data;
+        this.refresh()
+      },
+      initChart(id) {
+        const chartDom = document.getElementById(id);
+        return this.$echarts.init(chartDom);
+      },
+      initChart1(data, key, name) {
+          this.initChart(key).on('click',(params)=>{
+              // console.log(params)
+              this.$emit('params',params.data)
+          })
+        this.initChart(key).setOption(
+           {
+                tooltip: {
+                  trigger: "item",
+                },
+                legend: {
+                     
+                      left: 'center',
+                      top:'0'
+                  },
+                title: {
+                  text: name,
+                  bottom: 'center',
+                  left: "center",
+                  textStyle: {
+                    fontSize: 16,
+                    fontWeight: 999,
+                    fontFamily: "黑体",
+                  },
+                },
+                series: [
+                  {
+                    name: "",
+                    label: {
+                      show: true,
+                      // position: "center",
+                      formatter:function(data){
+                        return `${data.name} ${data.value}(${data.percent.toFixed(1)}%)`
+                      }
+                    },
+                    labelLine: {
+                      show: true,
+                    },
+                    type: "pie",
+                    radius: ["40%", "70%"],
+                    data: data.conclusions.map(item=>{
+                      return {value:item.num,name:item.name,type:data.typeValue,conclusionType:item.value}
+                    })
+                  },
+                ],
+                emphasis: {
+                      itemStyle: {
+                      shadowBlur: 10,
+                      shadowOffsetX: 0,
+                      shadowColor: 'rgba(0, 0, 0, 0.5)'
+                      }
+                  }
+              }
+        );
+      },
+    },
+  };
+  </script>
+  <style lang="scss" scoped>
+  .items{
+      height: 320px;
+      width:calc(50% - 60px);
+      background: white;
+      margin:15px;
+      padding:10px;
+  }
+  .chart{
+      background:#f4f4f4;
+      // display: flex;
+      // justify-content: space-between;
+      // flex-wrap: wrap ;
+      overflow: auto;
+  }
+  </style>

+ 1 - 1
src/views/visual/components/drawer/titleDrawer.vue

@@ -5,7 +5,7 @@
               <el-tabs v-model="components">
                   <el-tab-pane v-for="item in menu" :key="item.components"  :label="item.name" :name="item.components"></el-tab-pane>
               </el-tabs>
-              <component :is='components' style="height:calc(100% - 50px);" :isOperate='2' :scenarioId="[params.scenarioId]" :matterId="[params.matterId]"></component>
+              <component :is='components' style="height:calc(100% - 50px);" :isOperate='2' :scenarioId="[params.scenarioId]" :matterId="[params.matterId]" :eventName="params.eventName"></component>
           </div>
           
       </el-drawer>

+ 22 - 4
src/views/visual/components/sceneSVG.vue

@@ -14,14 +14,28 @@ export default {
     svgVisual,
     eventDrawer
   },
-  props: {},
+  props: {
+    searchOption:{
+      type:Object,
+      default:()=>{
+        return {}
+      }
+    }
+  },
   data() {
     return {
         //应用场景对应事件总数量
         total: {},
     };
   },
-  watch: {},
+  watch: {
+    searchOption:{
+      handler(newValue, oldValue) {//这里的第一个参数是改变后的值,第二个参数是原来的值
+        this.getScenarioTotal()
+      },
+      immediate: true
+    }
+  },
   computed: {
     scenario(){
       return this.$store.state.dictMessage.scenario
@@ -65,7 +79,7 @@ export default {
       var params = {
           "current": 1,
           "size": 10,
-          "searchQuery": "",
+          "searchQuery": this.$commonJS.objectToString(this.searchOption),
           "orderDTOList": [
             {
               "orderBy": "createTime",
@@ -87,8 +101,12 @@ export default {
       const { title, type } = data
       switch (type) {
         case 0:
+          if(Object.keys(this.searchOption).length>0){
+            this.$emit('toFlowPath',title)
+            break;
+          }
           this.$router.push({
-            path: `/visual/${encodeURIComponent(title)}`
+            path: `/visual/${encodeURIComponent(title)}`,
           })
           break
         case 1:

+ 40 - 10
src/views/visual/title/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="visual-title">
       <el-button type="primary" class="visual-title-back" icon="el-icon-back" @click="handleBack" v-if="!sign">返回</el-button>
-       <myCustomSvg  class="myCustomSvg" :title="title" :total="total" :QuestionTotal="QuestionTotal" @on-click="handleClick"></myCustomSvg>
+       <myCustomSvg  class="myCustomSvg" :title="title" :total="total" :QuestionTotal="QuestionTotal" :eventName="eventName" @on-click="handleClick"></myCustomSvg>
       <!-- <tips class="c-tips" /> -->
       <titleDrawer ref="titleDrawer" @close="close" />
       <eventDrawer ref="eventDrawer" @close="closeDrawer"></eventDrawer>
@@ -23,7 +23,13 @@
       scenarioName:'',
       eventId:'',
       eventName:'',
-      sign:{}
+      sign:{},
+      searchOption:{
+        type:Object,
+        default:()=>{
+          return {}
+        }
+      }
     },
     data() {
       return {
@@ -52,8 +58,23 @@
     computed:{
       scenario(){
         return this.$store.state.dictMessage.scenario || []
+      },
+    },
+    watch:{
+      searchOption:{
+        async handler(val){
+          var params = {
+            scenarioNames:[this.scenarioId],
+            eventNames:this.eventName,
+            ...this.searchOption
+          }
+          this.queryParams.searchQuery = this.$commonJS.objectToString(params)
+          //获取事件数量
+          await this.getEventNumber()
+          //获取应用场景对应项目数量
+          await this.init()
+        }
       }
-      
     },
     async mounted() {
       if(this.scenario.length>0){
@@ -62,7 +83,12 @@
         })
         if(scenario){
           this.scenarioId = scenario.id
-          this.queryParams.searchQuery = `scenarioNames=[${scenario.id}]`
+          var params = {
+            scenarioNames:[scenario.id],
+            eventNames:this.eventName,
+            ...this.searchOption
+          }
+          this.queryParams.searchQuery = this.$commonJS.objectToString(params)
         }else{
           return false
         }
@@ -75,6 +101,9 @@
     },
     methods: {
       openEventDrawer(title){
+        if(this.eventName){
+          return false
+        }
         this.$refs.eventDrawer.open(title, [this.scenarioId])
       },
       closeDrawer(){
@@ -82,26 +111,27 @@
       },
       //点击节点
       handleClick({type,isPatentMining}) {
-        var question = {
-          questionId: this.questionId,
-          questionName: this.questionName
-        }
         var matterId = this.total.find(item=>{
           return item.name == type
         }).id
         var data = {
           scenarioId:this.scenarioId,
           matterId:matterId,
-          isPatentMining:isPatentMining
+          isPatentMining:isPatentMining,
+          eventName:this.eventName
         }
         this.$refs.titleDrawer.open(data)
       },
        //获取事件数量
       async getEventNumber() {
+        var obj = {
+          ...this.searchOption,
+          scenarioNames:[this.scenarioId]
+        }
         var params = {
           "current": 1,
           "size": 10,
-          "searchQuery": `scenarioNames=[${this.scenarioId}]`,
+          "searchQuery": this.$commonJS.objectToString(obj),
           "orderDTOList": [
             {
               "orderBy": "createTime",