Browse Source

专利挖掘

zhuhao 1 year ago
parent
commit
4d345ee15a

+ 51 - 35
src/views/patentMining/components/dialog/addAndEditProject.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <el-dialog :title="title" :visible.sync="dialogVisible" width="850px" :before-close="handleClose" :append-to-body="true" :close-on-click-modal="false">
+    <el-dialog :title="title" :visible.sync="dialogVisible" width="850px" :before-close="handleClose"
+      :append-to-body="true" :close-on-click-modal="false">
       <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-form">
         <template>
           <el-divider content-position="left">挖掘项目</el-divider>
@@ -80,9 +81,9 @@
                   <el-form-item label="事件:">
                     <mySelectButton size='large' style="width:100%" @click="addEvent">
                       <div style="width:100%">
-                        <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote :disabled="eventList.disabled"
-                          clearable placeholder="请选择" :loading="eventList.loading" v-SelectLazyLoading="loadEvent"
-                          :remote-method="remoteEvent">
+                        <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote
+                          :disabled="eventList.disabled" clearable placeholder="请选择" :loading="eventList.loading"
+                          v-SelectLazyLoading="loadEvent" :remote-method="remoteEvent">
                           <el-option v-for="item in eventList.data" :key="item.id" :label="item.name" :value="item.id">
                           </el-option>
                         </el-select>
@@ -121,8 +122,8 @@
                       </div>
                     </mySelectButton>
                   </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 label="委托部门" prop="entrustId" v-else>
+                    <mySelectTree style="width:100%" v-model="form.entrustId" :options="departmentList"></mySelectTree>
                   </el-form-item>
                 </div>
               </template>
@@ -162,9 +163,9 @@
           <el-row>
             <el-col :span="12">
               <el-form-item label="编号:">
-                <el-autocomplete class="inline-input" v-model="form.rdnumber" value-key="number" v-SelectLazyLoading="load"
-                  :fetch-suggestions="querySearchQuestion" placeholder="请选择编号" :trigger-on-focus="false"
-                  @select="handleRdNumber" @change="changeRdNumber" style="width: 100%;">
+                <el-autocomplete class="inline-input" v-model="form.rdnumber" value-key="number"
+                  v-SelectLazyLoading="load" :fetch-suggestions="querySearchQuestion" placeholder="请选择编号"
+                  :trigger-on-focus="false" @select="handleRdNumber" @change="changeRdNumber" style="width: 100%;">
                 </el-autocomplete>
               </el-form-item>
             </el-col>
@@ -219,7 +220,7 @@ import ClientTable from '@/views/client'
 import examine from '@/views/components/dialog/examine.vue'
 import addEvent from '@/views/event/components/dialog/addEvent.vue'
 export default {
-  mixins:[personnelLoading],
+  mixins: [personnelLoading],
   components: {
     choosePerson,
     ClientTable,
@@ -292,6 +293,8 @@ export default {
       show: false,
       //调查类型列表
       dictAssociates: [],
+      // 部门数据
+      departmentList:[],
     };
   },
   watch: {},
@@ -302,10 +305,16 @@ export default {
   mounted() {
     // 获取人员列表
     // this.getPermissionPersonnel();
+    this.getDepartment()
   },
   methods: {
-  
-     // 专利挖掘项目审核
+    //获取部门列表
+    getDepartment() {
+      this.$api.getPermissionDepartmentList().then((response) => {
+        this.departmentList = response.data;
+      });
+    },
+    // 专利挖掘项目审核
     addProjectOpenExamineTask(form) {
       var params = {
         patentDigProjectDTO: this.form,
@@ -321,18 +330,18 @@ export default {
         }
       })
     },
-     /**
-     * 0标引任务
-     * 1项目开卷审核任务
-     * 2检索条件任务
-     * 3对比任务
-     * 4协同任务
-     * 5任务审核任务
-     * 
-     */
+    /**
+    * 0标引任务
+    * 1项目开卷审核任务
+    * 2检索条件任务
+    * 3对比任务
+    * 4协同任务
+    * 5任务审核任务
+    * 
+    */
     // 审核任务弹窗
     handleExamine() {
-      this.$refs.form.validate((valid) => { 
+      this.$refs.form.validate((valid) => {
         if (valid) {
           this.$refs.examine.open()
         }
@@ -400,7 +409,7 @@ export default {
     //打开事件弹窗
     addEvent() {
       let form = {}
-      this.$refs.addEvent.open(form,1)
+      this.$refs.addEvent.open(form, 1)
     },
     //懒加载事件
     loadEvent() {
@@ -535,18 +544,18 @@ export default {
     },
     // 选中的研发编号
     handleRdNumber(val) {
-      this.$set(this.form,'rdnumber',val.number)
-      this.$set(this.form,'rdName',val.name)
+      this.$set(this.form, 'rdnumber', val.number)
+      this.$set(this.form, 'rdName', val.name)
     },
     // 监听研发项目编号输入框的值
     changeRdNumber(val) {
       if (val) {
         this.form.rdnumber = val
         if (this.form.rdName) {
-          let a=this.rdNameArr.data.findIndex(item => {
+          let a = this.rdNameArr.data.findIndex(item => {
             return item.name == this.form.rdName
           })
-          if (a!=-1) {
+          if (a != -1) {
             this.form.rdName = ''
           }
         }
@@ -588,24 +597,24 @@ export default {
     },
     // 选中的研发项目名称
     handleRdName(val) {
-      this.$set(this.form,'rdnumber',val.number)
-      this.$set(this.form,'rdName',val.name)
+      this.$set(this.form, 'rdnumber', val.number)
+      this.$set(this.form, 'rdName', val.name)
     },
     // 监听研发项目名称输入框的值
     changeRdName(val) {
       if (val) {
         if (this.form.rdnumber) {
-          let a=this.rdNumberArr.data.findIndex(item => {
+          let a = this.rdNumberArr.data.findIndex(item => {
             return item.number == this.form.rdnumber
           })
-          if (a!=-1) {
+          if (a != -1) {
             this.form.rdnumber = ''
           }
         }
         this.form.rdName = val
       }
     },
-    
+
 
     /**
      * 上传文件处理
@@ -645,6 +654,13 @@ export default {
           await this.getPermissionPersonnel(1)
           this.personnelList.queryParams.id = null
         }
+        // 部门委托客户
+        if (this.form.entrustId) {
+          
+          // this.personnelList.queryParams.id = this.form.entrustId
+          // await this.getPermissionPersonnel(1)
+          // this.personnelList.queryParams.id = null
+        }
         // 参与人
         if (this.form.involvedPersons && this.form.involvedPersons.length) {
           this.form.adminPersons = []
@@ -661,11 +677,11 @@ export default {
         this.title = '编辑专利挖掘项目'
       } else {
         this.eventList.disabled = false
-        if(this.form.eventId){
+        if (this.form.eventId) {
           this.eventList.disabled = true
           this.eventList.data.push({
-            id:this.form.eventId,
-            name:this.form.eventName,
+            id: this.form.eventId,
+            name: this.form.eventName,
           })
         }
         this.title = '新增专利挖掘项目'

+ 2 - 1
src/views/patentMining/components/dialog/createTask.vue

@@ -86,7 +86,8 @@ export default {
       } else {//创建分配任务
         this.title = '创建文件分配任务'
         this.form.projectId = this.projectId//项目id
-        this.form.processId = this.processId
+        this.$set(this.form,'processId',this.processId)
+        // this.form.processId = this.processId
         this.form.type = 6//分配任务
         this.form.handlerType = 0//0内部人员1外部人员
       }

+ 34 - 10
src/views/patentMining/components/dialog/handleTask2.vue

@@ -1,8 +1,8 @@
 <template>
   <!-- 处理挖掘任务2(文件分配任务弹窗) -->
-  <div class="handleTask2"> 
-    <el-dialog ref="dialog" :title="title" :visible.sync="dialogVisible" width="900px" :before-close="handleClose" :append-to-body="true"
-      :close-on-click-modal="false">
+  <div class="handleTask2">
+    <el-dialog ref="dialog" :title="title" :visible.sync="dialogVisible" width="900px" :before-close="handleClose"
+      :append-to-body="true" :close-on-click-modal="false">
 
       <el-form :model="form" status-icon :rules="rules" ref="form" label-position="top" label-width="120px"
         class="demo-form" :disabled="!isLook">
@@ -15,7 +15,15 @@
             <el-table-column label="操作" align="center" width="140">
               <template slot-scope="scope">
                 <div>
-                  <el-button @click="deleteFile(scope.row)" size="small" type="text" style="color: red;">删除</el-button>
+                  <!-- <el-button @click="deleteFile(scope.row)" size="small" type="text" style="color: red;">删除</el-button> -->
+                  <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
+                    @click="handleCommand('0', scope.row)">
+                    预览
+                    <el-dropdown-menu slot="dropdown">
+                      <el-dropdown-item command="1">下载</el-dropdown-item>
+                      <el-dropdown-item command="2" divided style="color: red;">删除</el-dropdown-item>
+                    </el-dropdown-menu>
+                  </el-dropdown>
                 </div>
               </template>
 
@@ -49,7 +57,9 @@
 
 <script>
 import examine from '@/views/components/dialog/examine.vue'
+import {File} from '@/utils/model/menu/mixins'
 export default {
+  mixins:[File],
   components: {
     examine,
   },
@@ -122,8 +132,22 @@ export default {
       })
     },
     // 删除文件
-    deleteFile(row) {
-      this.deleteFiles([row.id])
+    handleCommand(event, row) {
+      // row.guid = row.fileGuid
+      switch (event) {
+        case '0'://预览
+          this.preview(row)
+          break;
+        case '1'://下载
+          this.downLoad(row)
+          break;
+        case '2'://删除
+          this.deleteFiles([row.id])
+          break;
+
+        default:
+          break;
+      }
     },
     deleteFiles(ids) {
       this.$api.deleteAssoTaskFile(ids).then(res => {
@@ -142,8 +166,8 @@ export default {
     },
     // 保存
     async handleSave(type) {
-    // 判断文件是否都上传完毕
-    this.$commonJS.allUploadFile(this.form)
+      // 判断文件是否都上传完毕
+      this.$commonJS.allUploadFile(this.form)
       this.form.taskId = this.row.id
       await this.$api.addTaskAuditResult(this.form).then(res => {
         if (res.code == 200) {
@@ -171,13 +195,13 @@ export default {
       })
     },
 
-     // 专利挖掘项目-文件分配任务审核
+    // 专利挖掘项目-文件分配任务审核
     fileTask(form) {
       this.isHandleSave()
       var params = {
         ...form,
         projectId: this.form.projectId,//项目id
-        assoTaskId:this.form.id,//当前任务id
+        assoTaskId: this.form.id,//当前任务id
         lastTaskId: this.form.id,//上一级任务的id
       }
       this.$api.addTask(params).then(res => {

+ 56 - 18
src/views/patentMining/components/fileMessage.vue

@@ -30,11 +30,12 @@
             :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
             <template slot-scope="scope">
               <div v-if="['name'].includes(item.value)">
-                <el-link @click="handleItem(scope.row, item.value)">
-                  <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
-                </el-link>
+                <!-- <el-link @click="handleItem(scope.row, item.value)"> -->
+                <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
+                <!-- </el-link> -->
               </div>
-              <div v-else-if="['ifFinal'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row, item , null , {data:ifFinal})"></div>
+              <div v-else-if="['ifFinal'].includes(item.value)"
+                v-html="$commonJS.getColumnData(scope.row, item, null, { data: ifFinal })"></div>
               <!-- <div v-else-if="['type'].includes(item.value)"
                 v-html="$commonJS.getColumnData(scope.row, item, null, { data: taskType })"></div>
               <div v-else-if="['status'].includes(item.value)"
@@ -42,11 +43,18 @@
               <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
             </template>
           </el-table-column>
-          <el-table-column label="操作" align="center" width="100px">
+          <el-table-column label="操作" align="center" width="150px">
             <template slot-scope="scope">
               <div>
                 <!-- <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button> -->
-                <el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+                <!-- <el-button type="danger"  @click="handleDelete(scope.row)">删除</el-button> -->
+                <el-dropdown split-button type="primary" size="small" @command="handleCommand($event,scope.row)" @click="handleCommand('0',scope.row)">
+                  预览
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item command="1">下载</el-dropdown-item>
+                    <el-dropdown-item command="2" divided style="color: red;">删除</el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
               </div>
             </template>
           </el-table-column>
@@ -66,17 +74,18 @@
 <script>
 import { optionsData } from './mixins/index2'
 import uploadFile from './dialog/uploadFile.vue'
+import {File} from '@/utils/model/menu/mixins'
 export default {
   props: ['id', 'processId'],
-  mixins: [optionsData],
+  mixins: [optionsData,File],
   components: {
     uploadFile
   },
   data() {
     return {
       ifFinal: {
-        false:'否',
-        true:'是',
+        false: '否',
+        true: '是',
       },
       // 数据源
       tableData: [],
@@ -126,7 +135,7 @@ export default {
       //排序字段
       sort: [{ "orderBy": "createTime", "orderType": 1 }],
       // 复制传过来的参数
-      pathObjCopy:this.processId,
+      pathObjCopy: this.processId,
     }
   },
   watch: {
@@ -137,7 +146,7 @@ export default {
       }
     },
   },
-  computed:{
+  computed: {
   },
   async mounted() {
     // 获取table栏位
@@ -164,14 +173,29 @@ export default {
             value: 'value',
             type: 'type',
           })
-          //为所属流程添加选项
-          var obj = this.searchFiled.find(item => { return item.label == '所属流程' })
-          obj.options=this.pathOptions
+          //为所属流程及最终文件添加选项
+          let arr = ['流程节点', '最终文件']
+          arr.forEach(item => {
+            var obj = this.searchFiled.find(item2 => { return item2.label == item })
+            if (item == '流程节点') {//流程节点
+              obj.options = this.pathOptions
+            } else {//最终文件
+              let isFile = [
+                {label:'是',value:true},
+                {label:'否',value:false},
+              ]
+              obj.options = isFile
+            }
+          })
+          
+          console.log(this.pathOptions);
+          
         }
       })
     },
     // 获取数据
     async getList() {
+      console.log(1);
       let searchOption2 = {
         processId: this.pathObjCopy,//流程节点id
         projectId: this.id,//固有检索
@@ -179,7 +203,7 @@ export default {
       }
       var searchFiled2 = this.$commonJS.objectToArray(searchOption2)
       var searchOption1 = this.searchOption
-      if(this.searchOption.constructor == Object){
+      if (this.searchOption.constructor == Object) {
         searchOption1 = this.$commonJS.objectToArray(this.searchOption)
       }
       let searchOption = [
@@ -191,7 +215,7 @@ export default {
         searchQuery: this.$commonJS.objectToString(searchOption || {}),//检索条件
         orderDTOList: this.sort,//排序信息
       }
-      
+
       this.$api.queryPatentDigProjectFiles(params).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.data
@@ -244,8 +268,22 @@ export default {
       this.$refs.uploadFile.open(row)
     },
     // 删除
-    handleDelete(row) {
-      this.handleDeletes([row.id])
+    handleCommand(event, row) {
+      row.guid = row.fileGuid
+      switch (event) {
+        case '0'://预览
+          this.preview(row)
+          break;
+        case '1'://下载
+          this.downLoad(row)
+          break;
+        case '2'://删除
+          this.handleDeletes([row.id])
+          break;
+      
+        default:
+          break;
+      }
     },
     handleDeletes(ids) {
       this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {

+ 1 - 1
src/views/patentMining/components/mixins/index2.js

@@ -76,7 +76,7 @@ export const column = {
   },
   methods: {
     // 点击项目名称
-    handleItem(row, key) { },
+    // handleItem(row, key) { },
     // 遍历栏位为数组类型
     getArrJoin(data, type) {
       if (!data) {

+ 8 - 9
src/views/patentMining/components/view/commonTable.vue

@@ -115,19 +115,18 @@ export default {
         this.tableData.splice(startIndex, 1)
         let params = {
           ...this.params,
-          searchQuery: this.$commonJS.objectToString(this.row.searchOption),//检索条件
+          searchQuery: this.$commonJS.objectToString(this.row.searchOption||{}),//检索条件
           orderDTOList: this.sort,//排序
-          groupField: this.row.groupBy,
-          groupFieldValue: this.row.row.value,
+          groupField: this.row?this.row.groupBy:null,
+          groupFieldValue: this.row?this.row.row.value:null,
         }
         this.getList2(params, 1)
       } else if (this.action.type == 2) {
-
         let params = {
           ...this.params,
           searchQuery: `id=${this.action.id}`,//检索条件
-          groupField: this.row.groupBy,
-          groupFieldValue: this.row.row.value,
+          groupField: this.row?this.row.groupBy:null,
+          groupFieldValue: this.row?this.row.row.value:null,
         }
         this.getList2(params, 2)
       }
@@ -169,10 +168,10 @@ export default {
       this.params.current += 1
       let params = {
         ...this.params,
-        searchQuery: this.$commonJS.objectToString(this.row.searchOption),//检索条件
+        searchQuery: this.$commonJS.objectToString(this.row.searchOption || {}),//检索条件
         orderDTOList: this.sort,//排序
-        groupField: this.row.groupBy,
-        groupFieldValue: this.row.row.value,
+        groupField: this.row?this.row.groupBy:null,
+        groupFieldValue: this.row?this.row.row.value:null,
       }
       this.isMore = false;
       this.isFlag = true;

+ 1 - 1
src/views/patentMining/components/viewIndex.vue

@@ -215,7 +215,7 @@ export default {
     },
     // 新增、编辑成功信息
     isSuccess(val) {
-      this.handleMessage = val
+      // this.handleMessage = val
       this.queryParams.current = 1
       this.isGrouping()
       this.clearMessage()

+ 150 - 102
src/views/product/components/commodity/commodity.vue

@@ -11,51 +11,31 @@
             </mySearch>
           </div>
           <div style="margin-right: 10px;display: flex;">
-            <div>
-              <el-button-group style=" display: flex; justify-content: flex-start;margin-right: 10px;">
-                <el-button size="small" :type="componentType === 'visual' ? 'primary' : ''"
-                  @click="onChange2('visual')">可视化</el-button>
-                <el-button :type="componentType === 'commodityTable' ? 'primary' : ''" @click="onChange2('commodityTable')"
-                  size="small">列表</el-button>
-                <el-button :type="componentType === 'Card' ? 'primary' : ''" @click="onChange2('Card')"
-                  size="small">卡片</el-button>
+            <div style="margin-right: 10px;">
+              <el-button-group class="margin-left_10">
+                <el-tooltip v-for="item in viewList" :key="item.value" class="item" effect="dark" :content="item.title"
+                  placement="top">
+                  <el-button @click="handleChangeView(item)" size="small"
+                    :type="viewSelected === item.value ? 'primary' : ''">
+                    <i :class="item.btn" style="font-size: 12px !important;"></i>
+                  </el-button>
+                </el-tooltip>
               </el-button-group>
             </div>
             <div>
-              <el-popover placement="bottom" title="" width="250" trigger="click">
-                <el-main class="patent-fast-edit-popover">
-                  <div class="btn" @click="handleSelectNumber(-1)">取消选择</div>
-                  <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
-                  <div class="btn" @click="handleSelectNumber(1)">全部选择</div>
-                  <el-divider></el-divider>
-                  <div class="select-number">
-                    <span>从</span>
-                    <el-input size="mini" v-model="queryParams.startNumber" @change="change1"></el-input>
-                    <span>到</span>
-                    <el-input size="mini" v-model="queryParams.endNumber" @change="change2"></el-input>
-                    <el-button type="text" size="" @click="handleSelectNumber(2)">确定</el-button>
-                  </div>
-                </el-main>
-                <el-button type="primary" size="small" class="margin-right_10" slot="reference">
-                  选择专利<i class="el-icon-arrow-down el-icon--right"></i>
-                </el-button>
-              </el-popover>
-            </div>
-            <div>
-              <el-dropdown split-button type="primary" size="small" @click="handleCommand('0')"
-                @command="handleCommand($event)">
-                <span>删除</span>
-                <el-dropdown-menu slot="dropdown">
+              <el-dropdown trigger="click" split-button type="primary" size="small">
+                <span @click="handleCommand('3')">显示栏位管理</span>
+                <el-dropdown-menu slot="dropdown" class="text-align_center">
                   <el-dropdown-item>
-                    <el-dropdown placement="left-start" @command="handleCommand($event)">
-                      <span>专利导入</span>
-                      <el-dropdown-menu slot="dropdown">
-                        <el-dropdown-item command="1">专利号导入</el-dropdown-item>
-                        <el-dropdown-item command="2">Excel导入</el-dropdown-item>
+                    <el-dropdown @command="handleCommand($event)" placement="left-start">
+                      <span> 专利导入 </span>
+                      <el-dropdown-menu style="text-align:center">
+                        <el-dropdown-item command="0"> Excel导入 </el-dropdown-item>
+                        <el-dropdown-item command="1">专利号导入 </el-dropdown-item>
+                        <!-- <el-dropdown-item command="2">检索条件导入 </el-dropdown-item> -->
                       </el-dropdown-menu>
                     </el-dropdown>
                   </el-dropdown-item>
-                  <el-dropdown-item command="3">显示栏位管理</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
             </div>
@@ -65,10 +45,29 @@
       <el-main>
         <component :is="componentType" :tableData="tableData" :queryParams="queryParams"></component>
       </el-main>
-      <el-footer>
-        <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
-          :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
-        </el-pagination>
+      <el-footer style="display: flex;justify-content: space-between;align-items: center;">
+        <div>
+          <div style="display:flex;align-items:center">
+            <span v-if="selectedTotal > 0">
+              已勾选 <b>{{ selectedTotal }}</b> 条
+            </span>
+            <el-popover placement="bottom" title="" width="220" trigger="click">
+              <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
+                <div class="btn" @click="handleCancelSelectNumber">取消选择</div>
+                <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
+              </el-main>
+              <el-button type="info" size="small" class="margin-left_10" slot="reference"> 选择专利<i
+                  class="el-icon-arrow-down el-icon--right"></i></el-button>
+            </el-popover>
+            <el-button type="primary" size="small" style="margin-left: 10px;"> 删除</el-button>
+          </div>
+        </div>
+        <div>
+          <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
+            :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="total">
+          </el-pagination>
+        </div>
+
       </el-footer>
     </el-container>
   </div>
@@ -80,60 +79,45 @@ export default {
   components: {
     commodityTable,
   },
-  props:{
-    productId:{
-      default:0
+  props: {
+    productId: {
+      default: 0
     },
-    productName:{
-      default:'--'
+    productName: {
+      default: '--'
     },
   },
   data() {
     return {
-      //检索字段
-      searchFiled: [
-        {
-          label: '标题',
-          value: 'productName1',
-          type: 1,
-          placeholder: '请输入标题'
-        },
-        {
-          label: '摘要',
-          value: 'productName2',
-          type: 1,
-          placeholder: '请输入摘要'
-        },
-        {
-          label: '专利号',
-          value: 'productName3',
-          type: 1,
-          placeholder: '请输入专利号'
-        },
+      //视图方式
+      viewList: [
         {
-          label: '申请号',
-          value: 'productName4',
-          type: 1,
-          placeholder: '请输入申请号'
+          value: 'patent-table-list-view',
+          title: '表格视图',
+          btn: 'el-icon-tickets',
         },
         {
-          label: '申请人',
-          value: 'productName5',
-          type: 1,
-          placeholder: '请输入申请人'
+          value: 'patent-abstract-list-view',
+          title: '摘要视图',
+          btn: 'el-icon-news',
         },
         {
-          label: '权利人',
-          value: 'productName6',
-          type: 1,
-          placeholder: '请输入权利人'
+          value: 'patent-picture-list-view',
+          title: '图片视图',
+          btn: 'el-icon-picture-outline',
         },
+        // {
+        //   value: 'PatentPDFListView',
+        //   title: 'PDF视图',
+        //   btn: 'iconfont icon-pdf',
+        // }
       ],
+      //选择的视图
+      viewSelected: "patent-table-list-view",
+      //检索字段
+      searchFiled: [],
       //检索条件
-      searchOption: {
-        questionName: this.eventName,
-        applicationScenario: this.applicationScenario
-      },
+      searchOption: {},
       // 显示指定的子组件
       componentType: 'commodityTable',
       // 查询专利所需字段
@@ -147,28 +131,89 @@ export default {
       tableData: [],
     }
   },
-  mounted() {
-
+  async mounted() {
+    this.customList = await this.$commonJS.getCustomField('patent', { projectId: `${this.productId}productId`, taskId: this.taskId || null })
+    await this.getColumn()
+    // 获取专利信息
+    this.getList()
   },
   methods: {
-    onChange2(val) {
-      this.componentType=val
+    //获取检索字段
+    async getColumn() {
+      let params = [{
+        tableName: 'patent',
+        projectId: this.projectId,
+      }]
+      await this.$api.getQueryFields(params).then(res => {
+        if (res.code == 200) {
+          let conditionDTOList = JSON.parse(JSON.stringify(res.data.data[0].conditionDTOList))
+          let field = conditionDTOList.filter(item => {
+            return item.group == 'nos'
+          })
+          let custom = conditionDTOList.filter(item => {
+            return item.group == 'customField'
+          })
+          let customField = custom.filter(item => {
+            return item.type != 'tree' && item.type != 'Array'
+          })
+          let arr = field.concat(customField)
+          // 搜索字段
+          this.searchFiled = this.$commonJS.getField(arr, (u) => u.ifSearch == true, {
+            label: 'name',
+            value: 'field',
+            type: 'type',
+            group: 'group',
+            fieldType: 'fieldType',
+            groupBy: 'groupBy',
+          })
+        }
+      })
     },
-    // 选择专利事件
-    handleSelectNumber(val) { },
-    // 起始数字框
-    change1(){},
-    // 结束数字框
-    change2(){},
-    // 分页
-    handleCurrentChange(val) { },
-    // 删除等下拉菜单
-    handleCommand(event) {
-      console.log(event);
-    },
-    //获取检索条件检索
-    search(val) {
+    //获取专利信息
+    getList(size) {
+      if (size) {
+        this.queryParams.size = size
+      }
+      let params = {
+        ...this.queryParams,//分页信息及区分同族类型
+        projectId: this.projectId,
+        searchQuery: this.searchStr || '',//检索条件
+        customFields: this.customFields || [],
+        orderDTOList: this.sort,//排序信息
+      }
+      this.$store.commit("SET_PATENT_RECORDS", []);
+      this.$api.QueryPatent(params).then(res => {
+        if (res.code == 200) {
+          this.tableData = res.data.data
+          this.total = res.data.total
 
+          // this.$set(this.queryParams, 'startNumber', this.endNumber > 0 ? this.startNumber : 1)
+          // this.$set(this.queryParams, 'endNumber', this.endNumber > 0 ? this.endNumber : this.total)
+          // this.$store.commit("SET_PATENT_PARAMS", params);
+          // this.$store.commit("SET_PATENT_RECORDS", res.data.data);
+          // if (this.quickSelect) {
+          //   this.commonSwitch()
+          // }
+          this.isRefresh()
+        }
+      }).catch(error => {
+        this.tableData = []
+        this.total = 0
+      })
+    },
+    //切换视图
+    async handleChangeView(item) {
+      this.viewSelected = item.value
+      this.queryParams.current = 1
+      // if (this.viewSelected == 'PatentPDFListView') {
+      //   return false
+      // }
+      if (this.viewSelected === 'patent-picture-list-view') {
+        this.$set(this.queryParams, 'size', 20)
+      } else {
+        this.queryParams.size = 10
+      }
+      this.getList()
     },
   },
 }
@@ -183,6 +228,7 @@ export default {
     background: #fff;
   }
 }
+
 .btn1 {
   background: #909399;
 }
@@ -233,6 +279,7 @@ export default {
     }
   }
 }
+
 .patent-left {
   margin-top: 69px;
   overflow: hidden;
@@ -260,4 +307,5 @@ export default {
     justify-content: space-between;
   }
 
-}</style>
+}
+</style>

+ 3 - 3
src/views/task/components/index.vue

@@ -24,9 +24,9 @@
             :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
             <template slot-scope="scope">
               <div v-if="['name'].includes(item.value)">
-                <el-link @click="handleItem(scope.row, item.value)">
+                <!-- <el-link @click="handleItem(scope.row, item.value)"> -->
                   <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
-                </el-link>
+                <!-- </el-link> -->
               </div>
               <div v-else-if="['type'].includes(item.value)"
                 v-html="$commonJS.getColumnData(scope.row, item, null, { data: taskType })"></div>
@@ -518,7 +518,7 @@ export default {
               })
             }
           }
-          var obj3 = this.searchFiled.find(item => { return item.label == '所属流程' })
+          var obj3 = this.searchFiled.find(item => { return item.label == '流程节点' })
           obj3.options = this.pathOptions
 
         }