Browse Source

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

zhuhao 1 year ago
parent
commit
1b4efe91b3

+ 11 - 3
src/App.vue

@@ -135,6 +135,10 @@ export default {
   }
   </style>
 <style lang="less">
+.el-form-item__label{
+  background: var(--bg);
+  color: var(--color) !important;
+}
 .el-button--primary{
   background: var(--bg) !important;
   border-color: var(--bg) !important;
@@ -150,6 +154,10 @@ export default {
     overflow-y: auto;
   }
 }
+.el-table th{
+  background: var(--bg) !important;
+  color: var(--color);
+}
 .el-table tr td{
   border-bottom: 1px solid rgba(124,124,124) !important;
 }
@@ -297,9 +305,9 @@ html, body, #app {
 .el-header .left-panel {display: flex;align-items: center;}
 .el-header .right-panel {display: flex;align-items: center;}
 .el-header .right-panel > * + * {margin-left:10px;}
-.el-footer {background: #fff;border-top: 1px solid #e6e6e6;padding:13px 15px !important;}
-.el-main {padding:15px;}
-.el-main.nopadding {padding:0;background: #fff;}
+.el-footer {background: #fff;border-top: 1px solid #e6e6e6;padding:5px 15px !important;}
+.el-main {padding:15px !important;}
+.el-main.nopadding {padding:0 !important;background: #fff;}
 // .el-main {flex-basis: 0}
 .el-container {height: 100%;}
 </style>

+ 3 - 2
src/assets/css/layout.less

@@ -9,8 +9,9 @@
   }
 }
 .pagination {
-  text-align: center;
-  margin: 20px 0;
+  text-align: right;
+  // margin: 20px 0;
+  height: 40px !important;
 }
 .vue-treeselect__control {
   padding-left: 10px !important;

+ 16 - 15
src/router/index.js

@@ -218,19 +218,20 @@ const routes = [
         ],
       },
       //报告
-      // {
-      //   path: '/AllReport',
-      //   name:'AllReport',
-      //   component:{render(c){return c('router-view')}},
-      //   redirect:'/AllReport',
-      //   children:[
-      //     {
-      //       path:'/',
-      //       meta: {
-      //         title: '报告',
-      //       },
-      //       component: () => import('@/views/report/index.vue'),
-      //     },
+      {
+        path: '/AllReport',
+        name:'AllReport',
+        component:{render(c){return c('router-view')}},
+        redirect:'/AllReport',
+        children:[
+          {
+            path:'/',
+            meta: {
+              title: '报告',
+              sign:'report'
+            },
+            component: () => import('@/views/report/index.vue'),
+          },
       //     //无效分析、第三方意见、稳定性分析
       //     {
       //       path: '/InvalidIndex',
@@ -396,8 +397,8 @@ const routes = [
       //       component: () => import('@/views/report/task/index.vue'),
       //     },
       //     // },
-      //   ],
-      // },
+        ],
+      },
       //场景可视化
       {
         path: '/visual',

+ 3 - 1
src/utils/model/index.js

@@ -11,6 +11,7 @@ import myFormSearch from './search/searchIndex.vue';
 import myTimeChoose from './time/timeIndex.vue';
 
 import myContextMenu from './contextMenu/index.vue';
+import mySelectTree from './selectTree/index'
 
 
 var models = {
@@ -25,7 +26,8 @@ var models = {
   myFormSearch,
   myTimeChoose,
 
-  myContextMenu
+  myContextMenu,
+  mySelectTree
 }
 export default {
   install(Vue) {

+ 10 - 7
src/utils/model/selectButton/index.vue

@@ -1,11 +1,14 @@
 <template>
   <div class="selectButton">
-    <div class="selectButton-div" style="padding: 20px;">
-      <el-select v-model="selectValue" :placeholder="placeholder" :size="size"
-        :clearable="clearable" :disabled="disabled" :multiple="multiple" :filterable="filterable" @change="change">
-        <el-option v-for="(item,index) in optionArr" :key="'myButton'+ index" :label="item[prop.label]" :value="item[prop.value]">
-        </el-option>
-      </el-select>
+    <div class="selectButton-div">
+      <slot name="select">
+        <el-select v-model="selectValue" :placeholder="placeholder" :size="size"
+          :clearable="clearable" :disabled="disabled" :multiple="multiple" :filterable="filterable" @change="change">
+          <el-option v-for="(item,index) in optionArr" :key="'myButton'+ index" :label="item[prop.label]" :value="item[prop.value]">
+          </el-option>
+        </el-select>
+      </slot>
+      
       <el-button  @click="handleClick" :disabled="disabled" :size="size" class="selectButton-button">
         <slot name="button">
          <i class="el-icon-search"></i> 
@@ -130,7 +133,7 @@ export default {
 <style lang="scss" scoped>
 .selectButton {
   .selectButton-div {
-    width: calc(100% - 40px);
+    width: calc(100%);
     display: flex;
     align-items: center;
   }

+ 148 - 0
src/utils/model/selectTree/index.vue

@@ -0,0 +1,148 @@
+<template>
+    <el-select ref="treeSelect" :value="valueTitle" :clearable="clearable" @clear="clearHandle" placeholder="请选择">
+      <el-option :value="valueTitle" :label="valueTitle">
+        <el-tree  id="tree-option"
+          ref="selectTree"
+          :accordion="accordion"
+          :data="options"
+          :props="props"
+          :node-key="props.value"    
+          :default-expanded-keys="defaultExpandedKey"
+          @node-click="handleNodeClick">
+        </el-tree>
+      </el-option>
+    </el-select>
+</template>
+<script>
+export default {
+  name: "el-tree-select",
+  props:{
+    /* 配置项 */
+    props:{
+      type: Object,
+      default:()=>{
+        return {
+          value:'id',             // ID字段名
+          label: 'name',         // 显示名称
+          children: 'children'    // 子级字段名
+        }
+      }
+    },
+    /* 选项列表数据(树形结构的对象数组) */
+    options:{
+      type: Array,       
+      default: ()=>{ return [] }
+    },
+    /* 初始值 */
+    value:{
+      // type: Number,
+      default: ()=>{ return null }
+    },
+    /* 可清空选项 */
+    clearable:{
+      type:Boolean,
+      default:()=>{ return true }
+    },
+    /* 自动收起 */
+    accordion:{
+      type:Boolean,
+      default:()=>{ return false }
+    },
+  },
+ 
+  data() {
+    return {
+      valueId:this.value,    // 初始值
+      valueTitle:'',
+      defaultExpandedKey:[]    
+    }
+  },
+  mounted(){
+    if(this.options.length>0){
+      this.initHandle()
+    }
+    
+  },
+  methods: {
+    // 初始化值
+    initHandle(){
+      this.$nextTick(()=>{
+        if(this.valueId){
+          this.valueTitle = this.$refs.selectTree.getNode(this.valueId).data[this.props.label]     // 初始化显示
+          this.$refs.selectTree.setCurrentKey(this.valueId)       // 设置默认选中
+          this.defaultExpandedKey = [this.valueId]      // 设置默认展开
+        }else{
+          this.valueTitle=''
+        } 
+        this.$nextTick(()=>{
+          let scrollWrap = document.querySelectorAll('.el-scrollbar .el-select-dropdown__wrap')[0]
+          let scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar')
+          scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;'
+          scrollBar.forEach(ele => ele.style.width = 0)
+        })
+      })
+      
+ 
+    },
+    // 切换选项
+    handleNodeClick(node){
+      this.valueTitle = node[this.props.label]
+      this.valueId = node[this.props.value]
+      this.$emit('getValue',this.valueId)
+      this.$refs.treeSelect.visible = false
+      this.defaultExpandedKey = []
+    },
+    // 清除选中
+    clearHandle(){
+      this.valueTitle = ''
+      this.valueId = null
+      this.defaultExpandedKey = []
+      this.clearSelected()
+      this.$emit('getValue',null)
+    },
+    /* 清空选中样式 */
+    clearSelected(){
+      let allNode = document.querySelectorAll('#tree-option .el-tree-node')
+      allNode.forEach((element)=>element.classList.remove('is-current'))
+    }
+  },
+  watch: {
+    value(){
+      this.valueId = this.value
+      this.initHandle()
+    },
+    options(val){
+      if(val.length>0){
+        this.initHandle()
+      }
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+  .el-scrollbar .el-scrollbar__view .el-select-dropdown__item{
+    height: auto;
+    max-height: 274px;
+    padding: 0;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+  .el-select-dropdown__item.selected{
+    font-weight: normal;
+  }
+  ul li >>>.el-tree .el-tree-node__content{
+    height:auto;
+    padding: 10px 20px;
+  }
+  .el-tree-node__label{
+    font-weight: normal;
+  }
+  .el-tree >>>.is-current .el-tree-node__label{
+    color: #409EFF;
+    font-weight: 700;
+  }
+  .el-tree >>>.is-current .el-tree-node__children .el-tree-node__label{
+    color:#606266;
+    font-weight: normal;
+  }
+</style>

+ 35 - 16
src/views/client/index.vue

@@ -5,7 +5,7 @@
         <div>
           <mySearch style="width: 500px" :SearchFields="searchFiled"  @search="search" :searchValue="searchOption"></mySearch>
         </div>
-        <div>
+        <div v-if="!choseClient">
             <el-button type="primary" size="small" @click="handleAdd()"> 新增 </el-button>
         </div>
       </el-header>
@@ -14,22 +14,36 @@
            <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
             <el-table-column type="index" label="#" width="55" align="center">
                 <template slot-scope="scope">
-                <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+                  <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
                 </template>
             </el-table-column>
-            <el-table-column prop="name" label="客户名称" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="personnelName" label="客户对接人" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column label="操作" align="center" width="150">
-                <template slot-scope="scope">
-                <el-dropdown split-button type="primary" size="small" @click="handleEdit(scope.row)">
-                <p>编辑</p> 
-                    <el-dropdown-menu slot="dropdown" class="text-align_center">
-                    <el-dropdown-item class="color-red" @click.native="handleDelete(scope.row)" divided>删除</el-dropdown-item>
-                    </el-dropdown-menu>
-                </el-dropdown>
-                </template>
+            <el-table-column prop="name" label="客户名称" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <div>
+                  <div v-if="!choseClient">{{ scope.row.name }}</div>
+                  <div v-else>
+                    <el-link type="primary" @click.native="getClient(scope.row)">{{ scope.row.name }}</el-link>
+                  </div>
+                  
+                </div>
+              </template>
             </el-table-column>
+            <template v-if="!choseClient">
+              <div>
+                <el-table-column prop="personnelName" label="客户对接人" align="center" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
+                <el-table-column label="操作" align="center" width="150">
+                    <template slot-scope="scope">
+                    <el-dropdown split-button type="primary" size="small" @click="handleEdit(scope.row)">
+                    <p>编辑</p> 
+                        <el-dropdown-menu slot="dropdown" class="text-align_center">
+                        <el-dropdown-item class="color-red" @click.native="handleDelete(scope.row)" divided>删除</el-dropdown-item>
+                        </el-dropdown-menu>
+                    </el-dropdown>
+                    </template>
+                </el-table-column>
+              </div>
+            </template>
         </el-table> 
         </div>
         
@@ -81,7 +95,8 @@
 export default {
   components: {},
   props: {
-    name:''
+    name:'',
+    choseClient:false
   },
   data() {
     return {
@@ -259,7 +274,11 @@ export default {
                 this.loading = false
                 })
             })
-        }
+        },
+        //选择客户
+        getClient(row){
+          this.$emit('getClient',row)
+        },
   }
 };
 </script>

+ 228 - 220
src/views/event/components/dialog/addEvent.vue

@@ -1,127 +1,145 @@
 <template>
   <div class="addEvent">
-    <el-dialog :title="title" :visible.sync="dialogVisible" :width="width" :before-close="handleClose">
-      <!-- 单个新增(事件) -->
-      <div v-if="type == 1">
-        <el-form :model="formData[0]" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
-          <el-form-item label="事件名称" prop="questionName">
-            <!--  -->
-            <el-autocomplete class="inline-input" v-model="formData[0].questionName"
-              :fetch-suggestions="querySearchQuestion"
-              :placeholder="formData[0].placeholder ? formData[0].placeholder : '请输入或选择事件'" :trigger-on-focus="false"
-              @select="handleSelectQuestion" @change="change1($event, { $index: 0 })" @focus="focus($event, { $index: 0 })"
-              @input="input1($event, {
-                $index: 0,
-                row: formData[0]
-              })" style="width: 100%;">
-            </el-autocomplete>
-          </el-form-item>
-          <el-form-item label="事件日期" prop="eventDate">
-            <el-date-picker style="width: 100%" v-model="formData[0].eventDate"
-              :disabled="(formData[0].id && !this.row) ? true : false" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
-              placeholder="选择事件日期时间">
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="事件描述" prop="description">
-            <el-input type="textarea" :rows="1" v-model="formData[0].description" autocomplete="off" placeholder="请输入事件描述"
-              :disabled="(formData[0].id && !this.row) ? true : false"></el-input>
-          </el-form-item>
-          <el-form-item label="事件场景" prop="assistPerson">
-            <el-select v-model="formData[0].applicationScenarios[0]" :disabled="(formData[0].id && !this.row) ? true : false"
-              style="width: 100%;" placeholder="请选择事件场景">
-              <el-option
-                v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO ? commonData.ENTERPRISE_APPLICATION_SCENARIO : []"
-                :key="parseInt(item.value)" :label="item.label" :value="parseInt(item.value)">
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-      <!-- 批量新增(事件) -->
-      <div v-else-if="type == 2">
-        <el-table :data="formData" style="width: 100%" class="twj-table">
-          <el-table-column prop="questionName" label="事件名称" align="center">
-            <template slot="header">
-              <div>
-                <el-tooltip class="item" effect="dark" content="事件:商业目标/解决问题/对应项目" placement="top">
-                  <span>事件名称<span style="color:red;"> *</span></span>
-                </el-tooltip>
-              </div>
-            </template>
-            <template slot-scope="scope">
-              <div>
-                <el-autocomplete class="inline-input" v-model="scope.row.questionName"
-                  :fetch-suggestions="querySearchQuestion" placeholder="请输入或选择事件" :trigger-on-focus="false"
-                  @select="handleSelectQuestion" @focus="focus($event, scope)" style="width: 100%;">
-                </el-autocomplete>
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="eventDate" label="事件时间" align="center">
-            <template slot-scope="scope">
-              <div>
-                <el-date-picker style="width: 100%" v-model="scope.row.eventDate" :disabled="scope.row.id ? true : false"
-                  type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择事件日期时间">
-                </el-date-picker>
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="description" label="事件描述" align="center" width="250px">
-            <template slot-scope="scope">
-              <div>
-                <el-input type="textarea" :rows="1" v-model="scope.row.description" autocomplete="off"
-                  placeholder="请输入事件描述" :disabled="scope.row.id ? true : false"></el-input>
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column prop="applicationScenarios" label="事件场景" align="center">
-            <template slot-scope="scope">
-              <div>
-                <el-select v-model="scope.row.applicationScenarios[0]" :disabled="scope.row.id ? true : false"
-                  style="width: 100%;" placeholder="请选择事件场景">
-                  <el-option
-                    v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO ? commonData.ENTERPRISE_APPLICATION_SCENARIO : []"
-                    :key="parseInt(item.value)" :label="item.label" :value="parseInt(item.value)">
-                  </el-option>
-                </el-select>
-              </div>
-            </template>
-          </el-table-column>
-          <el-table-column label="事件操作" align="" width="100px">
-            <template slot-scope="scope">
-              <div>
-                <el-tooltip class="item" effect="dark" content="增加事件" placement="top">
-                  <i @click="addRow(scope)" class="el-icon-plus btn"></i>
-                </el-tooltip>
-                <el-tooltip class="item" effect="dark" content="删除事件" placement="top">
-                  <i @click="deleteRow(scope)" v-if="scope.$index != 0" class="el-icon-close btn"></i>
-                </el-tooltip>
-              </div>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm1()" size="small" style="width:100px">确定</el-button>
-        <el-button size="small" @click="resetForm()" style="width:100px">重置</el-button>
-        <el-button size="small" @click="handleClose()" style="width:100px">取消</el-button>
-      </div>
-    </el-dialog>
-
+      <el-dialog
+          :title="title"
+          :visible.sync="dialogVisible"
+          :width="width"
+          :before-close="handleClose">
+           <!-- 单个新增(事件) -->
+          <div v-if="type == 1">
+              <el-form
+                  :model="formData[0]"
+                  :rules="rules"
+                  ref="ruleForm"
+                  label-width="100px"
+                  class="demo-ruleForm"
+              >
+                  <el-form-item label="事件名称" prop="questionName">
+                      <el-autocomplete
+                          class="inline-input"
+                          v-model="formData[0].questionName"
+                          :fetch-suggestions="querySearchQuestion"
+                          :placeholder="formData[0].placeholder?formData[0].placeholder:'请输入或选择事件'"
+                          :trigger-on-focus="false"
+                          @select="handleSelectQuestion"
+                          @change="change1($event,{$index:0})"
+                          @focus="focus($event,{$index:0})"
+                          @input="input1($event,{$index:0,
+                                          row:formData[0]})"
+                          style="width: 100%;" >
+                      </el-autocomplete>
+                  </el-form-item>
+                  <el-form-item label="事件日期" prop="eventDate">
+                      <el-date-picker style="width: 100%" v-model="formData[0].eventDate" :disabled="(formData[0].id && !this.row)?true:false" type="datetime"
+                          value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择事件日期时间">
+                      </el-date-picker>
+                  </el-form-item>
+                  <el-form-item label="事件描述" prop="description">
+                      <el-input type="textarea" :rows="1" v-model="formData[0].description" autocomplete="off"
+                          placeholder="请输入事件描述" :disabled="(formData[0].id && !this.row)?true:false"></el-input>
+                  </el-form-item>
+                  <el-form-item label="事件场景" prop="assistPerson">
+                      <el-select v-model="formData[0].applicationScenarios[0]" :disabled="(formData[0].id && !this.row)?true:false"  style="width: 100%;" placeholder="请选择事件场景">
+                          <el-option
+                              v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO ? commonData.ENTERPRISE_APPLICATION_SCENARIO : []"
+                              :key="parseInt(item.value)" :label="item.label" :value="parseInt(item.value)"
+                              >
+                          </el-option>
+                      </el-select>
+                  </el-form-item>
+              </el-form>
+          </div>
+          <!-- 批量新增(事件) -->
+          <div v-else-if="type == 2">
+              <el-table :data="formData" style="width: 100%" class="twj-table">
+              <el-table-column prop="questionName" label="事件名称" align="center">
+                  <template slot="header">
+                  <div>
+                      <el-tooltip class="item" effect="dark" content="事件:商业目标/解决问题/对应项目" placement="top">
+                      <span>事件名称<span style="color:red;"> *</span></span>
+                      </el-tooltip>
+                  </div>
+                  </template>
+                  <template slot-scope="scope">
+                  <div>
+                      <el-autocomplete
+                              class="inline-input"
+                              v-model="scope.row.questionName"
+                              :fetch-suggestions="querySearchQuestion"
+                              placeholder="请输入或选择事件"
+                              :trigger-on-focus="false"
+                              @select="handleSelectQuestion"
+                              @focus="focus($event,scope)"
+                              style="width: 100%;" >
+                      </el-autocomplete>
+                  </div>
+                  </template>
+              </el-table-column>
+              <el-table-column prop="eventDate" label="事件时间" align="center">
+                  <template slot-scope="scope">
+                  <div>
+                      <el-date-picker style="width: 100%" v-model="scope.row.eventDate" :disabled="scope.row.id?true:false" type="datetime"
+                      value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择事件日期时间">
+                      </el-date-picker>
+                  </div>
+                  </template>
+              </el-table-column>
+              <el-table-column prop="description" label="事件描述" align="center" width="250px">
+                  <template slot-scope="scope">
+                  <div>
+                      <el-input type="textarea" :rows="1" v-model="scope.row.description" autocomplete="off"
+                      placeholder="请输入事件描述" :disabled="scope.row.id?true:false"></el-input>
+                  </div>
+                  </template>
+              </el-table-column>
+              <el-table-column prop="applicationScenarios" label="事件场景" align="center" >
+                  <template slot-scope="scope">
+                  <div>
+                      <el-select v-model="scope.row.applicationScenarios[0]" :disabled="scope.row.id?true:false"  style="width: 100%;" placeholder="请选择事件场景">
+                      <el-option
+                          v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO ? commonData.ENTERPRISE_APPLICATION_SCENARIO : []"
+                          :key="parseInt(item.value)" :label="item.label" :value="parseInt(item.value)"
+                          >
+                      </el-option>
+                      </el-select>
+                  </div>
+                  </template>
+              </el-table-column>
+              <el-table-column label="事件操作" align="" width="100px">
+                  <template slot-scope="scope">
+                  <div>
+                      <el-tooltip class="item" effect="dark" content="增加事件" placement="top">
+                      <i @click="addRow(scope)" class="el-icon-plus btn"></i>
+                      </el-tooltip>
+                      <el-tooltip class="item" effect="dark" content="删除事件" placement="top">
+                      <i @click="deleteRow(scope)" v-if="scope.$index != 0" class="el-icon-close btn"></i>
+                      </el-tooltip>
+                  </div>
+                  </template>
+              </el-table-column>
+              </el-table>
+          </div>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitForm1()" size="small" style="width:100px">确定</el-button>
+              <el-button size="small" @click="resetForm()" style="width:100px">重置</el-button>
+              <el-button size="small" @click="resetClose()" style="width:100px">取消</el-button>
+          </div>
+      </el-dialog>
+     
   </div>
 </template>
-  
+
 <script>
 export default {
   props: [],
   data() {
     return {
       //弹窗标题
-      title: '',
+      title:'',
       //弹窗状态
-      dialogVisible: false,
+      dialogVisible:false,
       //弹窗宽度
-      width: '800px',
+      width:'800px',
       //表格数据
       formData: [
         {
@@ -132,13 +150,11 @@ export default {
         }
       ],
       //检验规则
-      rules: {},
+      rules:{},
       //应用场景数据
       commonData: {},
       //弹窗类型
-      type: 1,
-      // 所有的事件
-      questionNameArr:[],
+      type:1,
     }
   },
   watch: {},
@@ -147,31 +163,26 @@ export default {
     await this.getCommonData()
   },
   methods: {
-    //打开弹窗,判断是编辑还是添加,同时判断是批量添加还是添加单个事件(type==1是单个,type==2是批量)
-    open(data, type) {
-      if (data) {//编辑
-        this.formData = JSON.parse(JSON.stringify(data))
-      } else {//添加
-        this.type = type
-        if (this.type == 1) {
-          this.title='新增事件'
-        } else {
-          this.title = '批量新增事件'
-        }
-        this.formData = [
-          {
-            questionName: '',
-            eventDate: '',
-            description: '',
-            applicationScenarios: [],
+      //打开弹窗,判断是编辑还是添加,同时判断是批量添加还是添加单个事件(type==1是单个,type==2是批量)
+      open(data,type){
+          if(data){
+              this.formData = JSON.parse(JSON.stringify(data))
+          }else{
+              this.formData=[
+                  {
+                      questionName: '',
+                      eventDate: '',
+                      description: '',
+                      applicationScenarios: [],
+                  }
+              ]
           }
-        ]
-      }
-      this.dialogVisible = true
-    },
+          this.type = type
+          this.dialogVisible = true
+      },
     //关闭弹窗
-    handleClose() { 
-      this.dialogVisible=false
+    handleClose(){
+      this.dialogVisible = false
     },
     // 请求应用场景(是通过字典还是接口待定)
     async getCommonData() {
@@ -180,68 +191,71 @@ export default {
       })
     },
     // 检验事件并提交保存请求
-    submitForm1() {
+    submitForm1(){
       var list = []
       try {
-        this.formData.forEach(item => {
+        this.formData.forEach(item=>{
           var a = false
           for (let key in item) {
             if (key != 'applicationScenarios') {
-              if (item[key] != '' && item[key] != null) {
-                a = true
-              }
-            } else {
-              if (item[key].length > 0) {
-                a = true
-              }
-            }
-          }
-          if (a == true) {
-            if (item.questionName != '') {
-              list.push(item)
+              if(item[key]!='' && item[key]!=null){
+                    a = true
+                }
             } else {
-              throw new Error('事件名称不能为空')
-            }
+              if(item[key].length > 0){
+                    a = true
+                }
+            }  
           }
+          if(a == true){
+              if (item.questionName != '') {
+                    list.push(item)
+              } else {
+                throw new Error('事件名称不能为空')
+              }
+          } 
         })
-        var arr = [...new Set(list.map(item => { return item.questionName }))]
-        if (arr.length < list.length) {
+        var arr = [...new Set(list.map(item=>{return item.questionName}))]
+        if(arr.length<list.length){
           this.$message.error(`存在重复的事件名称,请重定义事件名称`)
           return false
         }
         var edit = false
-        if (this.row) {
+        if(this.row){
           edit = true
         }
-        console.log(list);
-        this.$emit('formData', { list: list, option: 1, edit })
+         this.$emit('formData', {list:list,option:1,edit})
       } catch (error) {
         this.$message.error(error)
       }
     },
-    //取消全部事件
+     //取消全部事件
     resetForm() {
       this.$confirm('此操作将重置全部事件, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        if (this.type == 1) {
-          this.$refs.ruleForm.resetFields();
-        }
-        this.formData = [
-          {
-            questionName: '',
-            eventDate: '',
-            description: '',
-            applicationScenarios: [],
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          if(this.type ==1 ){
+              this.$refs.ruleForm.resetFields();
           }
-        ]
-        // this.$emit('formData', {list:this.formData,option:1})
-        this.$message.success('事件已全部重置')
-      }).catch(() => {
-        this.$message.info('重置操作已取消')
-      });
+          this.formData=[
+              {
+                questionName: '',
+                eventDate: '',
+                description: '',
+                applicationScenarios: [],
+              }
+          ]
+          // this.$emit('formData', {list:this.formData,option:1})
+          this.$message.success('事件已全部重置')
+        }).catch(() => {   
+          this.$message.info('重置操作已取消')
+        });
+    },
+    // 关闭弹窗并清空数据
+    resetClose() {
+      this.$emit('resetClose',true)
     },
     // 增加事件
     addRow() {
@@ -256,12 +270,12 @@ export default {
     },
     //删除事件
     deleteRow(row) {
-      this.formData.splice(row.$index, 1)
+        this.formData.splice(row.$index,1)
     },
-    // 查询所有事件
+    // 查询事件
     async questionEventList() {
       await this.$api.eventQuery({}).then(res => {
-        if (res.code == 200) {
+        if (res.code==200) {
           this.questionNameArr = res.data.list
         }
       })
@@ -269,55 +283,50 @@ export default {
     //通过接口获取建议数据
     querySearchQuestion(queryString, cb) {
       
-      
     },
     // input框切换选择
-    handleSelectQuestion(val) {
-      let a = this.formData.findIndex(item => {
-        return item.id == val.id
-      })
-
-      if (a == -1) {
-        // this.$set(this.formData,this.index,JSON.parse(JSON.stringify(val)))
-      } else {
-        this.$message.error('事件已存在')
-        this.$set(this.formData, this.index, {})
-        return false
-      }
-    },
-    //失去焦点
-    focus(ev, val) {
-
-    },
+      handleSelectQuestion(val) {
+          let a=this.formData.findIndex(item => {
+              return item.id == val.id
+          })
+          
+          if (a == -1) {
+              // this.$set(this.formData,this.index,JSON.parse(JSON.stringify(val)))
+          } else {
+              this.$message.error('事件已存在')
+              this.$set(this.formData,this.index,{})
+              return false
+          }
+      },
+      //失去焦点
+      focus(ev,val){
+          
+      },
   },
 }
 </script>
-  
+
 <style lang="scss">
-.addEvent {
-  .dialog-footer {
-    text-align: center;
+.addEvent{
+  .dialog-footer{
+      text-align: center;
   }
 }
-
-.twj-table td.el-table__cell,
-.el-table th.el-table__cell.is-leaf {
-  border: none !important;
+.twj-table td.el-table__cell, .twj-table th.el-table__cell.is-leaf{
+    // border:none !important;
+    border:5px solid white !important;
 }
-
 .twj-table::before {
-  background-color: transparent;
-}
-
-.twj-table tr td:first-child {
-  border-right: none !important;
-  border-left: none !important;
+    background-color: transparent;
 }
-
-.twj-table tr td:last-child {
+.twj-table tr td:first-child{
   border-right: none !important;
   border-left: none !important;
-}
+  }
+.twj-table tr td:last-child{
+      border-right: none !important;
+      border-left:none !important;
+  }
 </style>
 <style lang="scss">
 .btn {
@@ -327,7 +336,6 @@ export default {
   text-align: center;
   cursor: pointer;
 }
-
 .btn:hover {
   color: aqua;
 }

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

@@ -7,20 +7,17 @@
           </mySearch>
         </div>
         <div style="display: flex">
-          <div>
+          <div v-if="['可视化'].indexOf(isOperate) == -1">
             <span>分组查询:</span>
             <el-select v-model="groupingValue" size="small" @change="changeGrouping" style="width: 120px">
               <el-option v-for="item in groupingOption" :key="item.value" :label="item.label" :value="item.value">
               </el-option>
             </el-select>
           </div>
-          <el-button-group style=" display: flex; justify-content: flex-start; margin-left: 10px;">
-            <el-button size="small" :type="viewSelected === 'visual' ? 'primary' : ''"
-              @click="onChange2('visual')">可视化</el-button>
-            <el-button :type="viewSelected === 'Table' ? 'primary' : ''" @click="onChange2('Table')"
-              size="small">列表</el-button>
-            <el-button :type="viewSelected === 'Card' ? 'primary' : ''" @click="onChange2('Card')"
-              size="small">卡片</el-button>
+          <el-button-group style=" display: flex; justify-content: flex-start; margin-left: 10px;" v-if="['可视化'].indexOf(isOperate) == -1">
+            <el-button size="small" :type="viewSelected === 'visual' ? 'primary' : ''" @click="onChange2('visual')">可视化</el-button>
+            <el-button :type="viewSelected === 'Table' ? 'primary' : ''" @click="onChange2('Table')" size="small">列表</el-button>
+            <el-button :type="viewSelected === 'Card' ? 'primary' : ''" @click="onChange2('Card')" size="small">卡片</el-button>
           </el-button-group>
           <el-dropdown trigger="click" split-button type="primary" size="small" @command="handleCommand($event)">
             <P @click="handleCommand('1')">添加事件</P>
@@ -33,15 +30,32 @@
       </el-header>
       <el-main id="patent-list-container" class="main" v-loading="loading">
         <div class="height_100">
-          <component v-if="showView" ref="questionViewList" :is="viewSelected" :queryParams="queryParams"
-            :tableData="tableData" :column="columnList" :commonData="commonData" v-bind="$attrs" @on-sort="handleSort"
-            @option="handleOption"></component>
+          <component
+            v-if="showView"
+            ref="questionViewList"
+            :is="viewSelected"
+            v-bind="$attrs" 
+            v-on="$listeners" 
+            :isOperate="isOperate"
+            :queryParams="queryParams"
+            :tableData="tableData"
+            :column="columnList"
+            :commonData="commonData"
+            @on-sort="handleSort"
+            @option="handleOption"
+          ></component>
         </div>
       </el-main>
-      <el-footer class="workspace-content-patent-page">
-        <el-pagination background layout="total, sizes, prev, pager, next, jumper"
-          :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
-          @current-change="handleCurrentChange" @size-change="getList()" :total="total">
+      <el-footer class="pagination">
+        <el-pagination
+          background
+          layout="total, sizes, prev, pager, next, jumper"
+          :current-page.sync="queryParams.current"
+          :page-size.sync="queryParams.size"
+          @current-change="handleCurrentChange"
+          @size-change="getList()"
+          :total="total"
+        >
         </el-pagination>
       </el-footer>
     </el-container>
@@ -63,8 +77,9 @@ export default {
     addEvent
   },
   props: {
-    eventName: '',
-    applicationScenario: null
+    eventName:'',
+    applicationScenario:null,
+    isOperate:''
   },
   data() {
     return {

+ 21 - 24
src/views/event/components/view/table.vue

@@ -16,30 +16,27 @@
         </template>
       </el-table-column>
 
-      <el-table-column v-if="isOperate != '首页'" label="操作" align="center" width="150px">
-        <template slot-scope="scope">
-          <el-dropdown split-button type="primary" size="small" @click="handleClick($event, scope.row)"
-            @command="handleCommand($event, scope.row)">
-            <p>编 辑</p>
-            <el-dropdown-menu slot="dropdown" style="text-align:center">
-              <el-dropdown-item command="0">新增专题库</el-dropdown-item>
-              <el-dropdown-item>
-                <el-dropdown trigger="hover" placement="right-start">
-                  <span class="el-dropdown-link"> 新增报告 </span>
-                  <el-dropdown-menu class="children_item" v-if="dictMessage.REPORT_TYPE">
-                    <el-dropdown-item
-                      v-for="item in dictMessage.REPORT_TYPE.filter(item => !['6'].includes(item.dictChildValue))"
-                      :key="item.dictChildLabel" @click.native="handleAnalyse(item.dictChildValue, scope.row)"
-                      v-if="$permission('/pcs/report/add/' + item.permission)">{{ item.dictChildLabel }}</el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </el-dropdown-item>
-              <el-dropdown-item command="10" divided style="color:red">删 除</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-        </template>
-      </el-table-column>
-    </el-table>
+        <el-table-column v-if="['首页'].indexOf(isOperate) == -1" label="操作" align="center" width="150px">
+          <template slot-scope="scope">
+            <el-dropdown split-button type="primary" size="small" @click="handleClick($event,scope.row)"
+              @command="handleCommand($event,scope.row)">
+              <p>编 辑</p>
+              <el-dropdown-menu slot="dropdown" style="text-align:center">
+                <el-dropdown-item command="0">新增专题库</el-dropdown-item>
+                <el-dropdown-item>
+                  <el-dropdown trigger="hover" placement="right-start">
+                    <span class="el-dropdown-link"> 新增报告 </span>
+                    <el-dropdown-menu  class="children_item" v-if="dictMessage.REPORT_TYPE">
+                        <el-dropdown-item v-for="item in dictMessage.REPORT_TYPE.filter(item=>!['6'].includes(item.dictChildValue))" :key="item.dictChildLabel"  @click.native="handleAnalyse(item.dictChildValue,scope.row)" v-if="$permission('/pcs/report/add/' + item.permission)">{{item.dictChildLabel}}</el-dropdown-item>
+                    </el-dropdown-menu>
+                </el-dropdown> 
+                </el-dropdown-item>
+                <el-dropdown-item command="10" divided style="color:red">删 除</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </template>
+        </el-table-column>
+      </el-table>
   </div>
 </template>
 

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

@@ -198,10 +198,10 @@ export default {
 }
   .wrapper {
     width: 100%;
-    height: calc(100%);
+    height: 100%;
     background: white;
     #view {
-      height: calc(100% - 10px)
+      height: 100%
     }
   }
 }

+ 254 - 8
src/views/project/components/drawer/form.vue

@@ -2,36 +2,282 @@
   <div>
     <el-drawer class="custom-drawer-form" :title="title" size="800px" append-to-body :visible.sync="drawer" direction="rtl" :before-close="close" destroy-on-close>
         <el-container>
-            <el-main></el-main>
+            <el-main>
+              <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+                <el-form-item label="专题库名称:" prop="name">
+                  <el-input v-model="ruleForm.name" placeholder="请输入专题库名称"></el-input>
+                </el-form-item>
+                <template>
+                  <div>
+                    <el-form-item label="委托方:" prop="name" v-if="userinfo.tenantType == 1">
+                      <el-autocomplete
+                        style="width:100%"
+                        v-model="ruleForm.clientName"
+                        :fetch-suggestions="querySearch"
+                        @input="input"
+                        placeholder="请输入内容"
+                        :trigger-on-focus="false"
+                        @select="handleChange"
+                      >
+                      <el-button slot="append" icon="el-icon-search" @click="handleSelect"></el-button>
+                      </el-autocomplete>
+                    </el-form-item>
+                    <el-form-item label="委托部门:" prop="name" v-else>
+                      <mySelectTree style="width:100%" v-model="ruleForm.departmentId" :options="departmentList"></mySelectTree>
+                    </el-form-item>
+                  </div>
+                </template>
+                <el-form-item label="负责部门:" prop="departmentId">
+                  <mySelectTree style="width:100%" v-model="ruleForm.departmentId" :options="departmentList"></mySelectTree>
+                </el-form-item>
+                <el-form-item label="负责人:" prop="person">
+                  <el-select style="width:100%" v-model="ruleForm.personnelId" filterable remote clearable placeholder="请选择" :loading="loading" v-SelectLazyLoading="lazyLoading" :remote-method="remoteMethod">
+                    <el-option
+                      v-for="item in personnelList"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="应用场景:" prop="scenarioList">
+                  <el-checkbox-group v-model="ruleForm.scenarioList" @change="onChange">
+                    <el-checkbox v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO" :key="item.value" :label="parseInt(item.value)">{{ item.label }}</el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="调查类型:" prop="typeList" v-if="show==true">
+                  <el-checkbox-group v-model="ruleForm.typeList">
+                    <template v-for="(item, index) in dictAssociateData">
+                      <el-checkbox :label="parseInt(item.dictChildValue)">
+                        {{ item.dictChildLabel }}
+                      </el-checkbox>
+                      <div v-if="index === dictAssociateData.length - 1" class="more-data-box">
+                        <el-link v-if="moreData" type="primary" icon="el-icon-arrow-down" @click="handleMoreData(0)">更多
+                        </el-link>
+                        <el-link v-else type="primary" icon="el-icon-arrow-up" @click="handleMoreData(1)">收起</el-link>
+                      </div>
+                    </template>
+                    <div v-show="isShow">
+                      <el-checkbox v-for="item in dictSecondAssociateData" :label="parseInt(item.dictChildValue)">
+                        {{ item.dictChildLabel }}
+                      </el-checkbox>
+                    </div>
+                  </el-checkbox-group>
+                </el-form-item>
+                <el-form-item label="产品类别/产品:" prop="productId" v-if="$permission('/workspace/product')">
+                  <div>
+                    <mySelectButton size='large' style="width:100%">
+                      <div slot="select" style="width:100%">
+                        <mySelectTree style="width:100%" v-model="ruleForm.departmentId" :options="departmentList"></mySelectTree>
+                      </div>
+                    </mySelectButton>
+                  </div>
+                </el-form-item>
+                <el-row :gutter="24">
+                  <el-col :span="12">
+                    <el-form-item label="合同号:" prop="contractNo">
+                      <el-input v-model="ruleForm.contractNo" placeholder="请输入合同号"></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="内部案卷:" prop="innerFile">
+                      <el-input v-model="ruleForm.innerFile" placeholder="请输入内部案卷"></el-input>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row :gutter="24">
+                  <el-col :span="12">
+                    <el-form-item label="委案日:" prop="caseDate">
+                      <el-date-picker v-model="ruleForm.caseDate" value-format="yyyy-MM-dd" type="date" placeholder="请选择委案日" class="width_100"></el-date-picker>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="处理状态:" prop="status">
+                      <el-select v-model="ruleForm.status" placeholder="请输入处理状态" class="width_100">
+                        <el-option value="0" label="处理中"></el-option>
+                        <el-option value="1" label="已完成"></el-option>
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-form-item label="备注:" prop="remark">
+                  <el-input v-model="ruleForm.remark" placeholder="请输入备注" type="textarea"></el-input>
+                </el-form-item>
+              </el-form>
+            </el-main>
             <el-footer></el-footer>
         </el-container>
     </el-drawer>
+
+    <el-dialog title="选择委托方" :visible.sync="visible" width="800px" append-to-body destroy-on-close :before-close="close2" top="10vh">
+      <ClientTable :choseClient="true" @getClient="getClient"></ClientTable>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+import ClientTable from '@/views/client'
+import { mapGetters } from 'vuex';
 export default {
-  components: {},
-  props: {},
+  components: {
+    ClientTable
+  },
+  props: {
+    commonData: Object
+  },
   data() {
     return {
+        //抽屉标题
         title:'',
+        //抽屉开关标识
         drawer:false,
+        //表单数据
+        ruleForm:{},
+        //表单规则
+        rules:{},
+        //控制选择委托方弹窗
+        visible:false,
+        //部门列表
+        departmentList:[],
+        //人员列表
+        personnelList:[],
+        //负责人下拉加载
+        loading:false,
+        //显示调查类型
+        show:false,
+        //显示更多调查类型
+        isShow: false,
+        //显示更多和收起按钮
+        moreData: true,
+        //调查类型列表
+        dictAssociateData: [],
+        //其他调查类型
+        dictSecondAssociateData: [],
+        //用来获取调查类型
+        test: {
+          value: '1',
+          type: 'ENTERPRISE_APPLICATION_SCENARIO',
+          flag: 1
+        },
     };
   },
   watch: {},
-  computed: {},
+  computed: {
+    ...mapGetters(['userinfo'])
+  },
   created() {},
-  mounted() {},
+  mounted() {
+  },
   methods: {
     //打开弹窗
-    open(){
-        this.drawer = true
+    open(form,title){
+      //获取部门列表
+      this.getDepartment()
+      //获取人员列表
+      this.getPersonnelList()
+      this.ruleForm = form
+      this.title = title
+      this.drawer = true
+    },
+    //获取部门列表
+    getDepartment() {
+			this.$api.getPermissionDepartmentList().then((response) => {
+				this.departmentList = response.data;
+			});
+		},
+    //获取人员列表
+    getPersonnelList(){
+      this.$api.getPermissionPersonnelList().then((response)=>{
+        this.personnelList=response.data
+      })
     },
-    //关闭弹窗
+    //关闭抽屉
     close(){
         this.drawer = false
     },
+    //远程搜索(建议调取接口获取)
+    querySearch(queryString, cb) {
+        // var clientList = this.clientList;
+        // var results = (queryString ? clientList.filter(this.createFilter(queryString)) : clientList).map(item=>{
+        //   return {
+        //     value:item.name,
+        //     name:item.name,
+        //     id:item.id
+        //   }
+        // });
+        // // 调用 callback 返回建议列表的数据
+        // cb(results);
+      },
+      createFilter(queryString) {
+        return (clientList) => {
+          return (clientList.name && clientList.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
+        };
+      },
+      //输入框输入事件(委托方)
+      input() {
+        this.$set(this.ruleForm, 'clientId', -1)
+      },
+      //切换选择委托方
+      handleChange(row) {
+        this.$set(this.ruleForm, 'clientId', row.id)
+        this.$set(this.ruleForm, 'clientName', row.name)
+        this.close2()
+      },
+      //打开选择委托方弹窗
+      handleSelect() {
+        this.visible = true
+      },
+      //获取委托方信息
+      getClient(row){
+        this.$set(this.ruleForm, 'clientId', row.id)
+        this.$set(this.ruleForm, 'clientName', row.name)
+        this.close2()
+      },
+      //关闭委托方弹窗
+      close2(){
+        this.visible = false
+      },
+      //负责人远程搜索
+      remoteMethod(){
+
+      },
+      //负责人下拉懒加载
+      lazyLoading(){
+
+      },
+      //应用场景选择切换
+      onChange() {
+        if(this.ruleForm.scenarioList.length!=0){
+          this.show=true
+          this.test.value = this.ruleForm.scenarioList.toString()
+          this.test.flag = 1
+          this.$api.getDictTreeByParentDictValue(this.test).then(response => {
+            this.dictAssociateData = response.data
+            this.test.value = this.ruleForm.scenarioList.toString()
+            this.test.flag = 0
+            this.$api.getDictTreeByParentDictValue(this.test).then(response => {
+              this.dictSecondAssociateData = response.data
+            })
+          })
+        }else{
+          this.show=false
+        }
+      },
+      //调查类型展开收起
+      handleMoreData(type) {
+        if (type === 0) {
+          this.isShow = true
+          this.test.value = this.ruleForm.scenarioList.toString()
+          this.test.flag = 0
+          this.$api.getDictTreeByParentDictValue(this.test).then(response => {
+            this.dictSecondAssociateData = response.data
+          })
+        } else if (type === 1) {
+          this.isShow = false
+        }
+        this.moreData = !this.moreData
+      },
   },
 };
 </script>

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

@@ -28,6 +28,10 @@ export const workspaceOptions = {
       })
       this.$s.setSession('projectName',row.name)
       window.open(router.href, '_blank');
-    }
+    },
+    //操作列
+    handleCommand(event,row) {
+      this.$emit('option',{option:event,row})
+    },
   }
 }

+ 2 - 7
src/views/project/components/view/card.vue

@@ -10,9 +10,7 @@
                   <i class="el-icon-more el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="text-align_center">
-                  <el-dropdown-item command="e" @click="handleEdit(item)" >
-                    <!-- <p @click="handleEdit(item)" v-if="$permission('/workspace/project/modify') && ($r(item.id,[2])||userinfo.id == item.createBy)">编辑</p> -->
-                    <!-- <span>编辑</span> -->
+                  <el-dropdown-item command="e" >
                     <span v-if="$permission('/workspace/project/modify') && ($r(item.id,[2])||userinfo.id == item.createBy)">编辑</span>
                     <span v-else>查看</span>
                   </el-dropdown-item>
@@ -22,7 +20,6 @@
                       <el-dropdown-menu  class="children_item">
                           <el-dropdown-item command="7"> Excel导入 </el-dropdown-item>
                           <el-dropdown-item command="8">专利号导入 </el-dropdown-item>
-                          <!-- <el-dropdown-item command="9"> 网站导入 </el-dropdown-item> -->
                           <el-dropdown-item command="11" v-if="$permission('/workspace/common/retrieval')"> 检索条件导入 </el-dropdown-item>
                       </el-dropdown-menu>
                     </el-dropdown>
@@ -86,9 +83,7 @@
       ...mapGetters(['userinfo'])
     },
     methods: {
-      handleCommand(command, row) {
-        this.$emit('option', { option: command, row })
-      }
+      
     }
   }
   </script>

+ 5 - 10
src/views/project/components/view/table.vue

@@ -17,9 +17,9 @@
           </template>
         </el-table-column>
 
-        <el-table-column v-if="isOperate != '首页'" label="操作" align="center" width="150px">
+        <el-table-column v-if="['首页'].indexOf(isOperate) == -1" label="操作" align="center" width="150px">
           <template slot-scope="scope">
-            <el-dropdown split-button type="primary" size="small" @click="handleClick($event,scope.row)"
+            <el-dropdown split-button type="primary" size="small" @click="handleCommand('e',scope.row)"
               @command="handleCommand($event,scope.row)">
               <p>编 辑</p>
               <el-dropdown-menu slot="dropdown" style="text-align:center">
@@ -140,7 +140,7 @@ export default {
     handleItem(row,key) {
       // console.log(row,key);
     },
-    // 
+    // 获取栏位数据
     getColumnData(row,key) {
       if (key == 'projectNumber1') {
         if (row[key]) {
@@ -154,13 +154,8 @@ export default {
         }
       }
     },
-    // 编辑按钮事件
-    handleClick(row) {
-
-    },
-    handleCommand(event,row) {
-     
-    },
+    
+    
   },
 };
 </script>

+ 48 - 14
src/views/project/index.vue

@@ -1,7 +1,7 @@
 <template>
-  <div class="workspace">
-    <el-card shadow="never" class="workspace-card nopadding">
-      <div class="query-top">
+  <div class="workspace height_100">
+    <div shadow="never" class="workspace-card nopadding height_100">
+      <div class="query-top" v-if="['可视化'].indexOf(isOperate) == -1">
         <el-collapse>
           <el-collapse-item title="图表预览" name="1">
             <div class="chart-box">
@@ -10,13 +10,14 @@
           </el-collapse-item>
         </el-collapse>
       </div>
-      <el-container>
+      <div class="height_100">
+        <el-container>
         <el-header>
             <div>
               <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption" :disabled="!$permission('/workspace/project/check')"></mySearch>  
             </div>
-            <div style="display:flex;margin-right:10px">
-                <div>
+            <div style="display:flex;margin-right:10px" v-if="['可视化'].indexOf(isOperate) == -1">
+                <div >
                     <span>分组查询:</span>
                     <el-select v-model="group" :disabled="!$permission('/workspace/project/check')" clearable size="small" @change="onChange" style="width:200px">
                         <el-option v-for="item in commonData.QUERY_GROUP" :key="item.value" :label="item.label" :value="parseInt(item.value)">
@@ -36,12 +37,15 @@
                     </el-dropdown-menu>
                 </el-dropdown>
             </div>
+            <div v-else>
+              <el-button type="primary" @click="handleAdd" v-disabled="!$permission('/workspace/project/add')">新增专题库</el-button>
+            </div>
         </el-header>
         <el-main class="workspace-main" >
             <div v-loading="loading">
-                <component :is="viewType" :tableData="dataList" :common-data="commonData" :group="group" :params="queryParams" :field="fieldList" @option="handleOption" @sort="handleSort"></component>
+                <component :is="viewType" v-bind="$attrs" v-on="$listeners" :isOperate="isOperate" :tableData="dataList" :common-data="commonData" :group="group" :params="queryParams" :field="fieldList" @option="handleOption" @sort="handleSort"></component>
             </div>
-          <div style="text-align: center;margin-top:10px">
+          <div class="pagination"  v-if="['可视化'].indexOf(isOperate) == -1">
             <el-pagination
                 backgroundx
                 layout="total, prev, pager, next, jumper"
@@ -52,8 +56,21 @@
             </el-pagination>
           </div>
         </el-main>
+        <el-footer class="pagination" v-if="['可视化'].indexOf(isOperate) != -1">
+          <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>
+        </el-footer>
       </el-container>
-    </el-card>
+      </div>
+      
+    </div>
+    <project-form-drawer  @submit="submitProjectForm" :common-data="commonData" ref="projectFormDrawer" />
   </div>
 </template>
 
@@ -62,13 +79,18 @@ import { mapGetters } from 'vuex'
 import TotalChart from "./components/TotalChart";
 import Table from "./components/view/table.vue";
 import Card from "./components/view/card.vue";
+
+import ProjectFormDrawer from './components/drawer/form.vue'
 export default {
   components: {
     TotalChart,
     Table,
-    Card
+    Card,
+    ProjectFormDrawer
+  },
+  props: {
+   isOperate:''
   },
-  props: {},
   data() {
     return {
         //检索字段
@@ -138,7 +160,10 @@ export default {
       this.commonData = response.data
     })
     //获取应用场景统计
-    this.getScenarioAndTypeTotal();
+    if(['可视化'].indexOf(this.isOperate) == -1){
+      this.getScenarioAndTypeTotal();
+    }
+    
     //获取专题库列表
     this.getList()
   },
@@ -216,6 +241,8 @@ export default {
         scenarioList: []
       }, '新增专题库')
     },
+    //确认提交专题库信息
+    submitProjectForm(){},
     //导出列表
     handleExport() {
       this.btnLoading = true
@@ -282,6 +309,10 @@ export default {
           break
       }
     },
+    //编辑专题库
+    handleEdit(row){
+      this.$refs.projectFormDrawer.open(JSON.parse(JSON.stringify(row)), '编辑专题库')
+    },
     //排序
     handleSort(sort) {
       this.sort = { ...sort }
@@ -296,12 +327,15 @@ export default {
  
 .workspace {
   .workspace-card {
-    min-height: 100%;
-    padding-bottom: 15px;
+    min-height: calc(100% - 3px);
+    // padding-bottom: 15px;
     .workspace-main {
       padding-top: 10px;
       width: 100%;
     }
+    .el-card__body{
+      height: 100%;
+    }
   }
   .nopadding .el-card__body {
     padding: 0 !important;

+ 329 - 0
src/views/report/components/dialog/addAndEditReport.vue

@@ -0,0 +1,329 @@
+<template>
+  <div>
+    <el-dialog :title="title" :visible.sync="showDialog" width="600px" :close-on-click-modal="false"  @close="handleClose(false)" >
+        <el-form :model="form" :rules="rules" ref="reportForm" label-width="120px" v-loading="loading" :element-loading-text="load_text" element-loading-spinner="el-icon-loading"
+        element-loading-background-color="rgba(0, 0, 0, 0.8)">
+            <el-form-item :label="[3].includes(Number(form.type))?'标的产品':'标的专利'" prop="signPatentNo">
+              <el-input v-model="form.signPatentNo" autocomplete="off" :placeholder="[3].includes(Number(form.type))?'请输入标的产品':'请输入标的专利'" @change="getPatentNo"></el-input>
+              <!-- <p v-if="show==1" class="tips">查不到该专利请
+                  <span @click="importPatentNo()">导入</span>
+                </p>
+              <p v-if="show==2" class="tips" style="color:black"><span @click="toPatentDetails(form.signPatentNo)">查看详情</span></p> -->
+            </el-form-item>
+            <el-form-item label="报告名称" prop="name">
+              <el-input v-model="form.name" autocomplete="off" placeholder="请输入报告名称"></el-input>
+            </el-form-item>
+            <el-form-item label="是否完成" v-if="!form.id"> 
+              <el-switch
+                v-model="form.status"
+                active-color="#13ce66"
+                inactive-color="#ff4949"
+                @change="changeStatus"
+                :active-value="3"
+                :inactive-value="1">
+              </el-switch>
+            </el-form-item> 
+            <template v-if="!form.id && form.status == 3">
+                <div>
+                    <el-form-item label="核心结论">
+                        <el-checkbox-group v-model="form.conclusionIds">
+                            <el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{ item.dictChildLabel }}</el-checkbox>
+                        </el-checkbox-group>
+                    </el-form-item>
+                    <el-form-item label="结论论述">
+                        <el-input v-model="form.cronConclusion" type="textarea" placeholder="请输入结论论述"></el-input>
+                    </el-form-item>
+                    <el-form-item label="后续跟进事项" v-if="$permission('/rms/matter')">
+                        <span v-if="form.followUps"><span v-for="item in form.followUps" :key="item.followUpName" style="margin-right:10px">{{ item.followUpName}}</span></span> 
+                        <span>
+                            <el-popover
+                            ref="popover"
+                            placement="bottom"
+                            @hide="hidePopover"
+                            @show="showPopover"
+                            trigger="click">
+                            <div>
+                                <addMatter :type="matterType" :sign="matterSign" @value="getMatter"></addMatter>
+                            </div>
+                            <el-button slot="reference">添加后续事项</el-button>
+                        </el-popover>
+                        </span>
+                    </el-form-item>
+                </div>
+            </template>
+            <el-form-item label="承担部门" prop="departmentId">
+                <mySelectTree style="width:100%" v-model="form.departmentId" :options="departmentList"></mySelectTree>
+            </el-form-item>
+            <el-form-item label="负责人" prop="personId">
+              <el-select style="width:100%" v-model="form.personId" placeholder="请选择负责人" filterable  :popper-append-to-body="false">
+                <el-option v-for="item in personnelList" :key="item.id" :label="item.personnelName" :value="item.id"></el-option>
+              </el-select>
+            </el-form-item>
+            <template>
+                <div>
+                    <el-form-item label="委托方" prop="clientId" v-if="userinfo.tenantType == 1">
+                        <el-select style="width:100%" v-model="form.clientId" placeholder="请选择委托方" filterable :popper-append-to-body="false">
+                            <el-option v-for="item in clientList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="委托部门" prop="departmentId" v-else>
+                        <mySelectTree style="width:100%" v-model="form.departmentId" :options="departmentList"></mySelectTree>
+                    </el-form-item>
+                </div>
+            </template>
+            
+            <el-form-item label="产品/技术">
+              <el-input v-model="form.proTec" autocomplete="off" placeholder="请输入产品/技术"></el-input>
+            </el-form-item>
+            <el-form-item label="应用场景">
+              <el-checkbox-group v-model="form.scenarioList">
+                <el-checkbox v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO" :key="item.value" :label="parseInt(item.value)">{{ item.label }}</el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+            <el-form-item label="关联报告">
+              <el-input v-model="form.associateReportName" autocomplete="off" placeholder="请输入关联报告"></el-input>
+            </el-form-item>
+            <el-form-item label="需要复制的选项" v-show="form.track">
+              <el-select v-model="form.copyIds" multiple clearable placeholder="请选择需要复制的选项" :popper-append-to-body="false" @change="changeCopyIds">
+                <el-option v-for="item in copyList" :key="item.dictChildValue" :label="item.dictChildLabel" :value="item.dictChildValue"></el-option>
+              </el-select>
+            </el-form-item>
+            <template v-if="form.type==7">
+                <div>
+                    <el-form-item label="案件编号">
+                        <el-input v-model="form.caseNumber" autocomplete="off" placeholder="请输入案件编号"></el-input>
+                    </el-form-item>
+                    <el-form-item label="发文序号">
+                        <el-input v-model="form.issueNumber" autocomplete="off" placeholder="请输入发文序号"></el-input>
+                    </el-form-item>
+                    <el-form-item label="发明创造名称">
+                        <el-input v-model="form.inventionName" autocomplete="off" placeholder="请输入发明创造名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="专利权人">
+                        <el-input v-model="form.currentApplication" autocomplete="off" placeholder="请输入专利权人"></el-input>
+                    </el-form-item>
+                    <el-form-item label="无效宣告请求人">
+                        <el-input v-model="form.invalidApplication" autocomplete="off" placeholder="请输入无效宣告请求人"></el-input>
+                    </el-form-item>
+                </div>
+            </template>
+            <el-form-item label="卷号" prop="volumeNumber" >
+              <el-input v-model="form.volumeNumber" autocomplete="off" placeholder="请输入卷号"></el-input>
+            </el-form-item>
+            <el-form-item :label="(!form.id &&form.status==3)?'上传报告文档':'上传附件'">
+              <div v-if="form.reportFiles" class="upload-file">
+                <div v-for="item in form.reportFiles" style="margin:0;display:flex;justify-content:space-around;">
+                  <p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis;cursor: pointer">{{item.name?item.name+'.'+item.suffix:item.fileName}}</p> 
+                    <Menu :data="item" @delFile="delFile"></Menu>
+                </div>
+              </div>
+              <el-upload  ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true" :on-change="onChange" multiple  :on-preview="handlePreview" :on-remove="handleRemove">
+                <i :class="!file ? 'el-icon-upload' : 'el-icon-refresh'"></i>
+                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                <div class="el-upload__tip" slot="tip"></div>
+              </el-upload>
+            </el-form-item>
+            <el-form-item label="备注" prop="remark" >
+              <el-input type='textarea' v-model="form.remark" autocomplete="off" placeholder="请输入备注"></el-input>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer" v-if="$reportPermission(form.id,[0,1])">
+              <el-button @click="handleClose(false)">取 消</el-button>
+              <el-button type="primary" @click="ifNext " v-if="form.type==7 && !form.id">下一步</el-button>
+              <el-button type="primary" @click="submit "  v-else>确 定</el-button>
+        </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+        //弹窗标题
+        title:'',
+        //控制弹窗是否打开
+        showDialog:false,
+        //表单数据
+        form:{},
+        //表单规则
+        rules:{},
+        //加载
+        loading:false,
+        //加载时显示的文字
+        load_text:'加载中',
+        //应用场景
+        commonData:{},
+        //核心结论
+        conclusion:[],
+        //部门数据
+        departmentList:[],
+        //需要复制的选项集合
+        copyList:[],
+        //人员列表
+        personnelList:[],
+        //客户列表
+        clientList:[],
+        //上传文件列表
+        file:[],
+        //核心结论类型字典
+        reportAsDicItem:{
+            "0":"INVALID_ASSESS",
+            "1":"THIRD_ASSESS",
+            "2":"STABILITY_ASSESS",
+            "3":"FTO_ASSESS",
+            "4":"TORT_ASSESS",
+            "5":"AVOID_ASSESS",
+            "7":"REINVALID_ASSESS",
+        },
+        //需要复制的内容字典
+        reportAsDicItemCopy:{
+            "0":"INVALID_COPY",
+            "1":"THIRD_COPY",
+            "2":"STABILITY_COPY",
+            "3":"FTO_COPY",
+            "4":"TORT_COPY",
+            "5":"AVOID_COPY",
+        },
+    };
+  },
+  watch: {},
+  computed: {
+    ...mapGetters(['webSocket','userinfo']),
+    dictMessage() {
+      return this.$store.state.dictMessage.dictMessage
+    },
+  },
+  created() {},
+  mounted() {
+    //获取字典项(接口还是通过字典获取)
+    this.$api.getCommonData({ keys: 'QUERY_GROUP,ENTERPRISE_APPLICATION_SCENARIO,INVESTIGATION_TYPE' }).then(response => {
+      this.commonData = response.data
+    })
+    // console.log(1)
+    //获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
+    this.getAllPersonnelList()
+    //获取所有客户列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
+    this.getAllClientList()
+    //获取所有部门列表
+    this.getAllDepartmentList()
+  },
+  methods: {
+    //打开弹窗
+    open(form){
+        this.form = JSON.parse(JSON.stringify(form))
+        var a = ''
+        if (this.form.id) {
+            if (this.$reportPermission(this.form.id,[0,1])) {
+                a = '编辑'
+            } else {
+                a = '查看'
+            }
+        } else {
+            a = '创建'
+        }
+        var reportType = this.dictMessage.REPORT_TYPE.filter(item=>{return item.dictChildValue == this.form.type})[0].dictChildLabel
+        this.title = a + reportType + '报告'
+        this.showDialog = true
+    },
+    //获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
+    getAllPersonnelList(){},
+    //获取所有客户列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
+    getAllClientList(){},
+    //获取所有部门列表
+    getAllDepartmentList(){},
+    //关闭弹窗
+    handleClose(){
+        this.showDialog = false
+    },
+    //切换是否完成状态
+    changeStatus(val){
+      
+    },
+    //获取专利号且填入报告名称
+    getPatentNo(){
+      if(!this.form.name){
+        var a = this.dictMessage.REPORT_TYPE.filter(item=>{return item.dictChildValue == this.form.type})[0].dictChildLabel
+        this.$set(this.form,'name',this.form.signPatentNo + a)
+      }
+    },
+     //修改需要复制的选项
+     changeCopyIds(val){
+      if(Object.keys(this.copyIndex).length>0){
+        var index = this.copyList.findIndex(item=>{
+          return item.dictChildLabel == '对比文件'
+        })
+        if(index!=-1){
+          var id = this.copyList[index].dictChildValue
+          var index2 = this.copyList.findIndex(item=>{
+              return item.dictChildLabel == '标引信息'
+            })
+          if(val.indexOf(id)!=-1){
+            if(index2==-1){
+              this.copyList.splice(index+1,0,this.copyIndex)
+            }
+          }else{
+            if(index2!=-1){
+              this.copyList.splice(index2,1)
+              this.form.copyIds.splice(this.form.copyIds.indexOf(this.copyIndex.dictChildValue),1)
+            }
+          }
+        }else{
+
+        }
+      }
+    },
+    //切换上传的文件
+    onChange(file, fileList){
+
+    },
+    //删除未提交的附件
+    handleRemove(file, fileList) {
+      var index = this.file.findIndex(item=>{
+        return item.uid == file.raw.uid
+      })
+      if(index!=-1){
+        this.file.splice(index,1)
+      }
+    },
+    //上传附件时查看附件内容
+    handlePreview(file) {
+          var item={
+              name:file.name,
+              suffix:'',
+              downLoad:true
+            }
+            var index = file.raw.type.lastIndexOf('/')
+            var type = file.raw.type.substring(index+1,file.raw.type.length)
+            var arr = ['png','jpeg','bmp','jpg']
+            if(arr.includes(type)){
+              var FileUrl =  URL.createObjectURL(file.raw)
+              var isPicture = 1
+            }else if(type == 'pdf'){
+              var FileUrl = URL.createObjectURL(file.raw)
+              var isPicture = 0
+            }else{
+              return false
+            }
+            const router = this.$router.resolve({
+                path: '/checkFile',
+                query: {
+                    row: JSON.stringify(item),
+                    FileUrl: FileUrl,
+                    isPicture:isPicture
+                }
+            })
+            window.open(router.href, '_blank');
+    },
+    //创建无效应对报告下一步
+    ifNext(){},
+    //提交填写的信息
+    submit(){},
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 380 - 0
src/views/report/components/index.vue

@@ -0,0 +1,380 @@
+<template>
+  <div class="height_100">
+    <el-container>
+        <el-header>
+            <div>
+              <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch>  
+            </div>
+            <div style="display:flex;">
+                <el-button-group style="display:flex;justify-content:flex-start" v-if="['可视化'].indexOf(isOperate) == -1">
+                    <el-button v-for="item in viewTypes" :key="item.component" size="small" :type="viewType == item.component ? 'primary' : ''"  @click="onChange2(item.component)" >{{item.name}}</el-button>
+                </el-button-group>
+                <el-dropdown size="small" style="margin-right:20px" v-if="$permission('/pcs/report/add')">
+                  <el-button type="primary" size="small" >
+                      创建报告<i class="el-icon-arrow-down el-icon--right"></i>
+                  </el-button>
+                  <el-dropdown-menu slot="dropdown" style="margin-top:0px" v-if="dictMessage.REPORT_TYPE">
+                    <!-- 遍历按钮 -->
+                      <el-dropdown-item v-for="item in dictMessage.REPORT_TYPE.filter(item=>!['6'].includes(item.dictChildValue))" :key="item.dictChildLabel"  @click.native="handleAnalyse(item.dictChildValue)" v-if="$permission('/pcs/report/add/' + item.permission)">{{item.dictChildLabel}}</el-dropdown-item>
+                  </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+        </el-header>
+        <el-main id="patent-list-container" class="main" v-loading="loading" >
+            <component :is="viewType" v-bind="$attrs" v-on="$listeners" :isOperate="isOperate" :tableData="dataList" :state="state" :group="group" :queryParams="queryParams"  @option="handleOption" @sort="handleSort" @getRow="checkDetails" @params="getParams"></component>
+        </el-main>
+        <el-footer class="pagination" v-if="viewType != 'visual'">
+          <el-pagination
+            background
+            layout="total,sizes, prev, pager, next, jumper"
+            :current-page.sync="queryParams.current"
+            :page-sizes="pageSize"
+            :page-size.sync="queryParams.size"
+            @current-change="handleCurrentChange"
+            @size-change="handleSizeChange"
+            :total="total">
+          </el-pagination>
+        </el-footer>
+      </el-container>
+      <CreateReport ref="ReportForm" @getList="isGetList"></CreateReport>
+  </div>
+</template>
+
+<script>
+import Table from './view/table.vue'
+import Card from './view/card.vue'
+import visual from './view/visual.vue'
+import CreateReport from './dialog/addAndEditReport.vue'
+export default {
+  components: {
+    Table,
+    Card,
+    visual,
+    CreateReport
+  },
+  props: {
+    isOperate:''
+  },
+  data() {
+    return {
+        //视图类型
+        viewTypes:[
+            {
+                name:'可视化',
+                component:'visual'
+            },
+            {
+                name:'列表',
+                component:'Table'
+            },
+            {
+                name:'卡片',
+                component:'Card'
+            },
+        ],
+        //当前视图类型
+        viewType:'Table',
+        //检索字段
+        searchFiled:[
+            {
+                label:'报告名称',
+                value:'name',
+                type:1,
+                placeholder:'请输入报告名称'
+            },
+            {
+                label:'报告类型',
+                value:'types',
+                type:3,
+                placeholder:'请选择报告类型',
+                // options:this.dictMessage.REPORT_TYPE||[]
+            },
+            {
+                label:'报告状态',
+                value:'statuses',
+                type:3,
+                placeholder:'请选择报告状态',
+                // options:this.dictMessage.REPORT_STATE||[]
+            },
+            {
+                label:'核心结论',
+                value:'cronIds',
+                type:3,
+                placeholder:'请选择核心结论',
+                options:[]
+            },
+        ],
+        //检索条件
+        searchOption:{
+            name:localStorage.searchContent
+        },
+        //分页信息
+        queryParams:{
+            current:1,
+            size:10,
+        },
+        //分页数量
+        pageSize:[10,"全部"],
+        //排序字段
+        sort:{},
+        //分组
+        group:'',
+        //总数
+        total:0,
+        //加载
+        loading:false,
+        //报告数据集合
+        dataList:[]
+    };
+  },
+  watch: {},
+  computed: {
+    dictMessage() {
+        var a = this.$store.state.dictMessage.dictMessage
+        if(a.REPORT_TYPE){
+        a.REPORT_TYPE.forEach(item=>{
+            if(['0','1','2'].includes(item.dictChildValue)){
+            item.permission = 'invalid'
+            }else if(item.dictChildValue == 3){
+            item.permission = 'FTO'
+            }else if(item.dictChildValue == 4){
+            item.permission = 'tort'
+            }else if(item.dictChildValue == 5){
+            item.permission = 'avoidDesign'
+            }else if (item.dictChildValue == 7) {
+            item.permission = 'reInvalid'
+            }
+        })
+        }
+        if(a.REPORT_TYPE){
+        this.searchFiled[1].options = a.REPORT_TYPE.map(item=>{
+            return {
+            value:item.dictChildValue,
+            label:item.dictChildLabel
+            }
+        })
+        this.searchFiled[2].options = a.REPORT_STATE.map(item=>{
+            return {
+            value:item.dictChildValue,
+            label:item.dictChildLabel
+            }
+        })
+        }
+        
+        return a
+    },
+    state(){
+        var a = this.$store.state.dictMessage.dictMessage.REPORT_STATE
+        var b = {}
+        if(a){
+        a.forEach(item => {
+            b[item.dictChildValue] = item.dictChildLabel
+        });
+        return b
+        }
+    return []
+        
+    }
+  },
+  created() {},
+  mounted() {
+    //获取报告清单
+    this.getList()
+  },
+  methods: {
+    //接收检索条件
+    search(val){
+
+    },
+    //获取报告列表
+    getList(){
+        this.dataList = [{}]
+    },
+    //分页
+    handleCurrentChange(val) {
+        this.queryParams.current = val;
+        this.getList();
+    },
+    //切换页大小
+    handleSizeChange(val) {
+        this.getList()
+    },
+    //切换视图
+    onChange2(type) {
+        this.viewType = type
+        if(type == 'visual'){
+            this.$nextTick(()=>{
+                this.reportVisual() 
+            })
+            return false
+        }
+        this.queryParams.size = this.viewType === 'Table' ? 10 : 12
+        this.onChange()
+    },
+    //展示报告可视化
+    reportVisual() {
+        this.$api.reportVisual(this.queryParams).then(response=>{
+            if(response.code == 200){
+                this.$refs.reportVisual.open(response.data)
+            }
+        })
+    },
+    //查询报告数据
+    onChange() {
+        this.queryParams.current = 1
+        this.getList()
+    },
+    //打开创建报告弹窗
+    handleAnalyse(id) {
+        var form = {
+            type:id,
+            scenarioList:[]
+        }
+        this.$refs.ReportForm.open(form)
+    },
+    //操作列
+    handleOption({ option, row }) {
+        this.$s.setSession('params', row)
+        switch (option) {
+            case '0'://分享
+                this.share(row)
+                break
+            case '1'://导出报告
+                this.exportReport(row)
+                break
+            case '2'://报告文档
+                this.handleFile(row)
+                break
+            case '5'://拆分特征
+                this.handleDetails(row)
+                break
+            case '3'://自定义字段
+                this.handleFields(row)
+                break
+            case '4'://任务分配
+                this.handleTask(row)
+                break
+            case '6'://导入专利
+                this.handleImportPatent(row)
+                break
+            case '7':
+                this.$confirm('此操作将永久删除该报告, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.handleDelete(row)
+                
+                }).catch(() => {
+                    this.$message.info("已取消删除")         
+                });
+                break
+            case '8'://侵权分析技术特征对比
+                this.$s.setSession('reportMessage1',row)
+                var routerReport3 = this.$router.resolve({
+                        path: "/tortIndex",
+                        query: {
+                        id: row.id,
+                        patentNo:row.signPatentNo,
+                        personId:row.personId,
+                        type:8
+                        }
+                    })
+                window.open(routerReport3.href, '_blank');
+                break
+            case '9'://回避设计
+                this.handleDetails(row)
+                break;
+            case '10'://添加对比文件
+                this.addPatentList(row)
+                break
+            case '11'://完成报告
+                this.completeReport(row)
+                break
+            case '12'://追踪报告
+                this.trackReport(row)
+                break
+            case '13'://添加无效理由和证据
+                this.toInvalidIndex(row)
+                break;
+            case '14'://导入无效证据
+                this.toInvalidResponset(row)
+                break;
+            case 'e'://编辑
+                this.handleEdit(row)
+                break
+        }
+    },
+    //编辑报告
+    handleEdit(row){
+        this.$refs.ReportForm.open(row)
+    },
+    //排序
+    handleSort(sort) {
+        this.sort.orderBy = sort.prop
+        this.sort.orderDesc = sort.order
+        this.onchange()
+    },
+    //查看详情(修改)
+    checkDetails(row){
+        row.dictMessage = this.dictMessage
+        row.showMenu = true
+        this.$s.setSession('row', row)
+        this.$s.setSession('params', row)
+        switch(row.type){
+            case 0://无效分析
+            case 1://稳定性分析
+            case 2://第三方意见
+                var router = this.$router.resolve({
+                    name: 'rDetails' ,
+                })
+                window.open(router.href, '_blank');
+                break;
+            case 3://FTO
+            
+            case 4://侵权
+                var router = this.$router.resolve({
+                name: 'FTOrDetails' ,
+                })
+                window.open(router.href, '_blank');
+                break;
+            case 5://回避
+                var router = this.$router.resolve({
+                    name: 'avoidAside' ,
+                })
+                window.open(router.href, '_blank');
+                break;
+            case 6://图表
+                break;
+            case 7://无效应对
+                var router = this.$router.resolve({
+                    name: 'InvalidResponse',
+                })
+                window.open(router.href, '_blank');
+                break;
+        }
+    },
+    //接收可视化的参数
+    getParams(params){
+        if(params.conclusionType=='-1'){
+            this.searchOption.statuses=['0','1','2','4','5']
+            this.searchOption.types = [params.type]
+        }else{
+            this.searchOption.cronIds=[params.conclusionType]
+        }
+        var a = JSON.parse(JSON.stringify(this.searchOption))
+        this.searchOption = a
+        this.viewType = 'Table'
+        this.onChange()
+    },
+    //创建报告子组件返回值
+    isGetList(val){
+        if(val){
+            this.onchange()
+        }
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 33 - 0
src/views/report/components/mixins/index.js

@@ -0,0 +1,33 @@
+import { checkVisual } from "@/views/home/components/mixins";
+export default{
+    mixins:[checkVisual],
+    props:{
+        tableData: {//数据
+            type: Array,
+            default: () => {
+              return [{ name: '123', eventNumber: '手机', projectNumber: '专题库一', projectNumber1: [{ name: '事件一' }]},]
+            }
+          },
+        queryParams: {//分页信息
+            type: Object,
+            default: () => {
+              return {
+                size: 10,
+                current: 1,
+              }
+            }
+        },
+    },  
+    computed:{
+
+    },
+    methods: {
+        // 点击名称等事件
+        handleItem(row,key) {
+        },
+        //操作列事件
+        handleCommand(option,row){
+            this.$emit('option', { option, row })
+        },
+    },
+}

+ 0 - 0
src/views/report/components/view/card.vue


+ 8 - 31
src/views/report/components/view/table.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="eventTable">
+  <div>
     <div>
       <el-table :data="tableData" style="width: 100%" header-row-class-name="custom-table-header">
         <el-table-column label="#" width="60" type="index" align="center">
@@ -17,9 +17,9 @@
           </template>
         </el-table-column>
 
-        <el-table-column v-if="isOperate != '首页'" label="操作" align="center" width="150px">
+        <el-table-column v-if="['首页'].indexOf(isOperate) == -1" label="操作" align="center" width="150px">
         <template slot-scope="scope">
-          <el-dropdown @command="handleCommand($event, scope.row)" split-button type="primary" size="small"  @click="handleEdit(scope.row)">
+          <el-dropdown @command="handleCommand($event, scope.row)" split-button type="primary" size="small"  @click="handleCommand('e',scope.row)">
             <p v-if="$reportPermission(scope.row.id,[0,1])">编辑</p>
             <p v-else>查看</p>
             <el-dropdown-menu slot="dropdown" class="text-align_center">
@@ -48,27 +48,15 @@
 </template>
 
 <script>
+import mixins from '../mixins';
 export default {
+  mixins:[mixins],
   props: {
     isOperate: {//控制显示
       type: String,
       default:''
     },
-    tableData: {//数据
-      type: Array,
-      default: () => {
-        return [{ name: '123', eventNumber: '手机', projectNumber: '专题库一', projectNumber1: [{ name: '事件一' }]},]
-      }
-    },
-    queryParams: {//分页信息
-      type: Object,
-      default: () => {
-        return {
-          size: 10,
-          current: 1,
-        }
-      }
-    },
+   
     column: {//显示栏位管理数组
       type: Array,
       default: () => {
@@ -145,11 +133,8 @@ export default {
    
   },
   methods: {
-    // 点击名称等事件
-    handleItem(row,key) {
-      // console.log(row,key);
-    },
-    // 
+    
+    // 获取栏位数据
     getColumnData(row,key) {
       if (key == 'projectNumber1') {
         if (row[key]) {
@@ -163,19 +148,11 @@ export default {
         }
       }
     },
-    // 编辑按钮事件
-    handleClick(row) {
 
-    },
-    handleCommand(event,row) {
-    
-    },
   },
 };
 </script>
 <style lang="scss">
-.eventTable {
 
-}
 </style>
 <style lang="scss" scoped></style>

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


+ 17 - 6
src/views/report/index.vue

@@ -1,15 +1,26 @@
 <template>
   <div>
-
+    <Report></Report>
   </div>
 </template>
 
 <script>
-  export default {
-    
-  }
+import Report from './components/index'
+export default {
+  components: {
+    Report
+  },
+  props: {},
+  data() {
+    return {
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  mounted() {},
+  methods: {},
+};
 </script>
-
 <style lang="scss" scoped>
-
 </style>

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

@@ -2,7 +2,7 @@
     <div>
       <el-drawer class="custom-drawer-form" size="1100px" :with-header="false" :visible.sync="drawer" direction="rtl" :before-close="close" destroy-on-close append-to-body>
           <div style="padding:10px;height:100%">
-            <questionIndex :applicationScenario="getQuestionId(params.scenarioName)"></questionIndex>
+            <questionIndex :applicationScenario="getQuestionId(params.scenarioName)" isOperate='可视化'></questionIndex>
           </div>
       </el-drawer>
     </div>

+ 2 - 3
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' :params="params" style="height:calc(100% - 50px);"></component>
+              <component :is='components' style="height:calc(100% - 50px);" isOperate='可视化'></component>
           </div>
           
       </el-drawer>
@@ -14,7 +14,7 @@
   
 <script>
   import Project from '@/views/project/index.vue'
-  import Report from '@/views/report/index.vue'
+  import Report from '@/views/report/components/index.vue'
 //   import patentMining from './components/patentMining.vue'
   export default {
     components: {
@@ -37,7 +37,6 @@
              
           ],
           drawer:false,
-          params:{},
           components:'Project',
       };
     },

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

@@ -1,9 +1,9 @@
 <template>
-  <div class="svgDataDiv">
+  <div class="svgDataDiv" ref="svgDataDiv">
     <div v-for="item in svgData" :key="item.id" style="background-color: white">
-      <div v-if="item.children">
+      <div v-if="item.children" style="height:50%">
         <svg-visual
-          style="height: 100%; width: 95%"
+          style="height: 100%; width: 100%"
           v-for="item1 in item.children"
           :key="item1.name"
           :total="total[item1.name]"
@@ -19,7 +19,7 @@
       </div>
       <svg-visual
         v-else
-        style="height: 100%; width: 95%"
+        style="height: 100%; width: 100%"
         :total="total[item.name]"
         :status-total="statusTotal[item.name]"
         :title="item.name"
@@ -144,12 +144,38 @@ export default {
   computed: {},
   created() {},
   async mounted() {
+    //获取块的最大宽高
+    this.getDivWidth()
     //获取应用场景对应事件总数量
     await this.getScenarioTotal()
     //获取每个应用场景已完成未完成数量
     await this.getProjectStatusTotal()
   },
   methods: {
+    //获取块的最大宽高
+    getDivWidth(){
+      let width = this.$refs.svgDataDiv.clientWidth
+      let height = this.$refs.svgDataDiv.clientHeight
+      var maxHeight = 0
+      var maxWidth = 0
+      if(width>height){
+        if(height * 2 > width){
+          maxHeight = Math.floor(width/2)
+        }else{
+          maxHeight = height
+        }
+        maxWidth = maxHeight * 2
+      }else{
+        if(width * 2 > height){
+          maxWidth = Math.floor(height/2)
+        }else{
+          maxWidth = width
+        }
+        maxHeight =  Math.floor(maxWidth / 2)
+      }
+      this.$refs.svgDataDiv.style.width = maxWidth + 'px'
+      this.$refs.svgDataDiv.style.height = maxHeight + 'px'
+    },
     // 应用场景对应事件总数量
     async getScenarioTotal() {
       await this.$api.getScenarioAndTypeTotal().then(response => {

+ 9 - 1
src/views/visual/title/index.vue

@@ -17,16 +17,22 @@
     },
     data() {
       return {
+        //事件数量
         QuestionTotal: [],
+        //获取应用场景下流程节点对应项目数量
         total: {},
+        //当前的应用场景
         title: this.$route.params.title,
       }
     },
     async mounted() {
+      //获取事件数量
       await this.getEventNumber()
+      //获取应用场景对应项目数量
       await this.getProjectTypeTotal()
     },
     methods: {
+      //点击节点
       handleClick(type) {
         var question = {
           questionId: this.questionId,
@@ -42,6 +48,7 @@
           }
         })
       },
+      //获取应用场景下流程节点对应项目数量
       async getProjectTypeTotal() {
         this.show = true
         if (this.questionName) {
@@ -64,10 +71,11 @@
           this.total = response.data
         })
       },
+      //关闭抽屉弹窗回调
       close() { },
       // 返回
       handleBack() {
-        this.$router.push({ path: '/svgIndex' })
+        this.$router.push({ path: '/visual' })
       },
     },
   }