Procházet zdrojové kódy

Merge branch 'dev' of http://1.116.113.26:8088/zhuliu/RMS-FrontEnd into dev

zhuhao před 2 roky
rodič
revize
876f35fa37

+ 6 - 1
RMS-FrontEnd/src/api/product.js

@@ -202,7 +202,12 @@ PatentWorth(params) {
     return axios.post('/v2/patent/showTrend', params)
 },
 
-
+/**
+ * 批量关联产品和专利
+*/
+PatentAndProduct(params) {
+    return axios.post('/v2/products/addNewAssoProductPatent', params)
+},
 }
 
 

+ 1 - 1
RMS-FrontEnd/src/views/components/articles/ContrastIndex.vue

@@ -191,7 +191,7 @@ export default {
         },
         {
           value:'ProductManage',
-          label:'相关产品'
+          label:'商品化'
         },
         {
           value:'patentWorth',

+ 1 - 1
RMS-FrontEnd/src/views/components/articles/index.vue

@@ -299,7 +299,7 @@ export default {
         },
         {
           value:'ProductManage',
-          label:'相关产品'
+          label:'商品化'
         },
         {
           value:'patentWorth',

+ 83 - 10
RMS-FrontEnd/src/views/product/components/product.vue

@@ -6,8 +6,9 @@
         <el-input v-model="queryParams.productName" size="small" placeholder="请输入产品名称" style="width: 200px;margin-right: 10px;"></el-input>
         <el-input v-model="queryParams.companyName" size="small" placeholder="请输入产品所属公司名称" style="width: 200px;margin-right: 10px;"></el-input>
           <el-button type="primary" size="small" @click="getList2">查询</el-button>
-          <el-button type="primary" size="small" @click="handleAdd" v-if="$permission('/workspace/product/addCategory')">新增类别</el-button>
-          <el-dropdown @command="handleCommandAdd">
+          <el-button type="primary" size="small" @click="handleAdd" v-if="(!patentNo||sign==2) && $permission('/workspace/product/addCategory')">新增类别</el-button>
+          <el-button type="primary" size="small" @click="addProduct" v-if="patentNo&&sign!=2">添加</el-button>
+          <el-dropdown @command="handleCommandAdd" v-if="!patentNo||sign==2">
             <el-button type="primary" size="small">
               新增产品<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
@@ -16,6 +17,7 @@
               <el-dropdown-item command="2">新增外公司产品</el-dropdown-item>
             </el-dropdown-menu>
          </el-dropdown>
+         <el-button type="primary" size="small" @click="submitProduct" v-if="sign==2" style="margin-left:10px">保存</el-button>
       </div>
       <div style="display: flex;">
         <span style="margin-right: 10px;">分组查询:</span>
@@ -33,7 +35,22 @@
       header-row-class-name="custom-table-header"
       @sort-change="sortChange"
       style="width: 100%">
-      <!-- type="expand"开启后展开行 -->
+      <el-table-column label="#" align="center" v-if="sign == 2">
+        <template slot-scope="scope">
+          <div>
+            <el-checkbox-group
+                v-model="productIds"
+                style="display: inline-block"
+              >
+                <el-checkbox
+                  :label="scope.row.id"
+                >
+                  <span></span>
+                </el-checkbox>
+              </el-checkbox-group>
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column prop="productName" label="产品名称" sortable="custom" align="center">
           <template slot-scope="scope">
             <div class="items">
@@ -84,7 +101,7 @@
       </el-table-column>
     </el-table>
     <!-- 折叠面板 -->
-    <productCollapse v-else :tableData="tableData" :sign="sign" @editCollapse="handleEditCollapse" @deleteCollapse="deleteCollapse" @sortCollapse="sortCollapse" @categoryEdit="categoryEdit" @rowClickName="rowClick"></productCollapse>
+    <productCollapse v-else :tableData="tableData" :sign="sign" :productIdList.sync="productIds" @editCollapse="handleEditCollapse" @deleteCollapse="deleteCollapse" @sortCollapse="sortCollapse" @categoryEdit="categoryEdit" @rowClickName="rowClick"></productCollapse>
     <!-- 分页 -->
     <div style="display: flex;justify-content: center; margin-top: 20px;">
       <el-pagination
@@ -146,7 +163,7 @@
               <i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview"></i>
               <i class="el-icon-delete" @click.stop="handleRemove"></i></span>
             </span>
-            <el-image ref="image" style="width:100%;height: 100%;" :src="productForm.pictures[0].id? $p2 + productForm.pictures[0].url:productForm.pictures[0].url" :preview-src-list="productForm.pictures"></el-image>
+            <el-image ref="image" style="width:100%;height: 100%;" :src="productForm.pictures[0].id? $p + productForm.pictures[0].url:productForm.pictures[0].url" :preview-src-list="productForm.pictures"></el-image>
           </span>
           <i v-else class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
@@ -174,12 +191,12 @@
       append-to-body
       :close-on-click-modal="false"
       :before-close="categoryClose">
-      <el-form :rules="categoryRules" ref="categoryForm" :model="categoryForm" label-width="110">
+      <el-form :rules="categoryRules" ref="categoryForm" :model="categoryForm" label-width="110px">
         <el-form-item label="名称 " prop="productCategoryName">
           <el-input v-model="categoryForm.productCategoryName" placeholder="请输入名称"></el-input>
         </el-form-item>
         <el-form-item label="参考许可费率 " prop="licenseRate">
-          <el-input v-model="categoryForm.licenseRate" placeholder="请输入参考许可费率(许可费率介于0-1之间)"></el-input>
+          <el-input v-model="categoryForm.licenseRate" placeholder="请输入参考许可费率(参考许可费率介于0-1之间)"></el-input>
         </el-form-item>
         <el-form-item label="图片 ">
           <el-upload ref="upload"  action="#" :auto-upload="false"  :on-change="handleChange1"  list-type="picture" :show-file-list="false">
@@ -190,7 +207,7 @@
                   <i class="el-icon-delete" @click.stop="handleRemove"></i>
                 </span>
               </span>
-                <el-image ref="image" style="width:100%;height: 100%;" :src="categoryForm.pictures[0].id?$p2 + categoryForm.pictures[0].url:categoryForm.pictures[0].url" :preview-src-list="categoryForm.pictures"></el-image>
+                <el-image ref="image" style="width:100%;height: 100%;" :src="categoryForm.pictures[0].id?$p + categoryForm.pictures[0].url:categoryForm.pictures[0].url" :preview-src-list="categoryForm.pictures"></el-image>
             </span>
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
           </el-upload>
@@ -205,18 +222,37 @@
         <el-button type="primary" @click="categorySure">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      title="产品清单"
+      :visible.sync="ProductVisible"
+      width="1300px"
+      append-to-body
+      :close-on-click-modal="false"
+      :before-close="ProductClose">
+      <div>
+        <productDialog :sign="2" :patentNo="patentNo" @submit="getSubmitStatus" v-if="ProductVisible"></productDialog>
+      </div>
+      
+      <!-- <span slot="footer" class="dialog-footer">
+        <el-button @click="categoryClose">取 消</el-button>
+        <el-button type="primary" @click="categorySure">确 定</el-button>
+      </span> -->
+    </el-dialog>
   </div>
 </template>
 
 <script>
+import productDialog from './product.vue'
 import MarketingData from './marketingData.vue'
 import productCollapse from './productCollapse.vue'
 import { commonMethods } from './mixins'
 export default {
+  name:'productDialog',
   props:['clientName','sign','patentNo'],
   components:{
     MarketingData,
     productCollapse,
+    productDialog
   },
   mixins:[commonMethods],
   data() {
@@ -238,6 +274,8 @@ export default {
       }
     }
     return {
+      ProductVisible:false,
+      productIds:[],
       input: '',
       rowData:{},
       left:'left',
@@ -276,7 +314,7 @@ export default {
   },
   computed: {
     userinfo() {
-      return this.$store.state.admin.userinfo
+      return this.$store.state.user.userinfo
     }
   },
   watch:{
@@ -292,6 +330,34 @@ export default {
     await this.getListCategory()
   },
   methods: {
+    //打开选择产品弹窗
+    addProduct(){
+      this.ProductVisible = true
+    },
+    //关闭选择产品弹窗
+    ProductClose(){
+      
+      this.ProductVisible = false
+    },
+    //保存选择的产品
+    submitProduct(){
+      var params={
+        patentNos:this.patentNo,
+        productIds:this.productIds
+      }
+      this.$api.PatentAndProduct(params).then(response=>{
+        if(response.code == 200){
+          this.productIds = []
+          this.$emit('submit',true)
+        }
+      })
+    },
+    getSubmitStatus(val){
+      if(val){
+        this.ProductClose()
+        this.getList()
+      }
+    },
     // 面板的产品类别编辑
     categoryEdit(row) {
       this.categoryCommand('1',row)
@@ -400,6 +466,9 @@ export default {
     },
     //查询产品
     async getList() { 
+      if(this.sign == 2){
+        this.queryParams.patentNo = null
+      }
       await this.$api.queryProducts(this.queryParams).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.list
@@ -521,7 +590,7 @@ export default {
     previewPictures(row) {
       if (row.pictures && row.pictures.length>0) {
               var item = row.pictures[0]//图片每条信息
-              var FileUrl = this.$p2 + row.pictures[0].url//每张图片的url
+              var FileUrl = this.$p + row.pictures[0].url//每张图片的url
               var isPicture = 1
               const router = this.$router.resolve({
                     path: '/checkFile',
@@ -577,6 +646,9 @@ export default {
              this.$api.addNewProducts(formData).then(res => {
               if (res.code == 200) {
                 this.$message.success("新增产品成功")
+                if(this.sign == 1){
+                  this.$emit('productId',false)
+                }
                 this.getList()
                 this.close()
               }
@@ -617,6 +689,7 @@ export default {
       this.$set(this.categoryForm,'pictures', [{url:file.url}])
       this.file=[file.raw]
     },
+   
   },
 }
 </script>

+ 28 - 2
RMS-FrontEnd/src/views/product/components/productCollapse.vue

@@ -8,6 +8,23 @@
             header-row-class-name="custom-table-header"
             @sort-change="sortChange"
             style="width: 100% ;padding: 20px;">
+            <el-table-column label="#" align="center" v-if="sign==2">
+              <template slot-scope="scope">
+                <div>
+                  <el-checkbox-group
+                      v-model="checkList"
+                      style="display: inline-block"
+                    >
+                      <el-checkbox
+                        :label="scope.row.id"
+                        @change="changeSelect(scope.row)"
+                      >
+                        <span></span>
+                      </el-checkbox>
+                    </el-checkbox-group>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column prop="productName" label="产品名称" sortable="custom" align="center">
                 <template slot-scope="scope">
                   <div class="items">
@@ -70,20 +87,29 @@
 import MarketingData from './marketingData.vue'
 import { commonMethods } from './mixins'
 export default {
-  props: ['tableData', 'sign'],
+  props: ['tableData', 'sign','productIdList'],
   mixins:[commonMethods],
   components:{
     MarketingData,
   },
   data() {
     return {
+      checkList:[],
       activeNames: [],
       rowData: {},
       title:'',
       MarketVisible:false,
     };
   },
+  watch:{
+    productIdList(val){
+      this.checkList = val
+    }
+  },
   methods: {
+    changeSelect(row){
+      this.productIdList.push(row.id)
+    },
         // 类别操作
     categoryCommand(command,row) {
       switch (command) {
@@ -137,7 +163,7 @@ export default {
     previewPictures(row) {
       if (row.pictures && row.pictures.length>0) {
               var item = row.pictures[0]//图片每条信息
-              var FileUrl = this.$p2 + row.pictures[0].url//每张图片的url
+              var FileUrl = this.$p + row.pictures[0].url//每张图片的url
               var isPicture = 1
               const router = this.$router.resolve({
                     path: '/checkFile',

+ 24 - 3
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/ContrasrProduct.vue

@@ -75,6 +75,7 @@
 
                 <div style="  position: relative;">
                   <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined"
+                  v-if="$permission('/workspace/patent/worth')?true:item.value !='patentWorth'"
                     :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument') : false"
                     @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
                   <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined"
@@ -161,6 +162,10 @@ import sendCollaboration from "@/views/report/components/sendCollaboration.vue"
 
 import ProductMessage from './ProductMessage.vue'
 
+import Permit from '@/views/components/articles/components/history/permit.vue'
+import ProductManage2 from '@/views/product/components/product.vue'
+import PatentWorth from '@/views/components/articles/components/history/components/echarts/components/echarts.vue'
+
 export default {
   mixins: [patentKeywordsHighlight, changeTranslation],
   props: ['patentNo', 'taskId1', 'location', "taskWorkRemak",'state',"reportId1","coordination",'isShow'],
@@ -187,7 +192,11 @@ export default {
     Other,
     sendCollaboration,
     // Product,
-    ProductMessage
+    ProductMessage,
+    Permit,
+    ProductManage2,
+    PatentWorth
+
   },
   data() {
     return {
@@ -262,10 +271,22 @@ export default {
           value: 'PatentPDF',
           label: '说明书'
         },
+        // {
+        //   value: 'PatentExport',
+        //   label: '导出文档'
+        // },
+        {
+          value:'Permit',
+          label:'许可历史'
+        },
         {
-          value: 'PatentExport',
-          label: '导出文档'
+          value:'ProductManage2',
+          label:'商品化'
         },
+        {
+          value:'patentWorth',
+          label:'价值曲线'
+        }
       ],
       menuList2: [
         // {

+ 21 - 3
RMS-FrontEnd/src/views/report/FTO/FTOPage/components/patentMessage.vue

@@ -24,7 +24,7 @@
                 </div>
                
                 <div  style="  position: relative;">
-                    <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
+                    <el-link v-for="item in menuList" :type="activeMenu === item.value ? 'primary' : undefined" v-if="$permission('/workspace/patent/worth')?true:item.value !='patentWorth'" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
                   <el-link v-for="item in menuList2" :type="activeMenu === item.value ? 'primary' : undefined" :disabled="item.value === 'PatentExport' ? !$permission('/workspace/details/exportDocument'): false " @click.native="handleSelect(item.value)">{{ item.label }}</el-link>
                   <el-tooltip class="item" effect="dark"  :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top" v-if="showcard==true">
                     <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px;position: absolute; right: 10px; margin-top: 5px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight"></i>
@@ -93,6 +93,9 @@ import { getPatentCountry } from "@/utils";
 import Import from '@/views/components/import/index.vue'
 import Features from '@/views/components/articles/components/features.vue'
     
+import Permit from '@/views/components/articles/components/history/permit.vue'
+import ProductManage from '@/views/product/components/product.vue'
+import PatentWorth from '@/views/components/articles/components/history/components/echarts/components/echarts.vue'
     export default {
       mixins: [patentKeywordsHighlight, changeTranslation],
       components: {
@@ -115,6 +118,9 @@ import Features from '@/views/components/articles/components/features.vue'
             Invalid,
             Litigation,
             Other,
+            Permit,
+            ProductManage,
+            PatentWorth
       },
   props: ['reportId', 'patentMessage', 'publicNo','taskId',"patentStatus2A","switchValue"],
     //   props:{
@@ -170,10 +176,22 @@ import Features from '@/views/components/articles/components/features.vue'
           value: 'PatentPDF',
           label: '说明书'
         },
+        // {
+        //   value: 'PatentExport',
+        //   label: '导出文档'
+        // },
+        {
+          value:'Permit',
+          label:'许可历史'
+        },
         {
-          value: 'PatentExport',
-          label: '导出文档'
+          value:'ProductManage',
+          label:'商品化'
         },
+        {
+          value:'patentWorth',
+          label:'价值曲线'
+        }
       ],
       menuList2: [
         {