瀏覽代碼

专利挖掘修改,商品化专利修改

zhuhao 1 年之前
父節點
當前提交
cfcbd5e166

+ 16 - 0
src/api/newApi/patent.js

@@ -311,4 +311,20 @@ export default {
   getPatentRightTree(params) {
     return axios.get("/xiaoshi/feature/getPatentRightTree", {params});
   },
+  /**
+   * 专利添加相关产品
+   * @param {*} data 
+   * @returns 
+   */
+  addProductPatent(data) {
+    return axios.post("/xiaoshi/patent/addProductPatent", data);
+  },
+  /**
+   * 删除
+   * @param {*} data 
+   * @returns 
+   */
+  delProductPatent(data) {
+    return axios.post("/xiaoshi/patent/delProductPatent", data);
+  },
 }

+ 4 - 1
src/views/components/dialog/examine.vue

@@ -95,7 +95,10 @@ export default {
 
   },
   methods: {
-    open() {
+    open(name) {
+      if (name) {
+        this.form.name = `${name}-审核任务`
+      }
       // 任务类型
       this.showTask = true
     },

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

@@ -343,7 +343,8 @@ export default {
     handleExamine() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          this.$refs.examine.open()
+          let title = this.form.name
+          this.$refs.examine.open(title)
         }
       })
     },

+ 3 - 1
src/views/patentMining/components/dialog/handleTask2.vue

@@ -188,9 +188,10 @@ export default {
     submit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
+           let title = this.row.name
           this.form.projectId = this.row.projectId//项目id
           this.form.id = this.row.id//当前文件分配任务的id
-          this.$refs.examine.open()
+          this.$refs.examine.open(title)
         }
       })
     },
@@ -203,6 +204,7 @@ export default {
         projectId: this.form.projectId,//项目id
         assoTaskId: this.form.id,//当前任务id
         lastTaskId: this.form.id,//上一级任务的id
+        type:7,
       }
       this.$api.addTask(params).then(res => {
         if (res.code == 200) {

+ 6 - 1
src/views/patentMining/components/dialog/uploadFile.vue

@@ -80,7 +80,12 @@ export default {
         if (valid) {
           // 判断文件是否都上传完毕
           this.$commonJS.allUploadFile(this.form)
-          this.$refs.examine.open()
+          // processId
+          let obj=this.pathOptions.find(item => {
+            return item.value == this.form.processId
+          })
+          let title = obj.label + '文件'
+          this.$refs.examine.open(title)
         }
       })
     },

+ 2 - 1
src/views/product/components/commodity/commodity.vue

@@ -157,10 +157,10 @@ export default {
     }
   },
   async mounted() {
+    this.getList()
     this.customList = await this.$commonJS.getCustomField('patent', { projectId: `${this.productId}productId`, taskId: this.taskId || null, from: 'product', })
     await this.getColumn()
     // 获取专利信息
-    // this.getList()
   },
   methods: {
     // 删除
@@ -218,6 +218,7 @@ export default {
       let params = {
         ...this.queryParams,//分页信息及区分同族类型
         productId: this.productId,
+        from:'product',
         searchQuery: this.searchStr || '',//检索条件
         customFields: [],
         orderDTOList: this.sort,//排序信息

+ 229 - 189
src/views/project/patentDetails/components/patentMessage/pageProduct.vue

@@ -1,70 +1,75 @@
 <template>
   <div class="height_100">
     <el-container>
-        <el-header>
-            <div id="step1">
-                <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch>
-            </div>
-            <div>
-              <el-button type="primary" size="small" @click="saveCheckList" v-if="isChoose">保存</el-button>
-              <el-button type="primary" size="small" @click="choseProduct" v-else>添加</el-button>
-            </div>
-        </el-header>
-        <el-main v-DivHeight="getDivHeight">
-            <el-table :data="tableData" header-row-class-name="custom-table-header"  v-if="showTable" v-loading="loading" :maxHeight="tableHeight - 35" @sort-change="sortChange" border>
-                <el-table-column label="#" width="60" type="index" align="center">
-                    <template slot-scope="scope">
-                      <div v-if="isChoose">
-                        <el-checkbox-group v-model="checkList">
-                          <el-checkbox :label="scope.row.id">
-                            <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
-                          </el-checkbox>
-                        </el-checkbox-group>
-                          
-                        </div>
-                        <div v-else>
-                          <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
-                        </div>
-                    </template>
-                </el-table-column>
+      <el-header>
+        <div id="step1">
+          <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+          </mySearch>
+        </div>
+        <div>
+          <el-button type="primary" size="small" @click="saveCheckList" v-if="isChoose">保存</el-button>
+          <el-button type="primary" size="small" @click="choseProduct" v-else>添加</el-button>
+        </div>
+      </el-header>
+      <el-main v-DivHeight="getDivHeight">
+        <el-table :data="tableData" header-row-class-name="custom-table-header" v-if="showTable" v-loading="loading"
+          :maxHeight="tableHeight - 35" @sort-change="sortChange" border>
+          <el-table-column label="#" width="60" type="index" align="center">
+            <template slot-scope="scope">
+              <div v-if="isChoose">
+                <el-checkbox-group v-model="checkList">
+                  <el-checkbox :label="scope.row.id">
+                    <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+                  </el-checkbox>
+                </el-checkbox-group>
 
-                <el-table-column v-for="item in column" :render-header="$commonJS.renderHeaderMethods" :key="item.value" :prop="item.value" :label="item.name" align="center" sortable="custom">
-                    <template slot-scope="scope">
-                    <div v-if="['name'].includes(item.value)">
-                        <el-link @click="handleItem(scope.row, '2')" type="primary">
-                        <span  v-html="$commonJS.getColumnData(scope.row, item)"></span>
-                        </el-link>
-                    </div>
-                    <div v-else v-html="$commonJS.getColumnData(scope.row, item)">
-                    </div>
-                    </template>
-                </el-table-column>
-                <el-table-column label="操作" align="center" width="150px">
-                    <template slot-scope="scope">
-                    <el-dropdown split-button type="primary" size="small" @click="handleCommand('0', scope.row)"
-                        @command="handleCommand($event, scope.row)">
-                        <span>编 辑</span>
-                        <el-dropdown-menu slot="dropdown" style="text-align:center">
-                        <el-dropdown-item command="1">预览图片</el-dropdown-item>
-                        <el-dropdown-item command="2">产品架构</el-dropdown-item>
-                        <el-dropdown-item command="3">产品的营销数据</el-dropdown-item>
-                        <el-dropdown-item command="4">营销数据的趋势图</el-dropdown-item>
-                        <el-dropdown-item command="5">专利布局可视化</el-dropdown-item>
-                        <el-dropdown-item command="6">商品化专利</el-dropdown-item>
-                        <el-dropdown-item command="7" divided style="color:red">删 除</el-dropdown-item>
-                        </el-dropdown-menu>
-                    </el-dropdown>
-                    </template>
-                </el-table-column>
-                </el-table>
-        </el-main>
-        <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" :total="total">
-            </el-pagination>
-        </el-footer>
+              </div>
+              <div v-else>
+                <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+              </div>
+            </template>
+          </el-table-column>
+
+          <el-table-column v-for="item in column" :render-header="$commonJS.renderHeaderMethods" :key="item.value"
+            :prop="item.value" :label="item.name" align="center" sortable="custom">
+            <template slot-scope="scope">
+              <div v-if="['name'].includes(item.value)">
+                <el-link @click="handleItem(scope.row, '2')" type="primary">
+                  <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
+                </el-link>
+              </div>
+              <div v-else v-html="$commonJS.getColumnData(scope.row, item)">
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="150px">
+            <template slot-scope="scope">
+              <el-dropdown split-button type="primary" size="small" @click="handleCommand('0', scope.row)"
+                @command="handleCommand($event, scope.row)">
+                <span>编 辑</span>
+                <el-dropdown-menu slot="dropdown" style="text-align:center">
+                  <el-dropdown-item command="1">预览图片</el-dropdown-item>
+                  <el-dropdown-item command="2">产品架构</el-dropdown-item>
+                  <el-dropdown-item command="3">产品的营销数据</el-dropdown-item>
+                  <el-dropdown-item command="4">营销数据的趋势图</el-dropdown-item>
+                  <el-dropdown-item command="5">专利布局可视化</el-dropdown-item>
+                  <el-dropdown-item command="6">商品化专利</el-dropdown-item>
+                  <el-dropdown-item command="7" divided style="color:red">删 除</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-main>
+      <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" :total="total">
+        </el-pagination>
+      </el-footer>
     </el-container>
 
-    <el-dialog title="选择产品或产品类别" :visible.sync="productVisible" width="1000px" :append-to-body="true" :close-on-click-modal="false" destroy-on-close :before-close="closeProduct">
+    <el-dialog title="选择产品或产品类别" :visible.sync="productVisible" width="1000px" :append-to-body="true"
+      :close-on-click-modal="false" destroy-on-close :before-close="closeProduct">
       <div style="height:550px">
         <productManage :isChoose="true" @chooseList="chooseList"></productManage>
       </div>
@@ -85,125 +90,159 @@ import product from '@/views/product/components/mixins/product'
 import marketing from '@/views/product/components/dialog/marketing.vue'
 import addEditProduct from '@/views/product/components/dialog/addEditProduct.vue'
 export default {
-  name:'productManage',
+  name: 'productManage',
   components: {
     marketing,
     addEditProduct,
   },
   props: {
-    patentNo:{},
-    isChoose:{
-      default:null
+    patentNo: {},
+    // 弹窗会传递true
+    isChoose: {
+      default: null
     }
   },
-  mixins:[getTableHeight,mixins,fun,product],
+  mixins: [getTableHeight, mixins, fun, product],
   data() {
     return {
-        loading:false,
-        showTable:true,
-        column:[
-          {
-            value:'name',
-            type:'String',
-            name:'类别名称'
-          },
-          {
-            value:'marketTime',
-            type:'DateTime',
-            name:'上市时间'
-          },
-          {
-            value:'companyName',
-            type:'String',
-            name:'所属公司'
-          },
-          {
-            value:'licenseRate',
-            type:'String',
-            name:'许可费率'
-          },
-          {
-            value:'description',
-            type:'String',
-            name:'产品说明'
-          },
-          {
-            value:'createName',
-            type:'String',
-            name:'创建人'
-          },
-          {
-            value:'createTime',
-            type:'DataTime',
-            name:'创建时间'
-          },
-        ],
-        searchFiled:[],
-        //检索条件
-        searchOption: {},
-        queryParams:{
-            size:10,
-            current:1
+      loading: false,
+      showTable: true,
+      column: [
+        {
+          value: 'name',
+          type: 'String',
+          name: '类别名称'
+        },
+        {
+          value: 'marketTime',
+          type: 'DateTime',
+          name: '上市时间'
+        },
+        {
+          value: 'companyName',
+          type: 'String',
+          name: '所属公司'
+        },
+        {
+          value: 'licenseRate',
+          type: 'String',
+          name: '许可费率'
         },
-        total:0,
-        tableData:[],
-        // 排序数组
-        sort: [
-            {
-            "orderBy": "createTime",
-            "orderType": 1
-            }
-        ],
-        productVisible:false,
-        checkList:[]
+        {
+          value: 'description',
+          type: 'String',
+          name: '产品说明'
+        },
+        {
+          value: 'createName',
+          type: 'String',
+          name: '创建人'
+        },
+        {
+          value: 'createTime',
+          type: 'DataTime',
+          name: '创建时间'
+        },
+      ],
+      searchFiled: [],
+      //检索条件
+      searchOption: {},
+      queryParams: {
+        size: 10,
+        current: 1
+      },
+      total: 0,
+      tableData: [],
+      // 排序数组
+      sort: [
+        {
+          "orderBy": "createTime",
+          "orderType": 1
+        }
+      ],
+      // 控制弹窗的开关
+      productVisible: false,
+      // 选择的产品数组
+      checkList: [],
     };
   },
   watch: {
-    patentNo(){
-        this.getList()
+    patentNo() {
+      this.getList()
     }
   },
   computed: {},
-  created() {},
+  created() { },
   mounted() {
     this.getList()
   },
   methods: {
-    saveCheckList(){
-      this.$emit('chooseList',this.checkList)
+    ifChoose() {
+      if (this.isChoose) {
+        this.getList()
+      } else {
+        this.getPatentProduct()
+      }
     },
-    chooseList(val){
-      this.closeProduct()
+    saveCheckList() {
+      this.$emit('chooseList', this.checkList)
+    },
+    // 传递过来的需要保存到此专利的产品数据
+    chooseList(val) {
+      let params = {
+        productIds: val,
+        patentNos:this.patentNo
+      }
+      this.$api.addProductPatent(params).then(res => {
+        if (res.code == 200) {
+          this.getPatentProduct()
+          this.closeProduct()
+        }
+      })
+      
+    },
+    getPatentProduct() {
+      let params = {
+        patentNo: this.patentNo,
+        
+      }
+      this.$api.query(params).then(res => {
+        if (res.code == 200) {
+          
+        }
+      })
     },
     //打开选择产品或产品类别弹窗
-    choseProduct(){
+    choseProduct() {
       this.productVisible = true
     },
     //关闭弹窗
-    closeProduct(){
+    closeProduct() {
+      this.checkList=[]
       this.productVisible = false
     },
     //获取检索条件检索
     search(val) {
-        let params = {}
-        if(val.length>0){
-            val.forEach(item => {
-                if (item.type == 3) {
-                    params[item.value]=item.searchValue.map(itemValue => {
-                    return itemValue.value
-                    })
-                } else {
-                    params[item.value]=item.searchValue.label
-                }
+      let params = {}
+      if (val.length > 0) {
+        val.forEach(item => {
+          if (item.type == 3) {
+            params[item.value] = item.searchValue.map(itemValue => {
+              return itemValue.value
             })
-        }
-        this.searchOption = this.$commonJS.ArrayToArray(val)
-        this.queryParams.current = 1
-        this.getList()
+          } else {
+            params[item.value] = item.searchValue.label
+          }
+        })
+      }
+      this.searchOption = this.$commonJS.ArrayToArray(val)
+      this.queryParams.current = 1
+      this.getList()
     },
-    getList(){
+    // 获取所有产品
+    getList() {
       var str = this.$commonJS.objectToString(this.searchOption)
-      if(!this.isChoose){
+      if (!this.isChoose) {
         str = str + `patentNo=${this.patentNo}`
       }
       var params = {
@@ -212,62 +251,64 @@ export default {
         orderDTOList: this.sort,
       }
       this.loading = true
-      this.$api.queryProduct(params).then(response=>{
-        if(response.code == 200){
+      this.$api.queryProduct(params).then(response => {
+        if (response.code == 200) {
           this.tableData = response.data.data
           this.total = response.data.total
           this.loading = false
         }
-      }).catch(error=>{
+      }).catch(error => {
         this.tableData = []
         this.total = 0
         this.loading = false
       })
     },
-    handleCurrentChange(val){
-        this.queryParams.current = val
-        this.getList()
+    // 分页信息
+    handleCurrentChange(val) {
+      this.queryParams.current = val
+      this.getList()
     },
-    async handleCommand( option, row ){
-        if(!(await this.$permission.producePermission(row.id,2))){
-            this.$showPermissionDialog()
-            return false
-        }
-        switch (option) {
-            case '0'://编辑
-                this.$refs.addEditProduct.open(row)
-            break;
-            case '1'://预览图片
-                this.checkImage(row)
-            break;
-            case '2'://产品架构
-                this.toFramework(row,2)
-            break;
-            case '3'://产品的营销数据
-                this.$refs.marketing.open(row)
-            break;
-            case '4'://产品的营销数据趋势图
-                this.showTrend(row,2)
-            break;
-            case '5'://专利布局可视化
+    // 编辑产品相关的下拉菜单
+    async handleCommand(option, row) {
+      if (!(await this.$permission.producePermission(row.id, 2))) {
+        this.$showPermissionDialog()
+        return false
+      }
+      switch (option) {
+        case '0'://编辑
+          this.$refs.addEditProduct.open(row)
+          break;
+        case '1'://预览图片
+          this.checkImage(row)
+          break;
+        case '2'://产品架构
+          this.toFramework(row, 2)
+          break;
+        case '3'://产品的营销数据
+          this.$refs.marketing.open(row)
+          break;
+        case '4'://产品的营销数据趋势图
+          this.showTrend(row, 2)
+          break;
+        case '5'://专利布局可视化
 
-            break;
-            case '6'://商品化专利
-                this.toCommodity(row)
-            break;
-            case '7'://删除产品
-                this.deletes(row)
-            break;
-            
-            default:
-            break;
-        }
+          break;
+        case '6'://商品化专利
+          this.toCommodity(row)
+          break;
+        case '7'://删除产品
+          this.deletes(row)
+          break;
+
+        default:
+          break;
+      }
     },
     // 排序方法
     sortChange({ column, prop, order }) {
       //如需要多个字段排序,则不需要清空
       var params = {
-        sort:this.sort,
+        sort: this.sort,
         column,
         prop,
         order,
@@ -278,5 +319,4 @@ export default {
   },
 };
 </script>
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>