zhuhao 1 éve
szülő
commit
b00df67301

+ 1 - 12
src/views/project/patentDetails/components/PatentField.vue

@@ -11,23 +11,12 @@
               <!-- 已选择 -->
               <template v-if="[4, 5, 6].includes(item.type)">
                 <div style="display: flex;align-items: center;">
-                  <!-- <el-popover placement="top-start" title="标题" width="200" trigger="hover"
-                    >
-                    <div v-for="checks in dataShow.filter(showItem =>{ return  showItem.type == item.type})" :key="checks.id">
-                      <span>{{ checks.name }}</span>
-                    </div>
-                    <div slot="reference">已选择的栏位</div>
-                  </el-popover> -->
 
-                  <div @click="hover(item)" class="check" style="min-width: 120px;min-height: 30px;background: rgb(235, 235, 168);position: relative;" >
-                    <div style="text-align: center;">已选择的栏位 <i class="el-icon-arrow-down"></i></div>
-                    <div class="checkSon">
+                  
                       <div v-for="checks in dataShow.filter(showItem => { return showItem.type == item.type })"
                         :key="checks.id">
                         <span>{{ checks.name }}</span>
                       </div>
-                    </div>
-                  </div>
                   <el-tooltip class="item" effect="dark" content="显示栏位的值" placement="top">
                     <el-button @click="showClick(item)" type="primary" size="small" style="margin-left: 10px;">{{ '显示'
                     }}</el-button>

+ 68 - 49
src/views/report/components/allocationTask/components/allocationTask.vue

@@ -1,54 +1,70 @@
 <template>
   <!-- 分配任务3(可做公共组件) -->
-  <div style="padding:20px;height:100%;background:white">
-    <div class="header1">
-      <div>
-        <span>总件数:{{ totalNumber }}</span>
-        <span> 剩余件数:{{ leaveNumber }}</span>
-      </div>
-      <div>
-        <label>任务类型:</label>
-        <el-select v-model="taskType">
-          <el-option label="对比任务" value="3"></el-option>
-          <el-option label="标引任务" value="0"></el-option>
-        </el-select>
-      </div>
-      <!-- 平均分配 -->
-      <div>
-        <!-- <el-button type="primary" size="small" style="height:40px" @click="handleConfirm">平均分配</el-button> -->
-        <el-button @click="getPerson">添加人员</el-button>
-        <el-button @click="finish" v-if="params">完成</el-button>
-      </div>
+  <div style="padding:20px;height:100%;background:white;display: flex;">
+    <div class="" v-show="showRight" :style="{width:showRight?'300px':'0px'}">
+      <showColumn :projectId="projectId"></showColumn>
     </div>
-    <div style="margin-top:20px">
-      <el-table v-if="showTable" :data="tableData" v-loading="loading" style="width: 100%" border>
-        <el-table-column prop="name" label="人员名称" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="tenantName" label="所属租户" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="email" label="邮箱" align="center" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="patentNum" label="件数" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span v-if="scope.row.vVisible">{{ scope.row.patentNum }}</span>
-            <span v-if="!scope.row.vVisible">
-              <el-input v-model="scope.row.patentNum2" size="small" placeholder="请输入件数"></el-input>
-            </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" width="300px">
-          <template slot-scope="scope">
-            <div class="special">
-              <el-button v-if="scope.row.vVisible" class="items" @click.native="edit(scope.row)"
-                :disabled="scope.row.isChoose">编辑</el-button>
-              <el-button v-else class="items" @click.native="save(scope.row)">保存</el-button>
-              <el-button @click="chosePatentFile(scope.row)" v-if="scope.row.isChoose != true">选择</el-button>
-              <el-tooltip v-else class="item" effect="dark" content="取消选择的专利" placement="top">
-                <el-button @click="cancelChoose(scope.row)">取消</el-button>
+    <el-container :style="{width:showRight?'calc( 100% - 300px )':'100%'}">
+      <el-header class="header1">
+        <!-- <div > -->
+          <div style="display: flex;align-items: center;">
+            <div style="margin-right: 10px;">
+              <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧自定义栏位'" placement="top">
+                <i :class="showRight ? 'el-icon-s-fold' : 'el-icon-s-unfold'"
+                  style="font-size: 25px; margin-left: 10px;color: #2f2f2f; cursor: pointer"
+                  @click="showRight = !showRight"></i>
               </el-tooltip>
-              <el-button @click="removePerson(scope)" type="danger">移除</el-button>
             </div>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+            <span>总件数:{{ totalNumber }}</span>
+            <span> 剩余件数:{{ leaveNumber }}</span>
+          </div>
+          <div>
+            <label>任务类型:</label>
+            <el-select v-model="taskType">
+              <el-option label="对比任务" value="3"></el-option>
+              <el-option label="标引任务" value="0"></el-option>
+            </el-select>
+          </div>
+          <!-- 平均分配 -->
+          <div>
+            <el-button @click="getPerson">添加人员</el-button>
+            <el-button @click="finish" v-if="params">完成</el-button>
+          </div>
+        <!-- </div> -->
+      </el-header>
+      <el-main>
+        <div style="margin-top:20px">
+          <el-table v-if="showTable" :data="tableData" v-loading="loading" style="width: 100%" border>
+            <el-table-column prop="name" label="人员名称" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="tenantName" label="所属租户" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="email" label="邮箱" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="patentNum" label="件数" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <span v-if="scope.row.vVisible">{{ scope.row.patentNum }}</span>
+                <span v-if="!scope.row.vVisible">
+                  <el-input v-model="scope.row.patentNum2" size="small" placeholder="请输入件数"></el-input>
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center" width="300px">
+              <template slot-scope="scope">
+                <div class="special">
+                  <el-button v-if="scope.row.vVisible" class="items" @click.native="edit(scope.row)"
+                    :disabled="scope.row.isChoose">编辑</el-button>
+                  <el-button v-else class="items" @click.native="save(scope.row)">保存</el-button>
+                  <el-button @click="chosePatentFile(scope.row)" v-if="scope.row.isChoose != true">选择</el-button>
+                  <el-tooltip v-else class="item" effect="dark" content="取消选择的专利" placement="top">
+                    <el-button @click="cancelChoose(scope.row)">取消</el-button>
+                  </el-tooltip>
+                  <el-button @click="removePerson(scope)" type="danger">移除</el-button>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </el-main>
+    </el-container>
+
 
 
 
@@ -77,15 +93,19 @@ import { mapGetters } from 'vuex'
 import personList from '@/views/components/dialog/person.vue'
 import checkPatent from '../../checkPatent/checkPatent.vue'
 import examine from '@/views/components/dialog/examine.vue'
+import showColumn from './showColumn.vue'
 export default {
   components: {
     personList,
     checkPatent,
     examine,
+    showColumn,
   },
   props: ['projectId',],
   data() {
     return {
+      // 
+      showRight: false,
       totalNumber: 0,//总件数
       leaveNumber: 0,//剩余件数
       // 任务类型
@@ -109,7 +129,6 @@ export default {
       showTable: true,
       // 完成???
       params: {},
-
     }
   },
   computed: {
@@ -131,7 +150,7 @@ export default {
   },
   methods: {
     // 倒计时
-    out(){
+    out() {
       this.timer = setInterval(() => {
         if (this.countdown == 0) {
           this.$router.replace("/AllReport");
@@ -236,7 +255,7 @@ export default {
     // 发送任务
     handleSave(form) {
       let params = {
-        projectId:this.projectId,
+        projectId: this.projectId,
         taskType: this.taskType,
         ...form,
         stringRequest: {},//检索内容条件

+ 369 - 0
src/views/report/components/allocationTask/components/showColumn.vue

@@ -0,0 +1,369 @@
+<template>
+  <div class="patent-tree-filter">
+    <el-container>
+      <el-header class="patent-query-filter-header"></el-header>
+      <el-main class="patent-tree-filter-main">
+        <template v-if="field.length > 0">
+          <div v-for="item in field" :key="item.id" style="width: 100%;">
+            <el-collapse>
+              <el-collapse-item name="1">
+                <template slot="title">
+                  <el-checkbox-group v-model="checkList">
+                    <el-checkbox :label="item.id">{{ item.name }}</el-checkbox>
+                  </el-checkbox-group>
+                </template>
+                <!-- 单选 -->
+                <div v-if="item.type == 4" style="padding-left: 15px;">
+                  <div v-for="radio in item.options" :key="radio.id" style="width: 100%;">
+                    <span>{{ radio.name }}</span>
+                  </div>
+                </div>
+                <!-- 多选 -->
+                <div v-if="item.type == 5" style="padding-left: 15px;">
+                  <div class="source-checkbox">
+                    <div v-for="source in item.options" :key="source.id">
+                      <span class="source-checkbox-label">{{ source.name }}</span>
+                    </div>
+                  </div>
+                </div>
+                <!-- 树类型 -->
+                <el-tree v-if="item.type == 6" @check-change="onChangeTree($event, item.id)" :ref="item.id"
+                  :data="item.child" show-checkbox node-key="id" check-strictly default-expand-all
+                  :props="{ children: 'child', label: 'name' }">
+                  <div class="custom-filter-tree-node" slot-scope="{ node, data }">
+                    <span class="name">{{ data.name }}</span>
+                  </div>
+                </el-tree>
+              </el-collapse-item>
+            </el-collapse>
+
+
+          </div>
+
+        </template>
+
+        <template v-else>
+          <div class="no-data">暂无数据</div>
+        </template>
+      </el-main>
+    </el-container>
+  </div>
+</template>
+
+<script>
+
+export default {
+  props: {
+    projectId: {
+      default: 0
+    },
+    // 是否显示栏位
+    isShowCustom: {
+      type: Boolean,
+      default: true,
+    }
+  },
+  data() {
+    return {
+      // isHidden: true,// 是都显示已读、未读、全部
+      readList: [],//已读未读全部
+      activeNames: '',//展示哪一个面板
+      // 面板的loading
+      loading: false,
+      // 已读未读状态信息
+      readStatus: {
+        all: {
+          label: "全部",
+          value: "3"
+        },
+        read: {
+          label: "已读",
+          value: "1"
+        },
+        noRead: {
+          label: "未读",
+          value: "0"
+        },
+      },
+      // sourceQuery: [],
+      // 分页信息
+      queryParams: {
+        current: 1,
+        size: 10,
+
+      },
+      total: 0,
+      // 自定义栏位
+      field: [],
+      // 处理数据
+      valObj: {
+        treeArr: [],
+        check: [],
+        radio: '',
+        description: '',
+      },
+      // 总数据
+      customFields: [],
+      checkList: []
+    }
+  },
+  watch: {
+
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    // 点击搜索自定义栏位的选项
+    handleSearch(val) { },
+    // 查询自定义栏位数据
+    getList() {
+      var params = {
+        ...this.queryParams,
+        searchQuery: `projectId=${this.projectId}`,
+        orderDTOList: [],
+      }
+      this.loading = true
+      this.$api.queryCustomField(params).then(response => {
+        if (response.code == 200) {
+          let data = response.data.data
+          this.handleFiled(data)
+          this.loading = false
+        }
+      }).catch(error => {
+        this.loading = false
+      })
+    },
+    handleFiled(data) {
+      data.forEach(item => {
+        this.queryCustomOption(item)
+      })
+    },
+    // 查询自定义栏位选项数据
+    queryCustomOption(row) {
+
+      let params = {
+        customFieldId: row.id,
+      }
+      this.$api.queryCustomOption(params).then(response => {
+        if (response.code == 200) {
+          if (row.type == 6) {//树类型
+            row.child = response.data.data
+          } else if (row.type == 5) {
+            row.options = response.data.data
+          } else if (row.type == 4) {
+            row.options = response.data.data
+          }
+          this.field.push(row)
+        }
+      }).catch(error => {
+
+      })
+    },
+
+    // 处理树类型的文件数字
+    getCount(rowId, childId) { },
+    // 加载更多
+    // handleLoadMore() { },
+    // 全选
+    handleSelectAll(val) {
+      this.valObj.check = []
+      val.options.forEach(item => {
+        this.valObj.check.push(item.id)
+      })
+      let obj = {
+        [val.id]: this.valObj.check
+      }
+      this.handleFiledData(obj, val.id)
+    },
+    // 取消
+    handleSelectCancel(val) {
+      this.valObj.check = []
+      let obj = {
+        [val.id]: []
+      }
+      this.handleFiledData(obj, val.id)
+    },
+    // 多选类型的change
+    onChange(filed, filedId) {
+      let obj = {
+        [filedId]: filed
+      }
+      this.handleFiledData(obj, filedId)
+    },
+    // 点击节点发生的变化
+    onChangeTree(filed, filedId) {//当前节点的数据,当前栏位的数据 
+      if (this.valObj.treeArr && this.valObj.treeArr.length > 0) {
+        let index = this.valObj.treeArr.findIndex(item => {
+          return item == filed.id
+        })
+        if (index != -1) {
+          this.valObj.treeArr.splice(index, 1)
+        } else {
+          this.valObj.treeArr.push(filed.id)
+        }
+      } else {
+        this.valObj.treeArr.push(filed.id)
+      }
+      let obj = {
+        [filedId]: this.valObj.treeArr
+      }
+      this.handleFiledData(obj, filedId)
+    },
+    // 单选的change
+    radioChange(filed, filedId) {
+      let obj = {
+        [filedId]: [filed]
+      }
+      this.handleFiledData(obj, filedId)
+    },
+    // 处理customFields中的数据
+    handleFiledData(obj, filedId) {
+      if (this.customFields && this.customFields.length > 0) {
+        this.customFields.forEach(item => {
+          for (let k in item) {
+            if (k == filedId) {
+              item[k] = obj[filedId]
+            } else {
+              this.customFields.push(obj)
+            }
+          }
+        })
+      } else {
+        this.customFields.push(obj)
+      }
+    },
+
+  }
+}
+</script>
+
+<style lang="scss">
+.patent-tree-filter {
+  height: 100%;
+
+  .patent-tree-filter-main {
+    height: 100%;
+    padding: 10px 0;
+
+    .no-data {
+      text-align: center;
+      color: #6b6868;
+    }
+  }
+
+  .change-show-type {
+    font-size: 13px;
+
+    .change-show-type-info {
+      color: #6b6868;
+      padding-left: 10px;
+    }
+
+    .el-form-item__label {
+      padding: 0 !important;
+      line-height: 20px;
+    }
+
+    .el-form-item__content {
+      height: 30px;
+      line-height: 30px;
+    }
+  }
+}
+
+.patent-query-filter-search {
+  display: flex;
+}
+
+.patent-query-filter-search-input {
+  margin-right: 5px;
+}
+
+.patent-query-filter-search-bottom {
+  text-align: center;
+  margin-top: 10px;
+}
+
+.year-data-picker {
+  width: 200px;
+  display: flex;
+  justify-content: space-between;
+
+  .el-input__prefix {
+    display: none;
+  }
+
+  .el-input__inner {
+    padding: 10px;
+    text-align: center;
+  }
+}
+
+.year-data-input {
+  width: 100px;
+}
+
+.source-checkbox {
+  margin-top: 10px;
+
+  span {
+    display: inline-block;
+    font-size: 13px;
+  }
+
+  .el-checkbox {
+    display: block;
+  }
+
+  .el-checkbox__label {
+    position: relative;
+    top: 5px;
+  }
+
+  .source-checkbox-count {
+    color: #409EFF;
+    position: relative;
+    top: -4px;
+    left: 10px;
+  }
+
+  .source-checkbox-label {
+    max-width: 190px;
+    padding-left: 5px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+}
+
+.query-read-status {
+  font-size: 12px;
+  height: 25px;
+  line-height: 25px;
+  cursor: pointer;
+  background: #dcdcdc;
+  border-radius: 3px;
+  padding: 0 5px;
+
+  span {
+    display: inline-block;
+  }
+
+  .a {}
+
+  .b {
+    text-align: center;
+    width: 30px;
+  }
+
+  .c {
+    padding-left: 5px;
+  }
+}
+
+.query-read-status_is-active {
+  background: #409EFF !important;
+  color: #ffffff !important;
+}
+</style>

+ 14 - 3
src/views/report/components/patentList/patentList.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="height_100">
     <div class="height_100" style="display:flex">
-      <div class="height_100" :style="{width:showRight?'calc( 100% - 300px )':'100%'}">
+      <div class="height_100" :style="{ width: showRight ? 'calc( 100% - 300px )' : '100%' }">
         <el-container>
           <el-header style="padding:0 10px !important;">
             <div id="step1">
@@ -37,7 +37,7 @@
           </el-header>
           <el-main class="height_100" style="width: 100%;">
             <component :is='components' :tableData="tableData" :column="fieldList" :projectId="projectId"
-              @on-sort="handleSort" :queryParams="queryParams"></component>
+              @on-sort="handleSort" :queryParams="queryParams" @clickPatentNo="clickPatentNo"></component>
           </el-main>
           <el-footer class="pagination">
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
@@ -47,7 +47,7 @@
           </el-footer>
         </el-container>
       </div>
-      <div class="height_100 right" v-if="showRight" :style="{'min-width':showRight?'300px':'0px'}">
+      <div class="height_100 right" v-if="showRight" :style="{ 'min-width': showRight ? '300px' : '0px' }">
         <customFields :projectId="projectId"></customFields>
       </div>
     </div>
@@ -112,6 +112,17 @@ export default {
     this.getList()
   },
   methods: {
+    // 跳转专利详情
+    clickPatentNo(row) {
+      this.$router.push(
+        {
+          path: '/patentDetails/' + row.patentNo,
+          query: {
+            projectId: this.projectId
+          }
+        }
+      )
+    },
     // 搜索
     search() {
       let params = {}

+ 12 - 1
src/views/report/components/patentListTask/components/index.vue

@@ -30,7 +30,7 @@
           <el-footer class="pagination">
             <el-pagination background layout="total, sizes, prev, pager, next, jumper"
               :current-page.sync="queryParams.current" :page-sizes="sizeArr" :page-size.sync="queryParams.size"
-              @current-change="handleCurrentChange" @size-change="getList" :total="total">
+              @current-change="handleCurrentChange" @size-change="getList" :total="total" @clickPatentNo="clickPatentNo">
             </el-pagination>
           </el-footer>
         </el-container>
@@ -94,6 +94,17 @@ export default {
     this.getList()
   },
   methods: {
+    // 跳转专利详情
+    clickPatentNo(row) {
+      this.$router.push(
+        {
+          path: '/patentDetails/' + row.patentNo,
+          query: {
+            projectId: this.projectId
+          }
+        }
+      )
+    },
     // 搜索
     search() {
       let params = {}

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

@@ -303,10 +303,9 @@ export default {
           break;
         case 1://项目开卷审核任务
           this.handleProject(row, str)
-
           break;
         case 3://报告对比任务
-        this.handleAllocation(row)
+          // this.handleAllocation(row)
           break;
         case 4://侵权分析及FTO协同任务
           this.teamworkTask(row, str ? 2 : 1)