Просмотр исходного кода

Merge branch 'dev' of licailing/zhirongip into master

panhui 4 лет назад
Родитель
Сommit
cd5212b897
100 измененных файлов с 1221 добавлено и 568 удалено
  1. 4 3
      src/main/java/com/izouma/zhirongip/domain/demand/CopyrightDemand.java
  2. 4 3
      src/main/java/com/izouma/zhirongip/domain/demand/LogoDemand.java
  3. 11 14
      src/main/java/com/izouma/zhirongip/domain/demand/PatentDemand.java
  4. 4 2
      src/main/java/com/izouma/zhirongip/domain/demand/TechProductDemand.java
  5. 25 9
      src/main/java/com/izouma/zhirongip/domain/resource/Digital.java
  6. 27 28
      src/main/java/com/izouma/zhirongip/domain/resource/IntellectualProperty.java
  7. 5 6
      src/main/java/com/izouma/zhirongip/domain/supply/Copyright.java
  8. 5 6
      src/main/java/com/izouma/zhirongip/domain/supply/Logo.java
  9. 16 15
      src/main/java/com/izouma/zhirongip/domain/supply/Patent.java
  10. 7 7
      src/main/java/com/izouma/zhirongip/domain/supply/TechnicalManager.java
  11. 4 2
      src/main/java/com/izouma/zhirongip/domain/supply/TechnologyProduct.java
  12. 97 0
      src/main/java/com/izouma/zhirongip/dto/IntellectualPropertyDTO.java
  13. 41 0
      src/main/java/com/izouma/zhirongip/dto/ProductDTO.java
  14. 35 0
      src/main/java/com/izouma/zhirongip/dto/TechnologyDTO.java
  15. 8 3
      src/main/java/com/izouma/zhirongip/enums/PatentStatus.java
  16. 9 4
      src/main/java/com/izouma/zhirongip/enums/PatentType.java
  17. 12 6
      src/main/java/com/izouma/zhirongip/enums/TechTradingMethod.java
  18. 12 7
      src/main/java/com/izouma/zhirongip/enums/TradingMethod.java
  19. 4 1
      src/main/java/com/izouma/zhirongip/service/demand/CopyrightDemandService.java
  20. 1 1
      src/main/java/com/izouma/zhirongip/service/demand/FundingService.java
  21. 5 1
      src/main/java/com/izouma/zhirongip/service/demand/LogoDemandService.java
  22. 10 1
      src/main/java/com/izouma/zhirongip/service/demand/PatentDemandService.java
  23. 6 1
      src/main/java/com/izouma/zhirongip/service/demand/TechProductDemandService.java
  24. 86 3
      src/main/java/com/izouma/zhirongip/service/resource/DigitalService.java
  25. 85 1
      src/main/java/com/izouma/zhirongip/service/resource/IntellectualPropertyService.java
  26. 9 1
      src/main/java/com/izouma/zhirongip/service/supply/CopyrightService.java
  27. 11 1
      src/main/java/com/izouma/zhirongip/service/supply/LogoService.java
  28. 28 3
      src/main/java/com/izouma/zhirongip/service/supply/PatentService.java
  29. 5 2
      src/main/java/com/izouma/zhirongip/service/supply/TechnologyProductService.java
  30. 4 0
      src/main/java/com/izouma/zhirongip/web/demand/CopyrightDemandController.java
  31. 4 0
      src/main/java/com/izouma/zhirongip/web/demand/LogoDemandController.java
  32. 12 0
      src/main/java/com/izouma/zhirongip/web/demand/PatentDemandController.java
  33. 4 0
      src/main/java/com/izouma/zhirongip/web/demand/TechProductDemandController.java
  34. 43 4
      src/main/java/com/izouma/zhirongip/web/resource/DigitalController.java
  35. 26 7
      src/main/java/com/izouma/zhirongip/web/resource/IntellectualPropertyController.java
  36. 4 0
      src/main/java/com/izouma/zhirongip/web/supply/TechnologyProductController.java
  37. 72 0
      src/main/vue/src/components/ExcelUpload.vue
  38. 16 1
      src/main/vue/src/components/select/ModeSelect.vue
  39. 0 1
      src/main/vue/src/components/select/ModeSelect2.vue
  40. 3 0
      src/main/vue/src/main.js
  41. 20 1
      src/main/vue/src/mixins/tradingMethod.js
  42. 27 27
      src/main/vue/src/views/demand/CopyrightDemandEdit.vue
  43. 5 5
      src/main/vue/src/views/demand/CopyrightDemandList.vue
  44. 19 15
      src/main/vue/src/views/demand/GeneralPatentDemandList.vue
  45. 3 3
      src/main/vue/src/views/demand/LogoDemandEdit.vue
  46. 4 4
      src/main/vue/src/views/demand/LogoDemandList.vue
  47. 33 31
      src/main/vue/src/views/demand/PatentDemandEdit.vue
  48. 4 4
      src/main/vue/src/views/demand/PatentDemandList.vue
  49. 7 5
      src/main/vue/src/views/demand/ProductDemandList.vue
  50. 5 5
      src/main/vue/src/views/demand/SoftCopyrightDemandList.vue
  51. 18 12
      src/main/vue/src/views/demand/TechProductDemandEdit.vue
  52. 7 5
      src/main/vue/src/views/demand/TechnologyDemandList.vue
  53. 4 3
      src/main/vue/src/views/resource/DigitalList.vue
  54. 5 4
      src/main/vue/src/views/resource/DigitalProductList.vue
  55. 38 13
      src/main/vue/src/views/resource/IntellectualPropertyEdit.vue
  56. 14 11
      src/main/vue/src/views/resource/IntellectualPropertyList.vue
  57. 25 25
      src/main/vue/src/views/supply/CopyrightEdit.vue
  58. 5 6
      src/main/vue/src/views/supply/CopyrightList.vue
  59. 2 2
      src/main/vue/src/views/supply/LogoEdit.vue
  60. 5 6
      src/main/vue/src/views/supply/LogoList.vue
  61. 14 28
      src/main/vue/src/views/supply/PatentEdit.vue
  62. 6 6
      src/main/vue/src/views/supply/ProductList.vue
  63. 6 6
      src/main/vue/src/views/supply/TechnologyList.vue
  64. 9 12
      src/main/vue/src/views/supply/TechnologyProductEdit.vue
  65. 2 10
      src/main/zhi-rong-web/src/components/PageHeader.vue
  66. 1 11
      src/main/zhi-rong-web/src/components/list/CopyrightDemandRow.vue
  67. 1 8
      src/main/zhi-rong-web/src/components/list/TechProductDemandRow.vue
  68. 4 3
      src/main/zhi-rong-web/src/components/popup/CopyrightAdd.vue
  69. 5 4
      src/main/zhi-rong-web/src/components/popup/CopyrightDemandAdd.vue
  70. 4 3
      src/main/zhi-rong-web/src/components/popup/LogoAdd.vue
  71. 4 3
      src/main/zhi-rong-web/src/components/popup/LogoDemandAdd.vue
  72. 1 0
      src/main/zhi-rong-web/src/components/popup/Message.vue
  73. 10 9
      src/main/zhi-rong-web/src/components/popup/PatentAdd.vue
  74. 11 10
      src/main/zhi-rong-web/src/components/popup/PatentDemandAdd.vue
  75. 6 5
      src/main/zhi-rong-web/src/components/popup/TechProductDemandAdd.vue
  76. 6 5
      src/main/zhi-rong-web/src/components/popup/TechnologyProductAdd.vue
  77. 33 8
      src/main/zhi-rong-web/src/mixins/common.js
  78. 22 0
      src/main/zhi-rong-web/src/utils/getVariables.js
  79. 2 14
      src/main/zhi-rong-web/src/utils/variables.js
  80. 2 2
      src/main/zhi-rong-web/src/views/detail/IntellectualProperty.vue
  81. 0 6
      src/main/zhi-rong-web/src/views/detail/Patent.vue
  82. 3 3
      src/main/zhi-rong-web/src/views/legal/IntellectualProperty.vue
  83. 1 1
      src/main/zhi-rong-web/src/views/market/Copyright.vue
  84. 1 1
      src/main/zhi-rong-web/src/views/market/CopyrightDemand.vue
  85. 1 1
      src/main/zhi-rong-web/src/views/market/Logo.vue
  86. 1 1
      src/main/zhi-rong-web/src/views/market/LogoDemand.vue
  87. 13 38
      src/main/zhi-rong-web/src/views/market/Patent.vue
  88. 4 4
      src/main/zhi-rong-web/src/views/market/PatentDemand.vue
  89. 2 2
      src/main/zhi-rong-web/src/views/market/TechProductDemand.vue
  90. 2 2
      src/main/zhi-rong-web/src/views/market/TechnologyProduct.vue
  91. 3 3
      src/main/zhi-rong-web/src/views/user/Demandpatent.vue
  92. 0 9
      src/main/zhi-rong-web/src/views/user/UserMain.vue
  93. 4 3
      src/main/zhi-rong-web/src/views/user/publish/CopyrightDemandEdit.vue
  94. 1 0
      src/main/zhi-rong-web/src/views/user/publish/CopyrightEdit.vue
  95. 1 0
      src/main/zhi-rong-web/src/views/user/publish/FundingEdit.vue
  96. 3 2
      src/main/zhi-rong-web/src/views/user/publish/Index.vue
  97. 1 0
      src/main/zhi-rong-web/src/views/user/publish/LogoEdit.vue
  98. 10 9
      src/main/zhi-rong-web/src/views/user/publish/PatentEdit.vue
  99. 1 0
      src/main/zhi-rong-web/src/views/user/publish/ServiceProviderEdit.vue
  100. 6 5
      src/main/zhi-rong-web/src/views/user/publish/TechProductDemandEdit.vue

+ 4 - 3
src/main/java/com/izouma/zhirongip/domain/demand/CopyrightDemand.java

@@ -53,10 +53,11 @@ public class CopyrightDemand extends BaseEntity {
     /*
     服务没有
      */
-    @ExcelProperty(value = "转移转化方式", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
     @ApiModelProperty(value = "转移转化方式")
-    private TradingMethod mode;
+    private Long modeId;
 
     /*
     (万元)

+ 4 - 3
src/main/java/com/izouma/zhirongip/domain/demand/LogoDemand.java

@@ -51,10 +51,11 @@ public class LogoDemand extends BaseEntity {
     @ApiModelProperty(value = "需求描述")
     private String description;
 
-    @ExcelProperty(value = "转移转化方式", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
     @ApiModelProperty(value = "转移转化方式")
-    private TradingMethod mode;
+    private Long modeId;
 
     /**
      *(万元)

+ 11 - 14
src/main/java/com/izouma/zhirongip/domain/demand/PatentDemand.java

@@ -41,20 +41,19 @@ public class PatentDemand extends BaseEntity {
     /*
     脱密专利没有
      */
-    @Enumerated(EnumType.STRING)
     @ApiModelProperty(value = "专利类型")
-    private PatentType patentType;
+    private String patentType;
+    @ApiModelProperty(value = "专利类型")
+    private Long patentTypeId;
 
     /*
     脱密专利没有
      */
-    @EnumFormat(value = PatentStatus.class,
-            fromExcel = {"申请中", "已授权未期满"},
-            toJavaEnum = {"APPLY", "AUTHORISED"})
-    @ExcelProperty(value = "商标类型", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
     @ApiModelProperty(value = "专利状态")
-    private PatentStatus patentStatus;
+    private String patentStatus;
+    @ApiModelProperty(value = "专利状态")
+    private Long patentStatusId;
 
     /*
     setting
@@ -69,13 +68,11 @@ public class PatentDemand extends BaseEntity {
     @ApiModelProperty(value = "需求描述")
     private String description;
 
-    @EnumFormat(value = TradingMethod.class,
-            fromExcel = {"转让", "普通许可", "独占许可", "排他许可", "入股"},
-            toJavaEnum = {"TRANSFER", "GENERAL_PERMIT", "EXCLUSIVE_PERMIT", "EXCLUSIVITY_PERMIT", "INVEST"})
-    @ExcelProperty(value = "转移转化方式", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
     @ApiModelProperty(value = "转移转化方式")
-    private TradingMethod mode;
+    private Long modeId;
 
     /*
     (万元)

+ 4 - 2
src/main/java/com/izouma/zhirongip/domain/demand/TechProductDemand.java

@@ -60,9 +60,11 @@ public class TechProductDemand extends BaseEntity {
     @ApiModelProperty(value = "所属阶段")
     private Stage stage;
 
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
     @ApiModelProperty(value = "转移转化方式")
-    private TechTradingMethod mode;
+    private Long modeId;
 
     /*
     (万元)

+ 25 - 9
src/main/java/com/izouma/zhirongip/domain/resource/Digital.java

@@ -1,9 +1,13 @@
 package com.izouma.zhirongip.domain.resource;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.izouma.zhirongip.annotations.Searchable;
 import com.izouma.zhirongip.annotations.SearchableOne;
 import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.dto.ProductDTO;
+import com.izouma.zhirongip.dto.TechnologyDTO;
 import com.izouma.zhirongip.enums.DigitalType;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -37,9 +41,18 @@ public class Digital extends BaseEntity {
     @ApiModelProperty(value = "所属领域")
     private Long field;
 
+    @Transient
+    @ExcelProperty(value = "技术区分")
+    private String settingName;
+
+    @Transient
+    @ExcelProperty(value = "行业领域")
+    private String fieldName;
+
+
     @Searchable
     @SearchableOne
-    @ApiModelProperty(value = "名称")
+    @ExcelProperty(value = "技术名称")
     private String name;
 
     /*
@@ -48,23 +61,26 @@ public class Digital extends BaseEntity {
     公司: 地区
      */
     @SearchableOne
-    @ApiModelProperty(value = "成果所属人")
+    @ExcelProperty(value = "技术所属人")
     private String owner;
 
-    @ExcelIgnore
+    @ExcelProperty(value = "附图")
     private String img;
 
-    @ExcelIgnore
     @Column(columnDefinition = "TEXT")
-    @ApiModelProperty(value = "描述")
+    @ExcelProperty(value = "描述")
     private String manual;
 
+    @ExcelIgnore
     @Enumerated(EnumType.STRING)
     private DigitalType type;
 
-    @Transient
-    private String fieldName;
+    public Digital(TechnologyDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
+
+    public Digital(ProductDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
 
-    @Transient
-    private String settingName;
 }

+ 27 - 28
src/main/java/com/izouma/zhirongip/domain/resource/IntellectualProperty.java

@@ -1,16 +1,12 @@
 package com.izouma.zhirongip.domain.resource;
 
-import com.alibaba.excel.annotation.ExcelIgnore;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.izouma.zhirongip.annotations.EnumFormat;
+import cn.hutool.core.bean.BeanUtil;
 import com.izouma.zhirongip.annotations.Searchable;
 import com.izouma.zhirongip.annotations.SearchableOne;
 import com.izouma.zhirongip.converter.StringArrayConverter;
 import com.izouma.zhirongip.domain.BaseEntity;
 import com.izouma.zhirongip.domain.Setting;
-import com.izouma.zhirongip.enums.IntePropLawStatus;
-import com.izouma.zhirongip.enums.IntePropertyType;
-import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import com.izouma.zhirongip.dto.IntellectualPropertyDTO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
@@ -66,9 +62,6 @@ public class IntellectualProperty extends BaseEntity {
     @Column(columnDefinition = "TEXT")
     private String digest;
 
-//    @ApiModelProperty(value = "摘要图片")
-//    private String digestImg;
-
     @ApiModelProperty(value = "发布时间")
     private LocalDate issue;
 
@@ -104,44 +97,50 @@ public class IntellectualProperty extends BaseEntity {
     private String name;
 
     /**
-     *setting
+     * setting
      */
-    @ExcelIgnore
     @ApiModelProperty(value = "行业分类")
     private Long industryClass;
 
-    @EnumFormat(value = IntePropLawStatus.class,
-            fromExcel = {"有效", "失效", "未知"},
-            toJavaEnum = {"EFFECTIVE", "FAILURE", "UNKNOWN"})
-    @ExcelProperty(value = "法律状态", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+    //    @EnumFormat(value = IntePropLawStatus.class,
+//            fromExcel = {"有效", "失效", "未知"},
+//            toJavaEnum = {"EFFECTIVE", "FAILURE", "UNKNOWN"})
+//    @ExcelProperty(value = "法律状态", converter = EnumExcelConverter.class)
+//    @Enumerated(EnumType.STRING)
+    @Transient
     @ApiModelProperty(value = "法律状态")
-    private IntePropLawStatus lawStatus;
+    private String lawStatus;
+
+    private Long lawStatusId;
 
     /**
-     *专利区分:包括脱密国防专利,军转民专利
+     * 专利区分:包括脱密国防专利,军转民专利
      */
-    @EnumFormat(value = IntePropertyType.class,
-            fromExcel = {"脱密国防专利", "军转民专利"},
-            toJavaEnum = {"DECLASSIFICATION", "MILITARY_TO_CIVILIAN"})
-    @ExcelProperty(value = "专利区分", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
-    private IntePropertyType type;
-
-    @ExcelIgnore
+//    @EnumFormat(value = IntePropertyType.class,
+//            fromExcel = {"脱密国防专利", "军转民专利"},
+//            toJavaEnum = {"DECLASSIFICATION", "MILITARY_TO_CIVILIAN"})
+//    @ExcelProperty(value = "专利区分", converter = EnumExcelConverter.class)
+//    @Enumerated(EnumType.STRING)
+    @Transient
+    private String type;
+
+    private Long typeId;
+
     private String img;
 
     @Searchable
-    @ExcelIgnore
     @Column(columnDefinition = "TEXT")
     @ApiModelProperty(value = "权利要求书")
     private String manual;
 
 
-    @ExcelIgnore
     @ManyToOne(fetch = FetchType.LAZY)
     @JoinColumn(name = "industryClass", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
     @NotFound(action = NotFoundAction.IGNORE)
     private Setting setting;
 
+
+    public IntellectualProperty(IntellectualPropertyDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
 }

+ 5 - 6
src/main/java/com/izouma/zhirongip/domain/supply/Copyright.java

@@ -61,13 +61,12 @@ public class Copyright extends BaseEntity {
     @ApiModelProperty(value = "著作权人")
     private String owner;
 
-    @EnumFormat(value = TradingMethod.class,
-            fromExcel = {"转让", "普通许可", "独占许可", "排他许可", "入股", "其他"},
-            toJavaEnum = {"TRANSFER", "GENERAL_PERMIT", "EXCLUSIVE_PERMIT", "EXCLUSIVITY_PERMIT", "INVEST", "OTHER"})
-    @ExcelProperty(value = "交易方式", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+
     @ApiModelProperty(value = "交易方式")
-    private TradingMethod tradingMethod;
+    private Long tradingMethodId;
 
     @ExcelIgnore
     @Convert(converter = StringArrayConverter.class)

+ 5 - 6
src/main/java/com/izouma/zhirongip/domain/supply/Logo.java

@@ -71,13 +71,12 @@ public class Logo extends BaseEntity {
     @ApiModelProperty(value = "商标图样")
     private List<String> img;
 
-    @EnumFormat(value = TradingMethod.class,
-            fromExcel = {"转让", "普通许可", "独占许可", "排他许可", "入股", "其他"},
-            toJavaEnum = {"TRANSFER", "GENERAL_PERMIT", "EXCLUSIVE_PERMIT", "EXCLUSIVITY_PERMIT", "INVEST", "OTHER"})
-    @ExcelProperty(value = "交易方式", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+
     @ApiModelProperty(value = "交易方式")
-    private TradingMethod tradingMethod;
+    private Long tradingMethodId;
 
     /*
     (万元)

+ 16 - 15
src/main/java/com/izouma/zhirongip/domain/supply/Patent.java

@@ -42,13 +42,12 @@ public class Patent extends BaseEntity {
     /*
     脱密专利没有
      */
-    @EnumFormat(value = PatentType.class,
-            fromExcel = {"发明专利", "实用新型专利", "外观设计专利"},
-            toJavaEnum = {"INVENTION", "UTILITY_MODEL", "APPEARANCE_DESIGN"})
-    @ExcelProperty(value = "专利类型", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "专利类型")
+    private String patentType;
     @ApiModelProperty(value = "专利类型")
-    private PatentType patentType;
+    private Long patentTypeId;
 
     @ApiModelProperty(value = "申请日期")
     private LocalDate applyTime;
@@ -56,16 +55,18 @@ public class Patent extends BaseEntity {
     /**
      * setting
      */
-    @ExcelIgnore
+
     @ApiModelProperty(value = "行业分类")
     private Long industryClass;
 
     @ApiModelProperty(value = "IPC分类号")
     private String ipc;
 
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "法律状态")
+    private String lawStatus;
     @ApiModelProperty(value = "法律状态")
-    private PatentStatus lawStatus;
+    private Long lawStatusId;
 
     @ApiModelProperty(value = "申请人")
     @Convert(converter = StringArrayConverter.class)
@@ -102,13 +103,13 @@ public class Patent extends BaseEntity {
     @ApiModelProperty(value = "专利附图")
     private List<String> img;
 
-    @EnumFormat(value = TradingMethod.class,
-            fromExcel = {"转让", "普通许可", "独占许可", "排他许可", "入股", "其他"},
-            toJavaEnum = {"TRANSFER", "GENERAL_PERMIT", "EXCLUSIVE_PERMIT", "EXCLUSIVITY_PERMIT", "INVEST", "OTHER"})
-    @ExcelProperty(value = "交易方式", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
+
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+
     @ApiModelProperty(value = "交易方式")
-    private TradingMethod tradingMethod;
+    private Long tradingMethodId;
 
     /*
     (万元)

+ 7 - 7
src/main/java/com/izouma/zhirongip/domain/supply/TechnicalManager.java

@@ -80,13 +80,13 @@ public class TechnicalManager extends BaseEntity {
     /*
     专家
      */
-    @EnumFormat(value = AreaOfAffiliation.class,
-            fromExcel = {"知识产权", "国防科工"},
-            toJavaEnum = {"INTELLECTUAL_PROPERTY", "NATIONAL_DEFENCE"})
-    @ExcelProperty(value = "所属领域", converter = EnumExcelConverter.class)
-    @Enumerated(EnumType.STRING)
-    @ApiModelProperty(value = "所属领域")
-    private AreaOfAffiliation affiliation;
+//    @EnumFormat(value = AreaOfAffiliation.class,
+//            fromExcel = {"知识产权", "国防科工"},
+//            toJavaEnum = {"INTELLECTUAL_PROPERTY", "NATIONAL_DEFENCE"})
+//    @ExcelProperty(value = "所属领域", converter = EnumExcelConverter.class)
+//    @Enumerated(EnumType.STRING)
+//    @ApiModelProperty(value = "所属领域")
+//    private AreaOfAffiliation affiliation;
 
     /*
     是否专家

+ 4 - 2
src/main/java/com/izouma/zhirongip/domain/supply/TechnologyProduct.java

@@ -83,9 +83,11 @@ public class TechnologyProduct extends BaseEntity {
     @ApiModelProperty(value = "附图")
     private List<String> img;
 
-    @Enumerated(EnumType.STRING)
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
     @ApiModelProperty(value = "交易方式")
-    private TechTradingMethod tradingMethod;
+    private Long tradingMethodId;
 
     /*
     (万元)

+ 97 - 0
src/main/java/com/izouma/zhirongip/dto/IntellectualPropertyDTO.java

@@ -0,0 +1,97 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import com.izouma.zhirongip.domain.resource.IntellectualProperty;
+import com.izouma.zhirongip.utils.excel.LocalDateConverter;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDate;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "知产")
+public class IntellectualPropertyDTO extends BaseRowModel {
+
+    @ExcelProperty(value = "专利区分")
+    private String type;
+
+    @ExcelProperty(value = "专利名称")
+    private String name;
+
+    @ExcelProperty(value = "法律状态")
+    private String lawStatus;
+
+    @ExcelProperty(value = "行业分类")
+    private String industryClassName;
+
+    @ExcelProperty(value = "专利代理机构")
+    private String agency;
+
+    @ExcelProperty(value = "代理人")
+    private String agent;
+
+    @ExcelProperty(value = "申请主体")
+    private String applyMain;
+
+    @ExcelProperty(value = "申请人")
+    private String applyName;
+
+    @ExcelProperty(value = "申请日", converter = LocalDateConverter.class)
+    private LocalDate applyTime;
+
+    @ExcelProperty(value = "授权公告日", converter = LocalDateConverter.class)
+    private LocalDate authTime;
+
+    @ExcelProperty(value = "公开号")
+    private String openCode;
+
+    @ExcelProperty(value = "申请号")
+    private String code;
+
+    @ExcelProperty(value = "发明人")
+    private String inventor;
+
+    @ExcelProperty(value = "IPC分类")
+    private String ipc;
+
+    @ExcelProperty(value = "专利权人")
+    private String owner;
+
+    @ExcelProperty(value = "专利权人地址")
+    private String ownerOneAddr;
+
+    @ExcelProperty(value = "技术分类1")
+    private String techOne;
+
+    @ExcelProperty(value = "摘要")
+    private String digest;
+
+    @ExcelProperty(value = "摘要附图")
+    private String img;
+
+    @ExcelProperty(value = "权利要求书")
+    private String manual;
+
+    @ExcelProperty(value = "发布时间", converter = LocalDateConverter.class)
+    private LocalDate issue;
+
+    @ExcelProperty(value = "word")
+    private String wordUrl;
+
+    @ExcelProperty(value = "pdf")
+    private String pdfUrl;
+
+    public IntellectualPropertyDTO(IntellectualProperty ip) {
+        BeanUtil.copyProperties(ip, this);
+        this.inventor = String.join(",", ip.getInventor());
+        this.ipc = String.join(",", ip.getIpc());
+    }
+}

+ 41 - 0
src/main/java/com/izouma/zhirongip/dto/ProductDTO.java

@@ -0,0 +1,41 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import com.izouma.zhirongip.domain.resource.Digital;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "数据")
+public class ProductDTO extends BaseRowModel {
+    @ExcelProperty(value = "产品类别")
+    private String settingName;
+
+    @ExcelProperty(value = "行业领域")
+    private String fieldName;
+
+    @ExcelProperty(value = "产品名称")
+    private String name;
+
+    @ExcelProperty(value = "产品所属人")
+    private String owner;
+
+    @ExcelProperty(value = "附图")
+    private String img;
+
+    @ExcelProperty(value = "描述")
+    private String manual;
+
+    public ProductDTO(Digital digital) {
+        BeanUtil.copyProperties(digital, this);
+    }
+
+}

+ 35 - 0
src/main/java/com/izouma/zhirongip/dto/TechnologyDTO.java

@@ -0,0 +1,35 @@
+package com.izouma.zhirongip.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "数据")
+public class TechnologyDTO extends BaseRowModel {
+    @ExcelProperty(value = "技术区分")
+    private String settingName;
+
+    @ExcelProperty(value = "行业领域")
+    private String fieldName;
+
+    @ExcelProperty(value = "技术名称")
+    private String name;
+
+    @ExcelProperty(value = "技术所属人")
+    private String owner;
+
+    @ExcelProperty(value = "附图")
+    private String img;
+
+    @ExcelProperty(value = "描述")
+    private String manual;
+
+}

+ 8 - 3
src/main/java/com/izouma/zhirongip/enums/PatentStatus.java

@@ -2,14 +2,19 @@ package com.izouma.zhirongip.enums;
 
 public enum PatentStatus {
 
-    APPLY("申请中"),
+    APPLY("申请中", 7243L),
 
-    AUTHORISED("已授权未期满");
+    AUTHORISED("已授权未期满", 7244L);
 
     private final String desc;
+    private final  Long id;
 
-    PatentStatus(String desc) {
+    PatentStatus(String desc, Long id) {
         this.desc = desc;
+        this.id = id;
+    }
+    public Long getId() {
+        return id;
     }
 
     public String getDesc() {

+ 9 - 4
src/main/java/com/izouma/zhirongip/enums/PatentType.java

@@ -1,17 +1,22 @@
 package com.izouma.zhirongip.enums;
 
 public enum PatentType {
-    INVENTION("发明专利"),
-    UTILITY_MODEL("实用新型专利"),
-    APPEARANCE_DESIGN("外观设计专利");
+    INVENTION("发明专利", 7239L),
+    UTILITY_MODEL("实用新型专利", 7240L),
+    APPEARANCE_DESIGN("外观设计专利", 7241L);
 
     private final String description;
+    private final Long id;
 
     public String getDescription() {
         return description;
     }
+    public Long getId() {
+        return id;
+    }
 
-    PatentType(String description) {
+    PatentType(String description, Long id) {
         this.description = description;
+        this.id = id;
     }
 }

+ 12 - 6
src/main/java/com/izouma/zhirongip/enums/TechTradingMethod.java

@@ -1,18 +1,24 @@
 package com.izouma.zhirongip.enums;
 
 public enum TechTradingMethod {
-    TRANSFER("转让"),
-    PERMIT("许可"),
-    INVEST("入股"),
-    CO_PRODUCTION("合作生产"),
-    OTHER("其他");
+    TRANSFER("转让", 7255L),
+    PERMIT("许可", 7256L),
+    INVEST("入股", 7257L),
+    CO_PRODUCTION("合作生产", 7258L),
+    OTHER("其他", 7259L);
     private final String desc;
+    private final Long id;
 
-    TechTradingMethod(String desc) {
+    TechTradingMethod(String desc, Long id) {
         this.desc = desc;
+        this.id = id;
     }
 
     public String getDesc() {
         return desc;
     }
+
+    public Long getId() {
+        return  this.id;
+    }
 }

+ 12 - 7
src/main/java/com/izouma/zhirongip/enums/TradingMethod.java

@@ -1,16 +1,21 @@
 package com.izouma.zhirongip.enums;
 
 public enum TradingMethod {
-    TRANSFER("转让"),
-    GENERAL_PERMIT("普通许可"),
-    EXCLUSIVE_PERMIT("独占许可"),
-    EXCLUSIVITY_PERMIT("排他许可"),
-    INVEST("入股"),
-    OTHER("其他");
+    TRANSFER("转让", 7232L),
+    GENERAL_PERMIT("普通许可", 7233L),
+    EXCLUSIVE_PERMIT("独占许可", 7234L),
+    EXCLUSIVITY_PERMIT("排他许可", 7235L),
+    INVEST("入股", 7236L),
+    OTHER("其他", 7237L);
     private final String desc;
+    private final Long id;
 
-    TradingMethod(String desc) {
+    TradingMethod(String desc, Long id) {
         this.desc = desc;
+        this.id = id;
+    }
+    public Long getId() {
+        return id;
     }
 
     public String getDesc() {

+ 4 - 1
src/main/java/com/izouma/zhirongip/service/demand/CopyrightDemandService.java

@@ -27,11 +27,14 @@ public class CopyrightDemandService {
     private final InformationRepo     informationRepo;
 
     public Page<CopyrightDemand> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 3, 4, 6))
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 3, 4, 6,24))
                 .stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return copyrightDemandRepo.findAll(JpaUtils.toSpecification(pageQuery, CopyrightDemand.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
+                    if(cd.getModeId()!=null){
+                        cd.setMode(settingMap.get(cd.getModeId()));
+                    }
                     cd.setWorkName(settingMap.get(cd.getWorkType()));
                     return cd;
                 });

+ 1 - 1
src/main/java/com/izouma/zhirongip/service/demand/FundingService.java

@@ -33,7 +33,7 @@ public class FundingService {
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
 
         return fundingRepo.findAll(((root, criteriaQuery, criteriaBuilder) -> {
-                    List<Predicate> and = JpaUtils.toPredicates(pageQuery, TechnicalManager.class, root, criteriaQuery, criteriaBuilder);
+                    List<Predicate> and = JpaUtils.toPredicates(pageQuery, Funding.class, root, criteriaQuery, criteriaBuilder);
                     if (ObjectUtil.isNotNull(field)) {
                         Expression<Long> function = criteriaBuilder.function("FIND_IN_SET", Long.class, criteriaBuilder.literal(field), root
                                 .get("purpose"));

+ 5 - 1
src/main/java/com/izouma/zhirongip/service/demand/LogoDemandService.java

@@ -1,5 +1,6 @@
 package com.izouma.zhirongip.service.demand;
 
+import cn.hutool.core.collection.CollUtil;
 import com.izouma.zhirongip.domain.Information;
 import com.izouma.zhirongip.domain.Setting;
 import com.izouma.zhirongip.domain.demand.LogoDemand;
@@ -26,10 +27,13 @@ public class LogoDemandService {
     private final InformationRepo informationRepo;
 
     public Page<LogoDemand> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlag(2).stream()
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 2 ,24)).stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return logoDemandRepo.findAll(JpaUtils.toSpecification(pageQuery, LogoDemand.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
+                    if(cd.getModeId()!=null){
+                        cd.setMode(settingMap.get(cd.getModeId()));
+                    }
                     cd.setCategoryName(settingMap.get(cd.getCategory()));
                     return cd;
                 });

+ 10 - 1
src/main/java/com/izouma/zhirongip/service/demand/PatentDemandService.java

@@ -27,10 +27,19 @@ public class PatentDemandService {
     private final InformationRepo  informationRepo;
 
     public Page<PatentDemand> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1, 13)).stream()
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1, 13,24,25,26)).stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return patentDemandRepo.findAll(JpaUtils.toSpecification(pageQuery, PatentDemand.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
+                    if(cd.getPatentStatusId()!=null){
+                        cd.setPatentStatus(settingMap.get(cd.getPatentStatusId()));
+                    }
+                    if(cd.getPatentTypeId()!=null){
+                        cd.setPatentType(settingMap.get(cd.getPatentTypeId()));
+                    }
+                    if(cd.getModeId()!=null){
+                        cd.setMode(settingMap.get(cd.getModeId()));
+                    }
                     cd.setIndustryName(settingMap.get(cd.getIndustryClass()));
                     return cd;
                 });

+ 6 - 1
src/main/java/com/izouma/zhirongip/service/demand/TechProductDemandService.java

@@ -1,5 +1,6 @@
 package com.izouma.zhirongip.service.demand;
 
+import cn.hutool.core.collection.CollUtil;
 import com.izouma.zhirongip.domain.Information;
 import com.izouma.zhirongip.domain.Setting;
 import com.izouma.zhirongip.domain.demand.TechProductDemand;
@@ -26,10 +27,14 @@ public class TechProductDemandService {
     private final InformationRepo       informationRepo;
 
     public Page<TechProductDemand> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlag(1).stream()
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1,29,30))
+                .stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return techProductDemandRepo.findAll(JpaUtils.toSpecification(pageQuery, TechProductDemand.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
+                    if(cd.getModeId()!=null){
+                        cd.setMode(settingMap.get(cd.getModeId()));
+                    }
                     cd.setIndustryName(settingMap.get(cd.getIndustry()));
                     return cd;
                 });

+ 86 - 3
src/main/java/com/izouma/zhirongip/service/resource/DigitalService.java

@@ -1,18 +1,33 @@
 package com.izouma.zhirongip.service.resource;
 
+import cn.hutool.core.collection.CollUtil;
+import com.izouma.zhirongip.converter.StringArrayConverter;
 import com.izouma.zhirongip.domain.Setting;
 import com.izouma.zhirongip.domain.resource.Digital;
+import com.izouma.zhirongip.domain.resource.IntellectualProperty;
 import com.izouma.zhirongip.domain.supply.Logo;
+import com.izouma.zhirongip.dto.IntellectualPropertyDTO;
 import com.izouma.zhirongip.dto.PageQuery;
+import com.izouma.zhirongip.dto.ProductDTO;
+import com.izouma.zhirongip.dto.TechnologyDTO;
+import com.izouma.zhirongip.enums.DigitalType;
 import com.izouma.zhirongip.exception.BusinessException;
 import com.izouma.zhirongip.repo.SettingRepo;
 import com.izouma.zhirongip.repo.resource.DigitalRepo;
 import com.izouma.zhirongip.utils.JpaUtils;
+import com.izouma.zhirongip.utils.excel.ExcelUtils;
 import lombok.AllArgsConstructor;
 import org.apache.xmlbeans.impl.xb.xsdschema.Public;
 import org.springframework.data.domain.Page;
 import org.springframework.stereotype.Service;
 
+import javax.transaction.Transactional;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
@@ -34,10 +49,78 @@ public class DigitalService {
                 });
     }
 
-    public Digital get(Long id){
+    public Digital get(Long id) {
         Digital _digital = digitalRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        _digital.setFieldName(settingRepo.findById(_digital.getField()).orElseThrow(new BusinessException("无记录")).getName());
-        _digital.setSettingName(settingRepo.findById(_digital.getSettingId()).orElseThrow(new BusinessException("无记录")).getName());
+        _digital.setFieldName(settingRepo.findById(_digital.getField())
+                .orElseThrow(new BusinessException("无记录"))
+                .getName());
+        _digital.setSettingName(settingRepo.findById(_digital.getSettingId())
+                .orElseThrow(new BusinessException("无记录"))
+                .getName());
         return _digital;
     }
+
+    @Transactional(rollbackOn = Exception.class)
+    public void upload(InputStream is) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        byte[] buffer = new byte[1024];
+        int len;
+        while ((len = is.read(buffer)) > -1) {
+            baos.write(buffer, 0, len);
+        }
+        baos.flush();
+
+        InputStream indicatorStream = new ByteArrayInputStream(baos.toByteArray());
+        List<TechnologyDTO> dtos = ExcelUtils.readExcel(indicatorStream, TechnologyDTO.class, 1, 1);
+
+        List<Digital> records = new ArrayList<>();
+        List<Setting> settings = settingRepo.findAllByFlagIn(CollUtil.newArrayList(1, 10));
+        Map<Integer, Map<String, Long>> mapMap = settings
+                .stream()
+                .collect(Collectors.groupingBy(Setting::getFlag, Collectors.toMap(Setting::getName, Setting::getId)));
+
+        dtos.forEach(dto -> {
+            Digital property = new Digital(dto);
+            property.setType(DigitalType.TECHNOLOGY);
+            property.setField(mapMap.get(1).get(dto.getFieldName()));
+            property.setSettingId(mapMap.get(10).get(dto.getSettingName()));
+
+            records.add(property);
+        });
+
+        digitalRepo.saveAll(records);
+    }
+
+    @Transactional(rollbackOn = Exception.class)
+    public void uploadProduct(InputStream is) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        byte[] buffer = new byte[1024];
+        int len;
+        while ((len = is.read(buffer)) > -1) {
+            baos.write(buffer, 0, len);
+        }
+        baos.flush();
+
+        InputStream indicatorStream = new ByteArrayInputStream(baos.toByteArray());
+        List<ProductDTO> dtos = ExcelUtils.readExcel(indicatorStream, ProductDTO.class, 1, 1);
+
+        List<Digital> records = new ArrayList<>();
+        List<Setting> settings = settingRepo.findAllByFlagIn(CollUtil.newArrayList(1, 12));
+        Map<Integer, Map<String, Long>> mapMap = settings
+                .stream()
+                .collect(Collectors.groupingBy(Setting::getFlag, Collectors.toMap(Setting::getName, Setting::getId)));
+
+        dtos.forEach(dto -> {
+            Digital property = new Digital(dto);
+            property.setType(DigitalType.PRODUCT);
+            property.setField(mapMap.get(1).get(dto.getFieldName()));
+            property.setSettingId(mapMap.get(12).get(dto.getSettingName()));
+
+            records.add(property);
+        });
+
+        digitalRepo.saveAll(records);
+    }
 }

+ 85 - 1
src/main/java/com/izouma/zhirongip/service/resource/IntellectualPropertyService.java

@@ -1,26 +1,41 @@
 package com.izouma.zhirongip.service.resource;
 
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.Setting;
 import com.izouma.zhirongip.domain.resource.IntellectualProperty;
+import com.izouma.zhirongip.dto.IntellectualPropertyDTO;
 import com.izouma.zhirongip.dto.PageQuery;
+import com.izouma.zhirongip.exception.BusinessException;
+import com.izouma.zhirongip.repo.SettingRepo;
 import com.izouma.zhirongip.repo.resource.IntellectualPropertyRepo;
 import com.izouma.zhirongip.utils.JpaUtils;
+import com.izouma.zhirongip.utils.excel.ExcelUtils;
 import lombok.AllArgsConstructor;
 import org.springframework.data.domain.Page;
 import org.springframework.stereotype.Service;
 
 import javax.persistence.criteria.Expression;
 import javax.persistence.criteria.Predicate;
+import javax.transaction.Transactional;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Service
 @AllArgsConstructor
 public class IntellectualPropertyService {
 
     private final IntellectualPropertyRepo intellectualPropertyRepo;
+    private final SettingRepo              settingRepo;
 
     public Page<IntellectualProperty> all(PageQuery pageQuery) {
         Map<String, Object> query = pageQuery.getQuery();
@@ -30,6 +45,10 @@ public class IntellectualPropertyService {
             query.remove("inventor");
         }
         String finalInventor = inventor;
+
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.newArrayList(27, 28))
+                .stream()
+                .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return intellectualPropertyRepo.findAll(((root, criteriaQuery, criteriaBuilder) -> {
             List<Predicate> and = JpaUtils.toPredicates(pageQuery, IntellectualProperty.class, root, criteriaQuery, criteriaBuilder);
             if (StrUtil.isNotBlank(finalInventor)) {
@@ -39,6 +58,71 @@ public class IntellectualPropertyService {
             }
 
             return criteriaBuilder.and(and.toArray(new Predicate[0]));
-        }), JpaUtils.toPageRequest(pageQuery));
+        }), JpaUtils.toPageRequest(pageQuery)).map(property -> {
+            property.setLawStatus(settingMap.get(property.getLawStatusId()));
+            property.setType(settingMap.get(property.getTypeId()));
+            return property;
+        });
+    }
+
+    public IntellectualProperty get(Long id) {
+        IntellectualProperty property = intellectualPropertyRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        settingRepo.findById(property.getTypeId())
+                .ifPresent(setting -> property.setType(setting.getName()));
+        settingRepo.findById(property.getLawStatusId())
+                .ifPresent(setting -> property.setLawStatus(setting.getName()));
+        return property;
+    }
+
+    public List<IntellectualPropertyDTO> export(List<IntellectualProperty> properties) {
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.newArrayList(13, 27, 28))
+                .stream()
+                .collect(Collectors.toMap(Setting::getId, Setting::getName));
+        return properties.stream().map(property -> {
+            IntellectualPropertyDTO dto = new IntellectualPropertyDTO(property);
+            dto.setIndustryClassName(settingMap.get(property.getIndustryClass()));
+            dto.setLawStatus(settingMap.get(property.getLawStatusId()));
+            dto.setType(settingMap.get(property.getTypeId()));
+            return dto;
+        }).collect(Collectors.toList());
+    }
+
+
+    @Transactional(rollbackOn = Exception.class)
+    public void upload(InputStream is) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        byte[] buffer = new byte[1024];
+        int len;
+        while ((len = is.read(buffer)) > -1) {
+            baos.write(buffer, 0, len);
+        }
+        baos.flush();
+
+        InputStream indicatorStream = new ByteArrayInputStream(baos.toByteArray());
+        List<IntellectualPropertyDTO> dtos = ExcelUtils.readExcel(indicatorStream, IntellectualPropertyDTO.class, 1, 1);
+
+        List<IntellectualProperty> records = new ArrayList<>();
+        List<Setting> settings = settingRepo.findAllByFlagIn(CollUtil.newArrayList(13, 27, 28));
+        Map<Integer, Map<String, Long>> mapMap = settings
+                .stream()
+                .collect(Collectors.groupingBy(Setting::getFlag, Collectors.toMap(Setting::getName, Setting::getId)));
+
+        dtos.forEach(dto -> {
+            IntellectualProperty property = new IntellectualProperty(dto);
+
+            StringArrayConverter sc = new StringArrayConverter();
+
+            property.setInventor(sc.convertToEntityAttribute(dto.getInventor()));
+            property.setIpc(sc.convertToEntityAttribute(dto.getIpc()));
+
+            property.setLawStatusId(mapMap.get(27).get(dto.getLawStatus()));
+            property.setTypeId(mapMap.get(28).get(dto.getType()));
+            property.setIndustryClass(mapMap.get(13).get(dto.getIndustryClassName()));
+
+            records.add(property);
+        });
+
+        intellectualPropertyRepo.saveAll(records);
     }
 }

+ 9 - 1
src/main/java/com/izouma/zhirongip/service/supply/CopyrightService.java

@@ -27,12 +27,15 @@ public class CopyrightService {
     private final InformationRepo informationRepo;
 
     public Page<Copyright> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 3, 4, 6))
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 3, 4, 6,24))
                 .stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return copyrightRepo.findAll(JpaUtils.toSpecification(pageQuery, Copyright.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
                     cd.setWorkName(settingMap.get(cd.getWorkType()));
+                    if(cd.getTradingMethodId()!=null){
+                        cd.setTradingMethod(settingMap.get(cd.getTradingMethodId()));
+                    }
                     return cd;
                 });
     }
@@ -42,6 +45,11 @@ public class CopyrightService {
         copyright.setWorkName(settingRepo.findById(copyright.getWorkType())
                 .orElseThrow(new BusinessException("无记录"))
                 .getName());
+        if(copyright.getTradingMethodId()!=null){
+            copyright.setTradingMethod(settingRepo.findById(copyright.getTradingMethodId())
+                    .orElseThrow(new BusinessException("无记录"))
+                    .getName());
+        }
         return copyright;
     }
 

+ 11 - 1
src/main/java/com/izouma/zhirongip/service/supply/LogoService.java

@@ -1,5 +1,6 @@
 package com.izouma.zhirongip.service.supply;
 
+import cn.hutool.core.collection.CollUtil;
 import com.izouma.zhirongip.domain.Information;
 import com.izouma.zhirongip.domain.Setting;
 import com.izouma.zhirongip.domain.supply.Logo;
@@ -26,11 +27,14 @@ public class LogoService {
     private final InformationRepo informationRepo;
 
     public Page<Logo> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlag(2).stream()
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 2,24)).stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return logoRepo.findAll(JpaUtils.toSpecification(pageQuery, Logo.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
                     cd.setCategoryName(settingMap.get(cd.getCategory()));
+                    if(cd.getTradingMethodId()!=null){
+                        cd.setTradingMethod(settingMap.get(cd.getTradingMethodId()));
+                    }
                     return cd;
                 });
     }
@@ -40,6 +44,12 @@ public class LogoService {
         logo.setCategoryName(settingRepo.findById(logo.getCategory())
                 .orElseThrow(new BusinessException("无记录"))
                 .getName());
+
+        if(logo.getTradingMethodId()!=null){
+            logo.setTradingMethod(settingRepo.findById(logo.getTradingMethodId())
+                    .orElseThrow(new BusinessException("无记录"))
+                    .getName());
+        }
         return logo;
     }
 

+ 28 - 3
src/main/java/com/izouma/zhirongip/service/supply/PatentService.java

@@ -27,11 +27,20 @@ public class PatentService {
     private final InformationRepo informationRepo;
 
     public Page<Patent> all(PageQuery pageQuery) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1, 13)).stream()
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1, 13, 24, 25, 26)).stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
         return patentRepo.findAll(JpaUtils.toSpecification(pageQuery, Patent.class), JpaUtils.toPageRequest(pageQuery))
                 .map(cd -> {
                     cd.setIndustryName(settingMap.get(cd.getIndustryClass()));
+                    if (cd.getPatentTypeId() != null) {
+                        cd.setPatentType(settingMap.get(cd.getPatentTypeId()));
+                    }
+                    if (cd.getLawStatusId() != null) {
+                        cd.setLawStatus(settingMap.get(cd.getLawStatusId()));
+                    }
+                    if (cd.getTradingMethodId() != null) {
+                        cd.setTradingMethod(settingMap.get(cd.getTradingMethodId()));
+                    }
                     return cd;
                 });
     }
@@ -41,6 +50,22 @@ public class PatentService {
         patent.setIndustryName(settingRepo.findById(patent.getIndustryClass())
                 .orElseThrow(new BusinessException("无记录"))
                 .getName());
+
+        if (patent.getPatentTypeId() != null) {
+            patent.setPatentType(settingRepo.findById(patent.getPatentTypeId())
+                    .orElseThrow(new BusinessException("无记录"))
+                    .getName());
+        }
+        if (patent.getLawStatusId() != null) {
+            patent.setLawStatus(settingRepo.findById(patent.getLawStatusId())
+                    .orElseThrow(new BusinessException("无记录"))
+                    .getName());
+        }
+        if (patent.getTradingMethodId() != null) {
+            patent.setTradingMethod(settingRepo.findById(patent.getTradingMethodId())
+                    .orElseThrow(new BusinessException("无记录"))
+                    .getName());
+        }
         return patent;
     }
 
@@ -56,14 +81,14 @@ public class PatentService {
             record.setStatus(ApplyStatus.PASS);
             patentRepo.save(record);
 
-            information.setContent("您发布的供给侧:"+record.getName()+"已通过审核!");
+            information.setContent("您发布的供给侧:" + record.getName() + "已通过审核!");
             informationRepo.save(information);
             return;
         }
         record.setStatus(ApplyStatus.DENY);
         patentRepo.save(record);
 
-        information.setContent("您发布的的供给侧:"+record.getName()+"未通过审核,原因为:" + remark);
+        information.setContent("您发布的的供给侧:" + record.getName() + "未通过审核,原因为:" + remark);
         informationRepo.save(information);
     }
 }

+ 5 - 2
src/main/java/com/izouma/zhirongip/service/supply/TechnologyProductService.java

@@ -1,5 +1,6 @@
 package com.izouma.zhirongip.service.supply;
 
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import com.izouma.zhirongip.converter.LongArrayConverter;
 import com.izouma.zhirongip.domain.Information;
@@ -34,10 +35,9 @@ public class TechnologyProductService {
     }
 
     public Page<TechnologyProduct> all(PageQuery pageQuery, String money) {
-        Map<Long, String> settingMap = settingRepo.findAllByFlag(1)
+        Map<Long, String> settingMap = settingRepo.findAllByFlagIn(CollUtil.list(false, 1,29,30))
                 .stream()
                 .collect(Collectors.toMap(Setting::getId, Setting::getName));
-
         return technologyProductRepo.findAll(((root, criteriaQuery, criteriaBuilder) -> {
                     List<Predicate> and = JpaUtils.toPredicates(pageQuery, TechnologyProduct.class, root, criteriaQuery, criteriaBuilder);
                     if (StrUtil.isNotBlank(money)) {
@@ -53,6 +53,9 @@ public class TechnologyProductService {
                 }), JpaUtils.toPageRequest(pageQuery))
                 .map(tp -> {
                     tp.setFieldName(settingMap.get(tp.getField()));
+                    if(tp.getTradingMethodId()!=null){
+                        tp.setTradingMethod(settingMap.get(tp.getTradingMethodId()));
+                    }
                     return tp;
                 });
     }

+ 4 - 0
src/main/java/com/izouma/zhirongip/web/demand/CopyrightDemandController.java

@@ -54,6 +54,10 @@ public class CopyrightDemandController extends BaseController {
         CopyrightDemand record = copyrightDemandRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         settingRepo.findById(record.getWorkType())
                 .ifPresent(setting -> record.setWorkName(setting.getName()));
+        if(record.getModeId()!=null){
+            settingRepo.findById(record.getModeId())
+                    .ifPresent(setting -> record.setMode(setting.getName()));
+        }
         return record;
     }
 

+ 4 - 0
src/main/java/com/izouma/zhirongip/web/demand/LogoDemandController.java

@@ -53,6 +53,10 @@ public class LogoDemandController extends BaseController {
         LogoDemand record = logoDemandRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         settingRepo.findById(record.getCategory())
                 .ifPresent(setting -> record.setCategoryName(setting.getName()));
+        if(record.getModeId()!=null){
+            settingRepo.findById(record.getModeId())
+                    .ifPresent(setting -> record.setMode(setting.getName()));
+        }
         return record;
     }
 

+ 12 - 0
src/main/java/com/izouma/zhirongip/web/demand/PatentDemandController.java

@@ -53,6 +53,18 @@ public class PatentDemandController extends BaseController {
         PatentDemand record = patentDemandRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         settingRepo.findById(record.getIndustryClass())
                 .ifPresent(setting -> record.setIndustryName(setting.getName()));
+        if(record.getModeId()!=null){
+            settingRepo.findById(record.getModeId())
+                    .ifPresent(setting -> record.setMode(setting.getName()));
+        }
+        if(record.getPatentStatusId()!=null){
+            settingRepo.findById(record.getPatentStatusId())
+                    .ifPresent(setting -> record.setPatentStatus(setting.getName()));
+        }
+        if(record.getPatentTypeId()!=null){
+            settingRepo.findById(record.getPatentTypeId())
+                    .ifPresent(setting -> record.setPatentType(setting.getName()));
+        }
         return record;
     }
 

+ 4 - 0
src/main/java/com/izouma/zhirongip/web/demand/TechProductDemandController.java

@@ -53,6 +53,10 @@ public class TechProductDemandController extends BaseController {
         TechProductDemand record = techProductDemandRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         settingRepo.findById(record.getIndustry())
                 .ifPresent(setting -> record.setIndustryName(setting.getName()));
+        if(record.getModeId()!=null){
+            settingRepo.findById(record.getModeId())
+                    .ifPresent(setting -> record.setMode(setting.getName()));
+        }
         return record;
     }
 

+ 43 - 4
src/main/java/com/izouma/zhirongip/web/resource/DigitalController.java

@@ -1,29 +1,34 @@
 package com.izouma.zhirongip.web.resource;
 
-import com.izouma.zhirongip.web.BaseController;
 import com.izouma.zhirongip.domain.resource.Digital;
-import com.izouma.zhirongip.service.resource.DigitalService;
 import com.izouma.zhirongip.dto.PageQuery;
+import com.izouma.zhirongip.dto.ProductDTO;
 import com.izouma.zhirongip.exception.BusinessException;
 import com.izouma.zhirongip.repo.resource.DigitalRepo;
+import com.izouma.zhirongip.service.resource.DigitalService;
 import com.izouma.zhirongip.utils.ObjUtils;
 import com.izouma.zhirongip.utils.excel.ExcelUtils;
-
+import com.izouma.zhirongip.web.BaseController;
 import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.data.domain.Page;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @RestController
 @RequestMapping("/digital")
 @AllArgsConstructor
+@Slf4j
 public class DigitalController extends BaseController {
     private final DigitalService digitalService;
-    private final DigitalRepo digitalRepo;
+    private final DigitalRepo    digitalRepo;
 
     @PreAuthorize("hasRole('ADMIN')")
     @PostMapping("/save")
@@ -59,5 +64,39 @@ public class DigitalController extends BaseController {
         List<Digital> data = all(pageQuery).getContent();
         ExcelUtils.export(response, data);
     }
+
+    @GetMapping("/excelProduct")
+    @ResponseBody
+    public void excelProduct(HttpServletResponse response, PageQuery pageQuery) throws IOException {
+        List<Digital> data = all(pageQuery).getContent();
+        List<ProductDTO> dtos = data.stream().map(ProductDTO::new).collect(Collectors.toList());
+        ExcelUtils.export(response, dtos);
+    }
+
+    @PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/upload")
+    public void uploadFile(@RequestParam("file") MultipartFile file) {
+        InputStream is;
+        try {
+            is = file.getInputStream();
+            digitalService.upload(is);
+        } catch (IOException e) {
+            log.error("上传失败", e);
+            throw new BusinessException("上传失败", e.getMessage());
+        }
+    }
+
+    @PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/uploadProduct")
+    public void uploadProduct(@RequestParam("file") MultipartFile file) {
+        InputStream is;
+        try {
+            is = file.getInputStream();
+            digitalService.uploadProduct(is);
+        } catch (IOException e) {
+            log.error("上传失败", e);
+            throw new BusinessException("上传失败", e.getMessage());
+        }
+    }
 }
 

+ 26 - 7
src/main/java/com/izouma/zhirongip/web/resource/IntellectualPropertyController.java

@@ -1,35 +1,40 @@
 package com.izouma.zhirongip.web.resource;
 
-import com.izouma.zhirongip.web.BaseController;
 import com.izouma.zhirongip.domain.resource.IntellectualProperty;
-import com.izouma.zhirongip.service.resource.IntellectualPropertyService;
+import com.izouma.zhirongip.dto.IntellectualPropertyDTO;
 import com.izouma.zhirongip.dto.PageQuery;
 import com.izouma.zhirongip.exception.BusinessException;
 import com.izouma.zhirongip.repo.resource.IntellectualPropertyRepo;
+import com.izouma.zhirongip.service.resource.IntellectualPropertyService;
 import com.izouma.zhirongip.utils.ObjUtils;
 import com.izouma.zhirongip.utils.excel.ExcelUtils;
-
+import com.izouma.zhirongip.web.BaseController;
 import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.data.domain.Page;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.List;
 
 @RestController
 @RequestMapping("/intellectualProperty")
 @AllArgsConstructor
+@Slf4j
 public class IntellectualPropertyController extends BaseController {
     private final IntellectualPropertyService intellectualPropertyService;
-    private final IntellectualPropertyRepo intellectualPropertyRepo;
+    private final IntellectualPropertyRepo    intellectualPropertyRepo;
 
     @PreAuthorize("hasRole('ADMIN')")
     @PostMapping("/save")
     public IntellectualProperty save(@RequestBody IntellectualProperty record) {
         if (record.getId() != null) {
-            IntellectualProperty orig = intellectualPropertyRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
+            IntellectualProperty orig = intellectualPropertyRepo.findById(record.getId())
+                    .orElseThrow(new BusinessException("无记录"));
             ObjUtils.merge(orig, record);
             return intellectualPropertyRepo.save(orig);
         }
@@ -45,7 +50,7 @@ public class IntellectualPropertyController extends BaseController {
 
     @GetMapping("/get/{id}")
     public IntellectualProperty get(@PathVariable Long id) {
-        return intellectualPropertyRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        return intellectualPropertyService.get(id);
     }
 
     @PostMapping("/del/{id}")
@@ -57,7 +62,21 @@ public class IntellectualPropertyController extends BaseController {
     @ResponseBody
     public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
         List<IntellectualProperty> data = all(pageQuery).getContent();
-        ExcelUtils.export(response, data);
+        List<IntellectualPropertyDTO> dtoList = intellectualPropertyService.export(data);
+        ExcelUtils.export(response, dtoList);
+    }
+
+    @PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/upload")
+    public void uploadFile(@RequestParam("file") MultipartFile file) {
+        InputStream is;
+        try {
+            is = file.getInputStream();
+            intellectualPropertyService.upload(is);
+        } catch (IOException e) {
+            log.error("上传失败", e);
+            throw new BusinessException("上传失败", e.getMessage());
+        }
     }
 }
 

+ 4 - 0
src/main/java/com/izouma/zhirongip/web/supply/TechnologyProductController.java

@@ -60,6 +60,10 @@ public class TechnologyProductController extends BaseController {
         TechnologyProduct record = technologyProductRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         settingRepo.findById(record.getField())
                 .ifPresent(setting -> record.setFieldName(setting.getName()));
+        if(record.getTradingMethodId()!=null){
+            settingRepo.findById(record.getTradingMethodId())
+                    .ifPresent(setting -> record.setTradingMethod(setting.getName()));
+        }
         return record;
     }
 

+ 72 - 0
src/main/vue/src/components/ExcelUpload.vue

@@ -0,0 +1,72 @@
+<template>
+    <el-upload
+        :action="uploadUrl"
+        :before-upload="beforeUpload"
+        :headers="headers"
+        :show-file-list="false"
+        ref="upload"
+        :on-success="onSuccess"
+        class="uploader"
+        :on-error="onfail"
+    >
+        <el-button icon="el-icon-upload2" slot="trigger" size="small" class="filter-item">导入</el-button>
+    </el-upload>
+</template>
+
+<script>
+import resolveUrl from 'resolve-url';
+import axios from 'axios';
+export default {
+    name: 'ExcelUpload',
+    props: {
+        uri: {
+            type: String,
+            default: ''
+        }
+    },
+    data() {
+        return {
+            uploadUrl: ''
+        };
+    },
+    computed: {
+        headers() {
+            return {
+                Authorization: 'Bearer ' + localStorage.getItem('token')
+            };
+        }
+    },
+    created() {
+        this.uploadUrl = resolveUrl(this.$baseUrl, this.uri);
+    },
+    methods: {
+        upload() {},
+        onfail(e) {
+            console.log(e);
+            this.$message.error('失败');
+            this.changeSelect();
+        },
+        onSuccess() {
+            this.$message.success('上传成功');
+            this.changeSelect();
+        },
+        beforeUpload() {
+            return this.$confirm('确认要导入文件数据吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            });
+        },
+        changeSelect() {
+            this.$emit('change');
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.uploader {
+    display: inline-block;
+    margin: 0 10px;
+}
+</style>

+ 16 - 1
src/main/vue/src/components/select/ModeSelect.vue

@@ -31,7 +31,22 @@ export default {
             ]
         };
     },
-
+    created() {
+        this.$http
+            .post('/setting/byFlag', { flag: 24 })
+            .then(res => {
+                this.options = res.map(item => {
+                    return {
+                        label: item.name,
+                        value: item.id
+                    };
+                });
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+    },
     methods: {
         changeSelect(val) {
             this.$emit('input', val);

+ 0 - 1
src/main/vue/src/components/select/ModeSelect2.vue

@@ -29,7 +29,6 @@ export default {
             ]
         };
     },
-
     methods: {
         changeSelect(val) {
             this.$emit('input', val);

+ 3 - 0
src/main/vue/src/main.js

@@ -19,6 +19,8 @@ import 'normalize.css/normalize.css';
 import './styles/element_theme/index.css';
 import theme from '!less-vars-loader!./styles/common/theme.less';
 import echarts from 'echarts';
+import ExcelUpload from '@/components/ExcelUpload';
+
 // import VueAMap from "vue-amap";
 // Vue.use(VueAMap);
 // VueAMap.initAMapApiLoader({
@@ -54,6 +56,7 @@ Vue.component('rich-text', RichText);
 Vue.component('crop-upload', CropUpload);
 Vue.component('district-choose', DistrictChoose);
 Vue.component('page-title', PageTitle);
+Vue.component('excel-upload', ExcelUpload);
 Vue.mixin(Formatters);
 Vue.prototype.$theme = theme;
 console.log(theme);

+ 20 - 1
src/main/vue/src/mixins/tradingMethod.js

@@ -1,8 +1,13 @@
 import { add } from 'date-fns';
 
 export default {
+    created() {
+        this.getSetting(this.flag, this.isMode ? 'modeOptions' : 'tradingMethodOptions');
+    },
     data() {
         return {
+            flag: 24,
+            isMode: false,
             tradingMethodOptions: [
                 { label: '转让', value: 'TRANSFER' },
                 { label: '普通许可', value: 'GENERAL_PERMIT' },
@@ -22,7 +27,21 @@ export default {
                 { label: '通过', value: 'PASS' },
                 { label: '申请中', value: 'PENDING' },
                 { label: '拒绝', value: 'DENY' }
-            ]
+            ],
+            getSetting(flag = 1, keyName) {
+                return this.$http.post('/setting/byFlag', { flag: flag }).then(res => {
+                    let list = res.map(item => {
+                        return {
+                            label: item.name,
+                            value: item.id
+                        };
+                    });
+                    if (keyName) {
+                        this[keyName] = list;
+                    }
+                    return Promise.resolve(list);
+                });
+            }
         };
     },
     methods: {

+ 27 - 27
src/main/vue/src/views/demand/CopyrightDemandEdit.vue

@@ -41,9 +41,9 @@
                     <el-form-item prop="description" label="需求描述">
                         <el-input type="textarea" :rows="4" v-model="formData.description"></el-input>
                     </el-form-item>
-                    <el-form-item prop="mode" label="交易方式" v-if="formData.type != 'SERVICE'">
+                    <el-form-item prop="modeId" label="交易方式" v-if="formData.type != 'SERVICE'">
                         <el-select
-                            v-model="formData.mode"
+                            v-model="formData.modeId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -109,11 +109,11 @@ export default {
                 .then(res => {
                     this.formData = res;
                     if (res.type == 'COPY') {
-                        this.getSetting(3);
+                        this.getSetting(3, 'workTypeOptions');
                     } else if (res.type == 'SOFT') {
-                        this.getSetting(4);
+                        this.getSetting(4, 'workTypeOptions');
                     } else {
-                        this.getSetting(6);
+                        this.getSetting(6, 'workTypeOptions');
                     }
                 })
                 .catch(e => {
@@ -125,11 +125,11 @@ export default {
             let type = this.$route.query.type;
             this.formData.type = this.$route.query.type;
             if (type == 'COPY') {
-                this.getSetting(3);
+                this.getSetting(3, 'workTypeOptions');
             } else if (type == 'SOFT') {
-                this.getSetting(4);
+                this.getSetting(4, 'workTypeOptions');
             } else {
-                this.getSetting(6);
+                this.getSetting(6, 'workTypeOptions');
             }
         }
     },
@@ -154,7 +154,7 @@ export default {
                 ],
                 workType: [{ required: true, message: `请选择需求${this.type === 'COPY' ? '作品' : '软著'}类型` }],
                 description: [{ required: true, message: '请填写需求描述' }],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,
@@ -231,25 +231,25 @@ export default {
                         this.$message.error((e || {}).error || '删除失败');
                     }
                 });
-        },
-        getSetting(flag) {
-            this.$http
-                .post('/setting/byFlag', { flag: flag })
-                .then(res => {
-                    if (res.length > 0) {
-                        res.forEach(item => {
-                            this.workTypeOptions.push({
-                                label: item.name,
-                                value: item.id
-                            });
-                        });
-                    }
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
         }
+        // getSetting(flag) {
+        //     this.$http
+        //         .post('/setting/byFlag', { flag: flag })
+        //         .then(res => {
+        //             if (res.length > 0) {
+        //                 res.forEach(item => {
+        //                     this.workTypeOptions.push({
+        //                         label: item.name,
+        //                         value: item.id
+        //                     });
+        //                 });
+        //             }
+        //         })
+        //         .catch(e => {
+        //             console.log(e);
+        //             this.$message.error(e.error);
+        //         });
+        // }
     }
 };
 </script>

+ 5 - 5
src/main/vue/src/views/demand/CopyrightDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="作品类型" :flag="3" v-model="workType" @input="getData"></setting-select>
-            <mode-select v-model="mode" @input="getData"></mode-select>
+            <mode-select v-model="modeId" @input="getData"></mode-select>
         </div>
         <el-table
             :data="tableData"
@@ -49,7 +49,7 @@
             <el-table-column prop="name" label="作品名称"> </el-table-column>
             <el-table-column prop="workName" label="作品类型"> </el-table-column>
             <el-table-column prop="description" label="需求描述"> </el-table-column>
-            <el-table-column prop="mode" label="交易方式" :formatter="tradingMethodFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -130,7 +130,7 @@ export default {
             url: '/copyrightDemand/all',
             downloading: false,
             workType: '',
-            mode: ''
+            modeId: ''
         };
     },
     computed: {
@@ -146,7 +146,7 @@ export default {
                 query: {
                     type: 'COPY',
                     workType: this.workType,
-                    mode: this.mode
+                    modeId: this.modeId
                 }
             };
         },
@@ -183,7 +183,7 @@ export default {
                         query: {
                             type: 'COPY',
                             workType: this.workType,
-                            mode: this.mode
+                            modeId: this.modeId
                         }
                     }
                 })

+ 19 - 15
src/main/vue/src/views/demand/GeneralPatentDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="所属领域" :flag="1" v-model="industry" @input="getData"></setting-select>
-            <el-select v-model="mode" placeholder="请选择交易方式" clearable class="filter-item" @change="getData">
+            <el-select v-model="modeId" placeholder="请选择交易方式" clearable class="filter-item" @change="getData">
                 <el-option
                     v-for="item in tradingMethodOptions"
                     :key="item.value"
@@ -40,7 +40,7 @@
                 ></el-option>
             </el-select>
             <el-select
-                v-model="patentType"
+                v-model="patentTypeId"
                 placeholder="请选择专利分类"
                 clearable
                 class="filter-item"
@@ -54,7 +54,7 @@
                 ></el-option>
             </el-select>
             <el-select
-                v-model="patentStatus"
+                v-model="patentStatusId"
                 placeholder="请选择专利状态"
                 clearable
                 class="filter-item"
@@ -83,11 +83,11 @@
             <el-table-column prop="id" label="ID" width="60"> </el-table-column>
             <el-table-column prop="name" label="专利名称"> </el-table-column>
             <el-table-column prop="keyword" label="包含关键字"> </el-table-column>
-            <el-table-column prop="patentType" label="专利类型" :formatter="patentTypeFormatter"> </el-table-column>
-            <el-table-column prop="patentStatus" label="专利状态" :formatter="patentStatusFormatter"> </el-table-column>
+            <el-table-column prop="patentType" label="专利类型"> </el-table-column>
+            <el-table-column prop="patentStatus" label="专利状态"> </el-table-column>
             <el-table-column prop="industryName" label="所属领域"> </el-table-column>
             <!-- <el-table-column prop="description" label="需求描述"> </el-table-column> -->
-            <el-table-column prop="mode" label="交易方式" :formatter="tradingMethodFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -160,6 +160,10 @@ export default {
     components: { SettingSelect },
     name: 'GeneralPatentDemandList',
     mixins: [pageableTable, tradingMethod],
+    created() {
+        this.getSetting(25, 'patentTypeOptions');
+        this.getSetting(26, 'patentStatusOptions');
+    },
     data() {
         return {
             multipleMode: false,
@@ -180,9 +184,9 @@ export default {
                 { label: 'GENERAL', value: 'GENERAL' }
             ],
             industry: '',
-            mode: '',
-            patentType: '',
-            patentStatus: ''
+            modeId: '',
+            patentTypeId: '',
+            patentStatusId: ''
         };
     },
     computed: {
@@ -219,9 +223,9 @@ export default {
                 query: {
                     caseType: 'GENERAL',
                     industryClass: this.industry,
-                    mode: this.mode,
-                    patentType: this.patentType,
-                    patentStatus: this.patentStatus
+                    modeId: this.modeId,
+                    patentTypeId: this.patentTypeId,
+                    patentStatusId: this.patentStatusId
                 }
             };
         },
@@ -258,9 +262,9 @@ export default {
                         query: {
                             caseType: 'GENERAL',
                             industryClass: this.industry,
-                            mode: this.mode,
-                            patentType: this.patentType,
-                            patentStatus: this.patentStatus
+                            modeId: this.modeId,
+                            patentTypeId: this.patentTypeId,
+                            patentStatusId: this.patentStatusId
                         }
                     }
                 })

+ 3 - 3
src/main/vue/src/views/demand/LogoDemandEdit.vue

@@ -47,9 +47,9 @@
                     <el-form-item prop="description" label="需求描述">
                         <el-input type="textarea" :rows="4" v-model="formData.description"></el-input>
                     </el-form-item>
-                    <el-form-item prop="mode" label="交易方式">
+                    <el-form-item prop="modeId" label="交易方式">
                         <el-select
-                            v-model="formData.mode"
+                            v-model="formData.modeId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -158,7 +158,7 @@ export default {
                 containGraphic: [{ required: true, message: '请输入需求商标包含图形元素' }],
                 category: [{ required: true, message: '请选择商标所属分类' }],
                 description: [{ required: true, message: '请填写需求描述' }],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [{ required: true, validator: validatePrice, message: '请选择预算方式' }],
                 contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
                 phone: [{ required: true, pattern: phonePattern, message: '请输入联系电话', trigger: 'blur' }],

+ 4 - 4
src/main/vue/src/views/demand/LogoDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="所属分类" :flag="2" v-model="category" @input="getData"></setting-select>
-            <mode-select v-model="mode" @input="getData"></mode-select>
+            <mode-select v-model="modeId" @input="getData"></mode-select>
         </div>
         <el-table
             :data="tableData"
@@ -51,7 +51,7 @@
             <el-table-column prop="containGraphic" label="包含图形"> </el-table-column>
             <el-table-column prop="categoryName" label="所属分类"> </el-table-column>
             <el-table-column prop="description" label="需求描述"> </el-table-column>
-            <el-table-column prop="mode" label="交易方式" :formatter="tradingMethodFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -146,7 +146,7 @@ export default {
                 sort: 'createdAt,desc',
                 search: this.search,
                 query: {
-                    mode: this.mode,
+                    modeId: this.modeId,
                     category: this.category
                 }
             };
@@ -181,7 +181,7 @@ export default {
                     params: {
                         size: 10000,
                         query: {
-                            mode: this.mode,
+                            modeId: this.modeId,
                             category: this.category
                         }
                     }

+ 33 - 31
src/main/vue/src/views/demand/PatentDemandEdit.vue

@@ -24,15 +24,15 @@
                     <el-form-item prop="keyword" label="包含关键字">
                         <el-input v-model="formData.keyword"></el-input>
                     </el-form-item>
-                    <el-form-item prop="patentType" label="专利类型" v-if="formData.caseType == 'GENERAL'">
-                        <el-radio-group v-model="formData.patentType">
+                    <el-form-item prop="patentTypeId" label="专利类型" v-if="formData.caseType == 'GENERAL'">
+                        <el-radio-group v-model="formData.patentTypeId">
                             <el-radio v-for="item in patentTypeOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
                         </el-radio-group>
                     </el-form-item>
-                    <el-form-item prop="patentStatus" label="专利状态" v-if="formData.caseType == 'GENERAL'">
-                        <el-radio-group v-model="formData.patentStatus">
+                    <el-form-item prop="patentStatusId" label="专利状态" v-if="formData.caseType == 'GENERAL'">
+                        <el-radio-group v-model="formData.patentStatusId">
                             <el-radio v-for="item in patentStatusOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
@@ -58,9 +58,9 @@
                     <el-form-item prop="description" label="需求描述">
                         <el-input type="textarea" :rows="4" v-model="formData.description"></el-input>
                     </el-form-item>
-                    <el-form-item prop="mode" label="交易方式">
+                    <el-form-item prop="modeId" label="交易方式">
                         <el-select
-                            v-model="formData.mode"
+                            v-model="formData.modeId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -126,9 +126,9 @@ export default {
                 .then(res => {
                     this.formData = res;
                     if (res.caseType == 'GENERAL') {
-                        this.getSetting(1);
+                        this.getSetting(1, 'industryClassOptions');
                     } else {
-                        this.getSetting(13);
+                        this.getSetting(13, 'industryClassOptions');
                     }
                 })
                 .catch(e => {
@@ -140,11 +140,13 @@ export default {
             let type = this.$route.query.type;
             this.formData.caseType = this.$route.query.type;
             if (type == 'GENERAL') {
-                this.getSetting(1);
+                this.getSetting(1, 'industryClassOptions');
             } else {
-                this.getSetting(13);
+                this.getSetting(13, 'industryClassOptions');
             }
         }
+        this.getSetting(25, 'patentTypeOptions');
+        this.getSetting(26, 'patentStatusOptions');
     },
     data() {
         return {
@@ -184,11 +186,11 @@ export default {
                         message: `请输入需求${this.types === 'DECLASSIFICATION' ? '脱密专利' : '专利'}包含关键字`
                     }
                 ],
-                patentType: [{ required: true, message: '请选择专利类型' }],
-                patentStatus: [{ required: true, message: '请选择法律状态' }],
+                patentTypeId: [{ required: true, message: '请选择专利类型' }],
+                patentStatusId: [{ required: true, message: '请选择法律状态' }],
                 industryClass: [{ required: true, message: '请选择所属领域' }],
                 description: [{ required: true, message: '请填写需求描述' }],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,
@@ -266,24 +268,24 @@ export default {
                     }
                 });
         },
-        getSetting(flag) {
-            this.$http
-                .post('/setting/byFlag', { flag: flag })
-                .then(res => {
-                    if (res.length > 0) {
-                        res.forEach(item => {
-                            this.industryClassOptions.push({
-                                label: item.name,
-                                value: item.id
-                            });
-                        });
-                    }
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-        },
+        // getSetting(flag) {
+        //     this.$http
+        //         .post('/setting/byFlag', { flag: flag })
+        //         .then(res => {
+        //             if (res.length > 0) {
+        //                 res.forEach(item => {
+        //                     this.industryClassOptions.push({
+        //                         label: item.name,
+        //                         value: item.id
+        //                     });
+        //                 });
+        //             }
+        //         })
+        //         .catch(e => {
+        //             console.log(e);
+        //             this.$message.error(e.error);
+        //         });
+        // },
         clear() {
             if (this.formData.negotiateDirectly) {
                 this.formData.expectedPrice = '';

+ 4 - 4
src/main/vue/src/views/demand/PatentDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="所属领域" :flag="13" v-model="industry" @input="getData"></setting-select>
-            <el-select v-model="mode" placeholder="请选择交易方式" clearable class="filter-item" @change="getData">
+            <el-select v-model="modeId" placeholder="请选择交易方式" clearable class="filter-item" @change="getData">
                 <el-option
                     v-for="item in tradingMethodOptions"
                     :key="item.value"
@@ -59,7 +59,7 @@
             <!-- <el-table-column prop="patentStatus" label="专利状态" :formatter="patentStatusFormatter"> </el-table-column> -->
             <el-table-column prop="industryName" label="所属领域"> </el-table-column>
             <!-- <el-table-column prop="description" label="需求描述"> </el-table-column> -->
-            <el-table-column prop="mode" label="交易方式" :formatter="tradingMethodFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -152,7 +152,7 @@ export default {
                 { label: 'GENERAL', value: 'GENERAL' }
             ],
             industry: '',
-            mode: ''
+            modeId: ''
         };
     },
     computed: {
@@ -189,7 +189,7 @@ export default {
                 query: {
                     caseType: 'DECLASSIFICATION',
                     industryClass: this.industry,
-                    mode: this.mode
+                    modeId: this.modeId
                 }
             };
         },

+ 7 - 5
src/main/vue/src/views/demand/ProductDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="所属领域" :flag="1" v-model="industry" @input="getData"></setting-select>
-            <el-select v-model="mode" placeholder="请选择交易方式" class="filter-item" clearable @change="getData">
+            <el-select v-model="modeId" placeholder="请选择交易方式" class="filter-item" clearable @change="getData">
                 <el-option
                     v-for="item in modeOptions"
                     :key="item.value"
@@ -69,7 +69,7 @@
             <!-- <el-table-column prop="patentType" label="专利类型" :formatter="patentTypeFormatter"> </el-table-column> -->
             <el-table-column prop="description" label="需求描述"> </el-table-column>
             <el-table-column prop="stage" label="所处阶段" :formatter="stageFormatter"> </el-table-column>
-            <el-table-column prop="mode" label="交易方式" :formatter="modeFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -149,6 +149,8 @@ export default {
     components: { SettingSelect },
     data() {
         return {
+            isMode: true,
+            flag: 29,
             multipleMode: false,
             search: '',
             url: '/techProductDemand/all',
@@ -177,7 +179,7 @@ export default {
                 { label: '产品', value: 'PRODUCT' }
             ],
             industry: '',
-            mode: '',
+            modeId: '',
             patent: ''
         };
     },
@@ -222,7 +224,7 @@ export default {
                 query: {
                     tpType: 'PRODUCT',
                     industry: this.industry,
-                    mode: this.mode,
+                    modeId: this.modeId,
                     isPatented: this.patent
                 }
             };
@@ -260,7 +262,7 @@ export default {
                         query: {
                             tpType: 'PRODUCT',
                             industry: this.industry,
-                            mode: this.mode,
+                            modeId: this.modeId,
                             isPatented: this.patent
                         }
                     }

+ 5 - 5
src/main/vue/src/views/demand/SoftCopyrightDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="软著类型" :flag="4" v-model="workType" @input="getData"></setting-select>
-            <mode-select v-model="mode" @input="getData"></mode-select>
+            <mode-select v-model="modeId" @input="getData"></mode-select>
         </div>
         <el-table
             :data="tableData"
@@ -49,7 +49,7 @@
             <el-table-column prop="name" label="软著名称"> </el-table-column>
             <el-table-column prop="workName" label="软著类型"> </el-table-column>
             <el-table-column prop="description" label="需求描述"> </el-table-column>
-            <el-table-column prop="mode" label="交易方式" :formatter="tradingMethodFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -130,7 +130,7 @@ export default {
             url: '/copyrightDemand/all',
             downloading: false,
             workType: '',
-            mode: ''
+            modeId: ''
         };
     },
     computed: {
@@ -146,7 +146,7 @@ export default {
                 query: {
                     type: 'SOFT',
                     workType: this.workType,
-                    mode: this.mode
+                    modeId: this.modeId
                 }
             };
         },
@@ -183,7 +183,7 @@ export default {
                         query: {
                             type: 'SOFT',
                             workType: this.workType,
-                            mode: this.mode
+                            modeId: this.modeId
                         }
                     }
                 })

+ 18 - 12
src/main/vue/src/views/demand/TechProductDemandEdit.vue

@@ -74,9 +74,9 @@
                             </el-option>
                         </el-select>
                     </el-form-item>
-                    <el-form-item prop="mode" label="交易方式">
+                    <el-form-item prop="modeId" label="交易方式">
                         <!-- <el-select
-                            v-model="formData.mode"
+                            v-model="formData.modeId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -90,12 +90,12 @@
                             >
                             </el-option>
                         </el-select> -->
-                        <el-radio-group v-model="formData.mode" v-if="formData.tpType == 'TECHNOLOGY'">
+                        <el-radio-group v-model="formData.modeId" v-if="formData.tpType == 'TECHNOLOGY'">
                             <el-radio v-for="item in modeOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
                         </el-radio-group>
-                        <el-radio-group v-model="formData.mode" v-else>
+                        <el-radio-group v-model="formData.modeId" v-else>
                             <el-radio v-for="item in modeOptions1" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
@@ -141,8 +141,10 @@
 </template>
 <script>
 import { phonePattern } from '../../utils/variables';
+import tradingMethod from '@/mixins/tradingMethod';
 export default {
     name: 'TechProductDemandEdit',
+    mixins: [tradingMethod],
     created() {
         if (this.$route.query.id) {
             this.$http
@@ -174,9 +176,12 @@ export default {
                 console.log(e);
                 this.$message.error(e.error);
             });
+        this.getSetting(29, 'modeOptions1');
     },
     data() {
         return {
+            isMode: true,
+            flag: 30,
             saving: false,
             formData: {},
             industryOptions: [],
@@ -235,7 +240,7 @@ export default {
                         trigger: 'blur'
                     }
                 ],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,
@@ -272,13 +277,14 @@ export default {
             this.$forceUpdate();
         },
         onSave() {
-            this.$refs.form.validate(valid => {
-                if (valid) {
-                    this.submit();
-                } else {
-                    return false;
-                }
-            });
+            this.submit();
+            // this.$refs.form.validate(valid => {
+            //     if (valid) {
+            //         this.submit();
+            //     } else {
+            //         return false;
+            //     }
+            // });
         },
         submit() {
             let data = { ...this.formData };

+ 7 - 5
src/main/vue/src/views/demand/TechnologyDemandList.vue

@@ -31,7 +31,7 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="所属领域" :flag="1" v-model="industry" @input="getData"></setting-select>
-            <el-select v-model="mode" placeholder="请选择交易方式" class="filter-item" clearable @change="getData">
+            <el-select v-model="modeId" placeholder="请选择交易方式" class="filter-item" clearable @change="getData">
                 <el-option
                     v-for="item in modeOptions"
                     :key="item.value"
@@ -69,7 +69,7 @@
             <!-- <el-table-column prop="patentType" label="专利类型" :formatter="patentTypeFormatter"> </el-table-column> -->
             <el-table-column prop="description" label="需求描述"> </el-table-column>
             <el-table-column prop="stage" label="所处阶段" :formatter="stageFormatter"> </el-table-column>
-            <el-table-column prop="mode" label="交易方式" :formatter="modeFormatter"> </el-table-column>
+            <el-table-column prop="mode" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="预算(万元)">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -144,6 +144,8 @@ export default {
     components: { SettingSelect },
     data() {
         return {
+            flag: 30,
+            isMode: true,
             multipleMode: false,
             search: '',
             url: '/techProductDemand/all',
@@ -165,7 +167,7 @@ export default {
                 { label: '产品', value: 'PRODUCT' }
             ],
             industry: '',
-            mode: '',
+            modeId: '',
             patent: ''
         };
     },
@@ -203,7 +205,7 @@ export default {
                 query: {
                     tpType: 'TECHNOLOGY',
                     industry: this.industry,
-                    mode: this.mode,
+                    modeId: this.modeId,
                     isPatented: this.patent
                 }
             };
@@ -241,7 +243,7 @@ export default {
                         query: {
                             tpType: 'TECHNOLOGY',
                             industry: this.industry,
-                            mode: this.mode,
+                            modeId: this.modeId,
                             isPatented: this.patent
                         }
                     }

+ 4 - 3
src/main/vue/src/views/resource/DigitalList.vue

@@ -10,15 +10,16 @@
             >
                 新增
             </el-button>
-            <!-- <el-button
+            <el-button
                 @click="download"
-                icon="el-icon-upload2"
+                icon="el-icon-download"
                 :loading="downloading"
                 :disabled="fetchingData || totalElements < 1"
                 class="filter-item"
             >
                 导出
-            </el-button> -->
+            </el-button>
+            <excel-upload uri="digital/upload" @change="getData"></excel-upload>
         </page-title>
         <div class="filters-container">
             <el-input

+ 5 - 4
src/main/vue/src/views/resource/DigitalProductList.vue

@@ -10,15 +10,16 @@
             >
                 新增
             </el-button>
-            <!-- <el-button
+            <el-button
                 @click="download"
-                icon="el-icon-upload2"
+                icon="el-icon-download"
                 :loading="downloading"
                 :disabled="fetchingData || totalElements < 1"
                 class="filter-item"
             >
                 导出
-            </el-button> -->
+            </el-button>
+            <excel-upload uri="digital/uploadProduct" @change="getData"></excel-upload>
         </page-title>
         <div class="filters-container">
             <el-input
@@ -153,7 +154,7 @@ export default {
         download() {
             this.downloading = true;
             this.$axios
-                .get('/digital/excel', {
+                .get('/digital/excelProduct', {
                     responseType: 'blob',
                     params: {
                         size: 10000,

+ 38 - 13
src/main/vue/src/views/resource/IntellectualPropertyEdit.vue

@@ -19,14 +19,14 @@
                     style="max-width: 700px;"
                 >
                     <el-form-item prop="type" label="专利区分">
-                        <el-radio-group v-model="formData.type">
+                        <el-radio-group v-model="formData.typeId">
                             <el-radio v-for="item in typeOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
                         </el-radio-group>
                     </el-form-item>
                     <el-form-item prop="lawStatus" label="法律状态">
-                        <el-radio-group v-model="formData.lawStatus">
+                        <el-radio-group v-model="formData.lawStatusId">
                             <el-radio v-for="item in lawStatusOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
@@ -201,6 +201,38 @@ export default {
                 console.log(e);
                 this.$message.error(e.error);
             });
+        this.$http
+            .post('/setting/byFlag', { flag: 27 })
+            .then(res => {
+                if (res.length > 0) {
+                    res.forEach(item => {
+                        this.lawStatusOptions.push({
+                            label: item.name,
+                            value: item.id
+                        });
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
+        this.$http
+            .post('/setting/byFlag', { flag: 28 })
+            .then(res => {
+                if (res.length > 0) {
+                    res.forEach(item => {
+                        this.typeOptions.push({
+                            label: item.name,
+                            value: item.id
+                        });
+                    });
+                }
+            })
+            .catch(e => {
+                console.log(e);
+                this.$message.error(e.error);
+            });
     },
     data() {
         return {
@@ -210,8 +242,8 @@ export default {
             },
             rules: {
                 name: [{ required: true, message: '请输入专利名称' }],
-                type: [{ required: true, message: '请选择专利区分' }],
-                lawStatus: [{ required: true, message: '请选择法律状态' }],
+                typeId: [{ required: true, message: '请选择专利区分' }],
+                lawStatusId: [{ required: true, message: '请选择法律状态' }],
                 agency: [{ required: true, message: '请输入代理人', trigger: 'blur' }],
                 applyMain: [{ required: true, message: '请输入申请主体' }],
                 applyName: [{ required: true, message: '请输入申请人' }],
@@ -231,15 +263,8 @@ export default {
                 pdfUrl: [{ required: true, message: '请上传PDF', trigger: 'blur' }],
                 authTime: [{ required: true, message: '请选择公开日' }]
             },
-            typeOptions: [
-                { label: '脱密国防专利', value: 'DECLASSIFICATION' },
-                { label: '军转民专利', value: 'MILITARY_TO_CIVILIAN' }
-            ],
-            lawStatusOptions: [
-                { label: '有效', value: 'EFFECTIVE' },
-                { label: '失效', value: 'FAILURE' },
-                { label: '未知', value: 'UNKNOWN' }
-            ],
+            typeOptions: [],
+            lawStatusOptions: [],
             industryClassOptions: [],
             inputValue: '',
             inputValue1: ''

+ 14 - 11
src/main/vue/src/views/resource/IntellectualPropertyList.vue

@@ -10,15 +10,16 @@
             >
                 新增
             </el-button>
-            <!-- <el-button
+            <el-button
                 @click="download"
-                icon="el-icon-upload2"
+                icon="el-icon-download"
                 :loading="downloading"
                 :disabled="fetchingData || totalElements < 1"
                 class="filter-item"
             >
                 导出
-            </el-button> -->
+            </el-button>
+            <excel-upload uri="intellectualProperty/upload" @change="getData"></excel-upload>
         </page-title>
         <div class="filters-container">
             <el-input
@@ -31,22 +32,24 @@
                 <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
             </el-input>
             <setting-select name="行业分类" :flag="13" v-model="industry" @input="getData"></setting-select>
-            <el-select v-model="lawStatus" placeholder="请选择法律状态" clearable class="filter-item" @change="getData">
+            <setting-select name="法律状态" :flag="27" v-model="lawStatus" @input="getData"></setting-select>
+            <setting-select name="专利分类" :flag="28" v-model="type" @input="getData"></setting-select>
+            <!-- <el-select v-model="lawStatus" placeholder="请选择法律状态" clearable class="filter-item" @change="getData">
                 <el-option
                     v-for="item in lawStatusOptions"
                     :key="item.value"
                     :value="item.value"
                     :label="item.label"
                 ></el-option>
-            </el-select>
-            <el-select v-model="type" placeholder="请选择专利分类" clearable class="filter-item" @change="getData">
+            </el-select> -->
+            <!-- <el-select v-model="type" placeholder="请选择专利分类" clearable class="filter-item" @change="getData">
                 <el-option
                     v-for="item in typeOptions"
                     :key="item.value"
                     :value="item.value"
                     :label="item.label"
                 ></el-option>
-            </el-select>
+            </el-select> -->
         </div>
         <el-table
             :data="tableData"
@@ -61,9 +64,9 @@
         >
             <el-table-column v-if="multipleMode" align="center" type="selection" width="50"> </el-table-column>
             <el-table-column prop="id" label="ID" width="60"> </el-table-column>
-            <el-table-column prop="type" label="专利区分" :formatter="typeFormatter"> </el-table-column>
+            <el-table-column prop="type" label="专利区分"> </el-table-column>
             <el-table-column prop="name" label="专利名称"> </el-table-column>
-            <el-table-column prop="lawStatus" label="法律状态" :formatter="lawStatusFormatter"> </el-table-column>
+            <el-table-column prop="lawStatus" label="法律状态"> </el-table-column>
             <el-table-column prop="setting.name" label="行业分类"> </el-table-column>
             <el-table-column prop="owner" label="专利权人"> </el-table-column>
             <el-table-column prop="inventor" label="发明人"> </el-table-column>
@@ -163,8 +166,8 @@ export default {
                 sort: 'applyTime,desc',
                 search: this.search,
                 query: {
-                    lawStatus: this.lawStatus,
-                    type: this.type,
+                    lawStatusId: this.lawStatus,
+                    typeId: this.type,
                     industryClass: this.industry
                 }
             };

+ 25 - 25
src/main/vue/src/views/supply/CopyrightEdit.vue

@@ -74,9 +74,9 @@
                         >
                         </el-select>
                     </el-form-item>
-                    <el-form-item prop="tradingMethod" label="交易方式">
+                    <el-form-item prop="tradingMethodId" label="交易方式">
                         <el-select
-                            v-model="formData.tradingMethod"
+                            v-model="formData.tradingMethodId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -168,9 +168,9 @@ export default {
                 .then(res => {
                     this.formData = res;
                     if (res.type == 'COPY') {
-                        this.getSetting(3);
+                        this.getSetting(3, 'workTypeOptions');
                     } else {
-                        this.getSetting(4);
+                        this.getSetting(4, 'workTypeOptions');
                     }
                 })
                 .catch(e => {
@@ -181,9 +181,9 @@ export default {
         if (this.$route.query.type) {
             this.formData.type = this.$route.query.type;
             if (this.formData.type == 'COPY') {
-                this.getSetting(3);
+                this.getSetting(3, 'workTypeOptions');
             } else {
-                this.getSetting(4);
+                this.getSetting(4, 'workTypeOptions');
             }
         }
     },
@@ -220,7 +220,7 @@ export default {
                         message: `请上传${this.types === 'COPY' ? '作品' : '软著'}附图`
                     }
                 ],
-                tradingMethod: [{ required: true, message: '请选择交易方式' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,
@@ -300,25 +300,25 @@ export default {
                         this.$message.error((e || {}).error || '删除失败');
                     }
                 });
-        },
-        getSetting(flag) {
-            this.$http
-                .post('/setting/byFlag', { flag: flag })
-                .then(res => {
-                    if (res.length > 0) {
-                        res.forEach(item => {
-                            this.workTypeOptions.push({
-                                label: item.name,
-                                value: item.id
-                            });
-                        });
-                    }
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
         }
+        // getSetting(flag) {
+        //     this.$http
+        //         .post('/setting/byFlag', { flag: flag })
+        //         .then(res => {
+        //             if (res.length > 0) {
+        //                 res.forEach(item => {
+        //                     this.workTypeOptions.push({
+        //                         label: item.name,
+        //                         value: item.id
+        //                     });
+        //                 });
+        //             }
+        //         })
+        //         .catch(e => {
+        //             console.log(e);
+        //             this.$message.error(e.error);
+        //         });
+        // }
     }
 };
 </script>

+ 5 - 6
src/main/vue/src/views/supply/CopyrightList.vue

@@ -33,7 +33,7 @@
 
             <setting-select name="作品类型" :flag="3" v-model="workType" @input="getData"></setting-select>
             <el-select
-                v-model="tradingMethod"
+                v-model="tradingMethodId"
                 placeholder="请选择交易方式"
                 clearable
                 class="filter-item"
@@ -75,8 +75,7 @@
                         :preview-src-list="row.img"
                     ></el-image> </template
             ></el-table-column>
-            <el-table-column prop="tradingMethod" label="交易方式" :formatter="tradingMethodFormatter">
-            </el-table-column>
+            <el-table-column prop="tradingMethod" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="期望价">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -179,7 +178,7 @@ export default {
                 { label: '百分比', value: 'PERCENTAGE' }
             ],
             workType: '',
-            tradingMethod: ''
+            tradingMethodId: ''
         };
     },
     computed: {
@@ -209,7 +208,7 @@ export default {
                 query: {
                     type: 'COPY',
                     workType: this.workType,
-                    tradingMethod: this.tradingMethod
+                    tradingMethodId: this.tradingMethodId
                 }
             };
         },
@@ -246,7 +245,7 @@ export default {
                         query: {
                             type: 'COPY',
                             workType: this.workType,
-                            tradingMethod: this.tradingMethod
+                            tradingMethodId: this.tradingMethodId
                         }
                     }
                 })

+ 2 - 2
src/main/vue/src/views/supply/LogoEdit.vue

@@ -77,9 +77,9 @@
                     <el-form-item prop="img" label="商标图样">
                         <multi-upload v-model="formData.img"></multi-upload>
                     </el-form-item>
-                    <el-form-item prop="tradingMethod" label="交易方式">
+                    <el-form-item prop="tradingMethodId" label="交易方式">
                         <el-select
-                            v-model="formData.tradingMethod"
+                            v-model="formData.tradingMethodId"
                             clearable
                             filterable
                             placeholder="请选择"

+ 5 - 6
src/main/vue/src/views/supply/LogoList.vue

@@ -31,7 +31,7 @@
                 ></el-option>
             </el-select>
             <el-select
-                v-model="tradingMethod"
+                v-model="tradingMethodId"
                 placeholder="请选择交易方式"
                 clearable
                 class="filter-item"
@@ -84,8 +84,7 @@
                     ></el-image>
                 </template>
             </el-table-column>
-            <el-table-column prop="tradingMethod" label="交易方式" :formatter="tradingMethodFormatter">
-            </el-table-column>
+            <el-table-column prop="tradingMethod" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="期望价">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -189,7 +188,7 @@ export default {
             ],
             category: '',
             logoType: '',
-            tradingMethod: ''
+            tradingMethodId: ''
         };
     },
     computed: {
@@ -218,7 +217,7 @@ export default {
                 search: this.search,
                 query: {
                     logoType: this.logoType,
-                    tradingMethod: this.tradingMethod,
+                    tradingMethodId: this.tradingMethodId,
                     category: this.category
                 }
             };
@@ -254,7 +253,7 @@ export default {
                         size: 10000,
                         query: {
                             logoType: this.logoType,
-                            tradingMethod: this.tradingMethod,
+                            tradingMethodId: this.tradingMethodId,
                             category: this.category
                         }
                     }

+ 14 - 28
src/main/vue/src/views/supply/PatentEdit.vue

@@ -24,8 +24,8 @@
                     <el-form-item prop="code" label="申请号">
                         <el-input v-model="formData.code"></el-input>
                     </el-form-item>
-                    <el-form-item prop="patentType" label="专利类型" v-if="formData.caseType == 'GENERAL'">
-                        <el-radio-group v-model="formData.patentType">
+                    <el-form-item prop="patentTypeId" label="专利类型" v-if="formData.caseType == 'GENERAL'">
+                        <el-radio-group v-model="formData.patentTypeId">
                             <el-radio v-for="item in patentTypeOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
@@ -60,9 +60,9 @@
                     <el-form-item prop="ipc" label="IPC分类号">
                         <el-input v-model="formData.ipc"></el-input>
                     </el-form-item>
-                    <el-form-item prop="lawStatus" label="法律状态" v-if="formData.caseType == 'GENERAL'">
+                    <el-form-item prop="lawStatusId" label="法律状态" v-if="formData.caseType == 'GENERAL'">
                         <el-select
-                            v-model="formData.lawStatus"
+                            v-model="formData.lawStatusId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -150,9 +150,9 @@
                     <el-form-item prop="manual" label="权利要求书">
                         <rich-text v-model="formData.manual"></rich-text>
                     </el-form-item>
-                    <el-form-item prop="tradingMethod" label="交易方式">
+                    <el-form-item prop="tradingMethodId" label="交易方式">
                         <el-select
-                            v-model="formData.tradingMethod"
+                            v-model="formData.tradingMethodId"
                             clearable
                             filterable
                             placeholder="请选择"
@@ -240,9 +240,11 @@ export default {
                 .then(res => {
                     this.formData = res;
                     if (res.caseType == 'GENERAL') {
-                        this.getSetting(1);
+                        this.getSetting(1, 'industryOptions');
+                        this.getSetting(25, 'patentTypeOptions');
+                        this.getSetting(26, 'lawStatusOptions');
                     } else {
-                        this.getSetting(13);
+                        this.getSetting(13, 'industryOptions');
                     }
                 })
                 .catch(e => {
@@ -254,9 +256,11 @@ export default {
             let type = this.$route.query.type;
             this.formData.caseType = this.$route.query.type;
             if (type == 'GENERAL') {
-                this.getSetting(1);
+                this.getSetting(1, 'industryOptions');
+                this.getSetting(25, 'patentTypeOptions');
+                this.getSetting(26, 'lawStatusOptions');
             } else {
-                this.getSetting(13);
+                this.getSetting(13, 'industryOptions');
             }
         }
     },
@@ -391,24 +395,6 @@ export default {
             }
             this.inputVisible = false;
             this.inputValue = '';
-        },
-        getSetting(flag) {
-            this.$http
-                .post('/setting/byFlag', { flag: flag })
-                .then(res => {
-                    if (res.length > 0) {
-                        res.forEach(item => {
-                            this.industryOptions.push({
-                                label: item.name,
-                                value: item.id
-                            });
-                        });
-                    }
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
         }
     }
 };

+ 6 - 6
src/main/vue/src/views/supply/ProductList.vue

@@ -32,7 +32,7 @@
             </el-input>
             <setting-select name="所属领域" :flag="1" v-model="field" @input="getData"></setting-select>
             <el-select
-                v-model="tradingMethod"
+                v-model="tradingMethodId"
                 placeholder="请选择交易方式"
                 class="filter-item"
                 clearable
@@ -94,8 +94,7 @@
                     ></el-image>
                 </template>
             </el-table-column>
-            <el-table-column prop="tradingMethod" label="交易方式" :formatter="tradingMethodFormatter">
-            </el-table-column>
+            <el-table-column prop="tradingMethod" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="期望价">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -184,6 +183,7 @@ export default {
     mixins: [pageableTable, tradingMethod],
     data() {
         return {
+            flag: 29,
             multipleMode: false,
             search: '',
             url: '/technologyProduct/all',
@@ -210,7 +210,7 @@ export default {
                 { label: '技术', value: 'TECHNOLOGY' },
                 { label: '产品', value: 'PRODUCT' }
             ],
-            tradingMethod: '',
+            tradingMethodId: '',
             stage: '',
             patent: '',
             field: ''
@@ -256,7 +256,7 @@ export default {
                 search: this.search,
                 query: {
                     tpType: 'PRODUCT',
-                    tradingMethod: this.tradingMethod,
+                    tradingMethodId: this.tradingMethodId,
                     stage: this.stage,
                     isPatented: this.patent,
                     field: this.field
@@ -295,7 +295,7 @@ export default {
                         size: 10000,
                         query: {
                             tpType: 'PRODUCT',
-                            tradingMethod: this.tradingMethod,
+                            tradingMethodId: this.tradingMethodId,
                             stage: this.stage,
                             isPatented: this.patent,
                             field: this.field

+ 6 - 6
src/main/vue/src/views/supply/TechnologyList.vue

@@ -32,7 +32,7 @@
             </el-input>
             <setting-select name="所属领域" :flag="1" v-model="field" @input="getData"></setting-select>
             <el-select
-                v-model="tradingMethod"
+                v-model="tradingMethodId"
                 placeholder="请选择交易方式"
                 class="filter-item"
                 clearable
@@ -94,8 +94,7 @@
                     ></el-image>
                 </template>
             </el-table-column>
-            <el-table-column prop="tradingMethod" label="交易方式" :formatter="tradingMethodFormatter">
-            </el-table-column>
+            <el-table-column prop="tradingMethod" label="交易方式"> </el-table-column>
             <el-table-column prop="expectedPrice" label="期望价">
                 <template slot-scope="{ row }">
                     <span v-if="row.negotiateDirectly">面议</span>
@@ -184,6 +183,7 @@ export default {
     mixins: [pageableTable, tradingMethod],
     data() {
         return {
+            flag: 30,
             multipleMode: false,
             search: '',
             url: '/technologyProduct/all',
@@ -210,7 +210,7 @@ export default {
                 { label: '技术', value: 'TECHNOLOGY' },
                 { label: '产品', value: 'PRODUCT' }
             ],
-            tradingMethod: '',
+            tradingMethodId: '',
             stage: '',
             patent: '',
             field: ''
@@ -256,7 +256,7 @@ export default {
                 search: this.search,
                 query: {
                     tpType: 'TECHNOLOGY',
-                    tradingMethod: this.tradingMethod,
+                    tradingMethodId: this.tradingMethodId,
                     stage: this.stage,
                     isPatented: this.patent,
                     field: this.field
@@ -295,7 +295,7 @@ export default {
                         size: 10000,
                         query: {
                             tpType: 'TECHNOLOGY',
-                            tradingMethod: this.tradingMethod,
+                            tradingMethodId: this.tradingMethodId,
                             stage: this.stage,
                             isPatented: this.patent,
                             field: this.field

+ 9 - 12
src/main/vue/src/views/supply/TechnologyProductEdit.vue

@@ -85,13 +85,13 @@
                     <el-form-item prop="img" label="附图">
                         <multi-upload v-model="formData.img"></multi-upload>
                     </el-form-item>
-                    <el-form-item prop="tradingMethod" label="交易方式">
-                        <el-radio-group v-model="formData.tradingMethod" v-if="formData.tpType == 'TECHNOLOGY'">
+                    <el-form-item prop="tradingMethodId" label="交易方式">
+                        <el-radio-group v-model="formData.tradingMethodId" v-if="formData.tpType == 'TECHNOLOGY'">
                             <el-radio v-for="item in tradingMethodOptions" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
                         </el-radio-group>
-                        <el-radio-group v-model="formData.tradingMethod" v-else>
+                        <el-radio-group v-model="formData.tradingMethodId" v-else>
                             <el-radio v-for="item in tradingMethodOptions1" :key="item.value" :label="item.value">
                                 {{ item.label }}
                             </el-radio>
@@ -160,6 +160,7 @@
 </template>
 <script>
 import { phonePattern } from '../../utils/variables';
+import tradingMethod from '@/mixins/tradingMethod';
 export default {
     name: 'TechnologyProductEdit',
     created() {
@@ -195,13 +196,15 @@ export default {
                 console.log(e);
                 this.$message.error(e.error);
             });
+        this.getSetting(29, 'tradingMethodOptions1');
     },
+    mixins: [tradingMethod],
     data() {
         return {
             saving: false,
             formData: {},
-
             fieldOptions: [],
+            flag: 30,
             stageOptions: [
                 { label: '研发阶段', value: 'RESEARCH_AND_DEVELOPMENT' },
                 { label: '样品阶段', value: 'SAMPLE' },
@@ -209,13 +212,7 @@ export default {
                 { label: '中试阶段', value: 'PILOT_TEST' },
                 { label: '量产阶段', value: 'MASS_PRODUCTION' }
             ],
-            tradingMethodOptions: [
-                { label: '技术转让', value: 'TRANSFER' },
-                { label: '技术许可', value: 'PERMIT' },
-                { label: '技术入股', value: 'INVEST' },
-                { label: '合作生产', value: 'CO_PRODUCTION' },
-                { label: '其他', value: 'OTHER' }
-            ],
+            tradingMethodOptions: [],
             tradingMethodOptions1: [
                 { label: '转让', value: 'TRANSFER' },
                 { label: '许可', value: 'PERMIT' },
@@ -259,7 +256,7 @@ export default {
                     }
                 ],
                 patentNo: [{ required: true, message: '请输入包含专利号' }],
-                tradingMethod: [{ required: true, message: '请选择交易方式' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,

+ 2 - 10
src/main/zhi-rong-web/src/components/PageHeader.vue

@@ -202,17 +202,9 @@ export default {
                 this.updateUserInfo(null);
                 this.$router.push('/Login');
             } else if (command === 'supply') {
-                if (this.type) {
-                    this.$router.replace('/publish/patent?caseType=DECLASSIFICATION');
-                } else {
-                    this.$router.push('/userEdit');
-                }
+                this.$router.replace('/publish/patent?caseType=DECLASSIFICATION');
             } else if (command === 'demand') {
-                if (this.type) {
-                    this.$router.replace('/publish/patentDemand?caseType=DECLASSIFICATION');
-                } else {
-                    this.$router.push('/userEdit');
-                }
+                this.$router.replace('/publish/patentDemand?caseType=DECLASSIFICATION');
             }
         }
     },

+ 1 - 11
src/main/zhi-rong-web/src/components/list/CopyrightDemandRow.vue

@@ -24,7 +24,7 @@
                 </div>
                 <div class="info-item">
                     <span class="text1">交易方式:</span>
-                    <span class="text2">{{ mode }}</span>
+                    <span class="text2">{{ info.tradingMethod }}</span>
                 </div>
                 <div class="info-item">
                     <span class="text1">发布时间:</span>
@@ -90,16 +90,6 @@ export default {
         }
     },
     computed: {
-        mode() {
-            let info = tradingMethodOption.find(item => {
-                return item.value === this.info.mode;
-            });
-
-            return info ? info.label : '';
-        }
-        // workName() {
-        //     return this.info.workName;
-        // }
     },
     methods: {
         edit() {

+ 1 - 8
src/main/zhi-rong-web/src/components/list/TechProductDemandRow.vue

@@ -30,7 +30,7 @@
                 <div class="info-item">
                     <span class="text1">交易方式:</span>
                     <span v-if="info.tpType === 'PRODUCT'" class="text2">{{ modes }}</span>
-                    <span v-else class="text2">{{ mode }}</span>
+                    <span v-else class="text2">{{ info.mode }}</span>
                 </div>
                 <!-- <div class="info-item" v-if="info.isPatented">
                     <span class="text1">专利类型:</span>
@@ -115,13 +115,6 @@ export default {
 
             return info ? info.label : '';
         },
-        modes() {
-            let info = tradingMethodOptionsDemands.find(item => {
-                return item.value === this.info.mode;
-            });
-
-            return info ? info.label : '';
-        },
         patentType() {
             let info = patentTypeOptions.find(item => {
                 return item.value === this.info.patentType;

+ 4 - 3
src/main/zhi-rong-web/src/components/popup/CopyrightAdd.vue

@@ -86,8 +86,8 @@
                     }}
                 </multi-upload>
             </el-form-item>
-            <el-form-item class="block" prop="tradingMethod" label="交易方式">
-                <el-radio-group v-model="formData.tradingMethod">
+            <el-form-item class="block" prop="tradingMethodId" label="交易方式">
+                <el-radio-group v-model="formData.tradingMethodId">
                     <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -180,6 +180,7 @@ export default {
 
     data() {
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {},
@@ -211,7 +212,7 @@ export default {
                         message: `请上传${this.types === 'COPY' ? '作品' : '软著'}附图`
                     }
                 ],
-                tradingMethod: [{ required: true, message: '请选择交易方式' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,

+ 5 - 4
src/main/zhi-rong-web/src/components/popup/CopyrightDemandAdd.vue

@@ -40,8 +40,8 @@
                     resize="none"
                 ></el-input>
             </el-form-item>
-            <el-form-item label="交易方式" prop="mode">
-                <el-radio-group v-model="formData.mode">
+            <el-form-item label="交易方式" prop="modeId">
+                <el-radio-group v-model="formData.modeId">
                     <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -49,7 +49,7 @@
             </el-form-item>
             <el-form-item prop="expectedPrice" label="预算(万元)">
                 <el-input-number
-                    v-model="formData.expectedPrice"
+                    v-modeIdl="formData.expectedPrice"
                     :disabled="formData.negotiateDirectly"
                     @change="Price"
                     :precision="1"
@@ -93,6 +93,7 @@ export default {
     created() {},
     data() {
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {},
@@ -116,7 +117,7 @@ export default {
                 ],
                 workType: [{ required: true, message: `请选择需求${this.type === 'COPY' ? '作品' : '软著'}类型` }],
                 description: [{ required: true, message: '请填写需求描述' }],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,

+ 4 - 3
src/main/zhi-rong-web/src/components/popup/LogoAdd.vue

@@ -77,8 +77,8 @@
                     请上传商标图样,格式JPG或PNG,大小不超过1M,最多可上传6张
                 </multi-upload>
             </el-form-item>
-            <el-form-item class="block" prop="tradingMethod" label="交易方式">
-                <el-radio-group v-model="formData.tradingMethod">
+            <el-form-item class="block" prop="tradingMethodId" label="交易方式">
+                <el-radio-group v-model="formData.tradingMethodId">
                     <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -193,6 +193,7 @@ export default {
             }
         };
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {
@@ -207,7 +208,7 @@ export default {
                 servicesItem: [{ required: true, message: '请输入使用商品/服务项目' }],
                 owner: [{ required: true, message: '请输入商标注册人' }],
                 img: [{ required: true, message: '请上传商标图样' }],
-                tradingMethod: [{ required: true, message: '请选择交易方式' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [{ required: true, validator: validatePrice, message: '请选择期望价方式' }],
                 basePrice: [{ required: true, message: '请输入底价', trigger: 'blur' }],
                 contact: [{ required: true, message: '请输入联系人' }],

+ 4 - 3
src/main/zhi-rong-web/src/components/popup/LogoDemandAdd.vue

@@ -40,8 +40,8 @@
                     resize="none"
                 ></el-input>
             </el-form-item>
-            <el-form-item label="交易方式" prop="mode">
-                <el-radio-group v-model="formData.mode">
+            <el-form-item label="交易方式" prop="modeId">
+                <el-radio-group v-model="formData.modeId">
                     <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -120,6 +120,7 @@ export default {
             }
         };
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {},
@@ -129,7 +130,7 @@ export default {
                 containGraphic: [{ required: true, message: '请输入需求商标包含图形元素' }],
                 category: [{ required: true, message: '请选择商标所属分类' }],
                 description: [{ required: true, message: '请填写需求描述' }],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [{ required: true, validator: validatePrice, message: '请选择预算方式' }],
                 contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
                 phone: [{ required: true, pattern: phonePattern, message: '请输入联系电话', trigger: 'blur' }],

+ 1 - 0
src/main/zhi-rong-web/src/components/popup/Message.vue

@@ -85,6 +85,7 @@ import { phonePattern } from '../../utils/variables';
 export default {
     data() {
         return {
+            needChange: true,
             show: false,
             showForm: false,
             formData: {},

+ 10 - 9
src/main/zhi-rong-web/src/components/popup/PatentAdd.vue

@@ -28,8 +28,8 @@
             <el-form-item prop="ipc" label="IPC分类号">
                 <el-input v-model="formData.ipc" placeholder="请输入"></el-input>
             </el-form-item>
-            <el-form-item v-if="formData.caseType === 'GENERAL'" prop="patentType" label="专利类型">
-                <el-select v-model="formData.patentType" clearable filterable placeholder="请选择" style="width: 100%">
+            <el-form-item v-if="formData.caseType === 'GENERAL'" prop="patentTypeId" label="专利类型">
+                <el-select v-model="formData.patentTypeId" clearable filterable placeholder="请选择" style="width: 100%">
                     <el-option
                         v-for="item in patentTypeOptions"
                         :key="item.value"
@@ -68,8 +68,8 @@
                     </el-option>
                 </el-select>
             </el-form-item>
-            <el-form-item prop="lawStatus" label="法律状态" v-if="formData.caseType === 'GENERAL'">
-                <el-select v-model="formData.lawStatus" clearable filterable placeholder="请选择">
+            <el-form-item prop="lawStatusId" label="法律状态" v-if="formData.caseType === 'GENERAL'">
+                <el-select v-model="formData.lawStatusId" clearable filterable placeholder="请选择">
                     <el-option
                         v-for="item in patentStatusOptions"
                         :key="item.value"
@@ -172,7 +172,7 @@
                 <rich-text v-model="formData.manual"></rich-text>
             </el-form-item>
 
-            <el-form-item prop="tradingMethod" label="交易方式" class="block">
+            <el-form-item prop="tradingMethodId" label="交易方式" class="block">
                 <!-- <el-select v-model="formData.tradingMethod" clearable filterable placeholder="请选择">
                     <el-option
                         v-for="item in tradingMethodOption"
@@ -183,7 +183,7 @@
                     </el-option>
                 </el-select> -->
 
-                <el-radio-group v-model="formData.tradingMethod">
+                <el-radio-group v-model="formData.tradingMethodId">
                     <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -347,6 +347,7 @@ export default {
             }
         };
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {
@@ -357,10 +358,10 @@ export default {
             rules: {
                 name: [{ required: true, message: '请输入专利名称' }],
                 code: [{ required: true, message: '请输入专利申请号' }],
-                patentType: [{ required: true, message: '请选择专利类型' }],
+                patentTypeId: [{ required: true, message: '请选择专利类型' }],
                 ownerType: [{ required: true, message: '请输入专利权人类型', trigger: 'blur' }],
                 industryClass: [{ required: true, message: '请选择所属领域' }],
-                lawStatus: [{ required: true, message: '请选择法律状态' }],
+                lawStatusId: [{ required: true, message: '请选择法律状态' }],
                 applicant: [{ required: true, message: '请输入申请人', trigger: 'blur' }],
                 owner: [{ required: true, message: '请输入专利权人' }],
                 inventor: [{ required: true, message: '请输入发明人' }],
@@ -368,7 +369,7 @@ export default {
                 digest: [{ required: true, message: '请填写专利摘要' }],
                 manual: [{ required: true, message: '请输入权利要求书' }],
                 expectedPrice: [{ required: true, validator: validatePrice, message: '请选择期望价方式' }],
-                tradingMethod: [{ required: true, message: '请选择交易方式' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式' }],
                 contact: [{ required: true, message: '请输入联系人' }],
                 basePrice: [{ required: true, message: '请输入底价', trigger: 'blur' }],
                 phone: { required: true, pattern: phonePattern, message: '请输入联系电话', trigger: 'blur' },

+ 11 - 10
src/main/zhi-rong-web/src/components/popup/PatentDemandAdd.vue

@@ -31,8 +31,8 @@
                     placeholder="请输入需求脱密专利包含关键字"
                 ></el-input>
             </el-form-item>
-            <el-form-item v-if="formData.caseType === 'GENERAL'" prop="patentType" label="专利类型">
-                <el-select v-model="formData.patentType" clearable filterable placeholder="请选择" style="width: 26%">
+            <el-form-item v-if="formData.caseType === 'GENERAL'" prop="patentTypeId" label="专利类型">
+                <el-select v-model="formData.patentTypeId" clearable filterable placeholder="请选择" style="width: 26%">
                     <el-option
                         v-for="item in patentTypeOptions"
                         :key="item.value"
@@ -42,8 +42,8 @@
                     </el-option>
                 </el-select>
             </el-form-item>
-            <el-form-item prop="patentStatus" v-if="formData.caseType === 'GENERAL'" label="法律状态">
-                <el-select v-model="formData.patentStatus" clearable filterable placeholder="请选择" style="width: 26%">
+            <el-form-item prop="patentStatusId" v-if="formData.caseType === 'GENERAL'" label="法律状态">
+                <el-select v-model="formData.patentStatusId" clearable filterable placeholder="请选择" style="width: 26%">
                     <el-option
                         v-for="item in patentStatusOptions"
                         :key="item.value"
@@ -93,8 +93,8 @@
                     resize="none"
                 ></el-input>
             </el-form-item>
-            <el-form-item label="交易方式" prop="mode">
-                <el-radio-group v-model="formData.mode">
+            <el-form-item label="交易方式" prop="modeId">
+                <el-radio-group v-model="formData.modeId">
                     <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -177,6 +177,7 @@ export default {
     },
     data() {
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {},
@@ -206,11 +207,11 @@ export default {
                         message: `请输入需求${this.types === 'DECLASSIFICATION' ? '脱密专利' : '专利'}包含关键字`
                     }
                 ],
-                patentType: [{ required: true, message: '请选择专利类型' }],
-                patentStatus: [{ required: true, message: '请选择法律状态' }],
+                patentTypeId: [{ required: true, message: '请选择专利类型' }],
+                patentStatusId: [{ required: true, message: '请选择法律状态' }],
                 industryClass: [{ required: true, message: '请选择所属领域' }],
                 description: [{ required: true, message: '请填写需求描述' }],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,
@@ -249,7 +250,6 @@ export default {
         init(types) {
             this.show = true;
             this.$nextTick(() => {
-                this.$refs.form.resetFields();
                 this.formData = {
                     userId: this.userInfo.id,
                     caseType: types,
@@ -259,6 +259,7 @@ export default {
                     phone: this.userInfo.phone,
                     email: this.userInfo.email
                 };
+                this.$refs.form.resetFields();
             });
         },
         onSave() {

+ 6 - 5
src/main/zhi-rong-web/src/components/popup/TechProductDemandAdd.vue

@@ -70,15 +70,15 @@
                     </el-option>
                 </el-select>
             </el-form-item>
-            <el-form-item label="交易方式" prop="mode" v-if="formData.tpType === 'TECHNOLOGY'">
-                <el-radio-group v-model="formData.mode">
+            <el-form-item label="交易方式" prop="modeId" v-if="formData.tpType === 'TECHNOLOGY'">
+                <el-radio-group v-model="formData.modeId">
                     <el-radio v-for="item in tradingMethodOptionsDemand" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
                 </el-radio-group>
             </el-form-item>
-            <el-form-item label="交易方式" prop="mode" v-else>
-                <el-radio-group v-model="formData.mode">
+            <el-form-item label="交易方式" prop="modeId" v-else>
+                <el-radio-group v-model="formData.modeId">
                     <el-radio v-for="item in tradingMethodOptionsDemands" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -135,6 +135,7 @@ export default {
     name: 'TechProductDemandEdit',
     data() {
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {
@@ -190,7 +191,7 @@ export default {
                         trigger: 'blur'
                     }
                 ],
-                mode: [{ required: true, message: '请选择交易方式' }],
+                modeId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,

+ 6 - 5
src/main/zhi-rong-web/src/components/popup/TechnologyProductAdd.vue

@@ -119,15 +119,15 @@
                 >
                 </el-select>
             </el-form-item>
-            <el-form-item prop="tradingMethod" label="交易方式" class="block" v-if="formData.tpType === 'TECHNOLOGY'">
-                <el-radio-group v-model="formData.tradingMethod">
+            <el-form-item prop="tradingMethodId" label="交易方式" class="block" v-if="formData.tpType === 'TECHNOLOGY'">
+                <el-radio-group v-model="formData.tradingMethodId">
                     <el-radio v-for="item in tradingMethodOptionsDemand" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
                 </el-radio-group>
             </el-form-item>
-            <el-form-item prop="tradingMethod" label="交易方式" class="block" v-else>
-                <el-radio-group v-model="formData.tradingMethod">
+            <el-form-item prop="tradingMethodId" label="交易方式" class="block" v-else>
+                <el-radio-group v-model="formData.tradingMethodId">
                     <el-radio v-for="item in tradingMethodOptionsDemands" :key="item.value" :label="item.value">
                         {{ item.label }}
                     </el-radio>
@@ -219,6 +219,7 @@ export default {
     },
     data() {
         return {
+            needChange: true,
             show: false,
             saving: false,
             formData: {},
@@ -256,7 +257,7 @@ export default {
                     }
                 ],
                 patentNo: [{ required: true, message: '请输入包含专利号' }],
-                tradingMethod: [{ required: true, message: '请选择交易方式' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式' }],
                 expectedPrice: [
                     {
                         required: true,

+ 33 - 8
src/main/zhi-rong-web/src/mixins/common.js

@@ -1,4 +1,5 @@
 import dayjs from 'dayjs';
+import { checkSetting } from '../utils/getVariables.js'
 export default {
     computed: {
         isLogin() {
@@ -55,14 +56,12 @@ export default {
             );
         },
         getLabelName(val = '', list = []) {
-            console.log(val);
-            console.log(list);
 
             let info = list.find(item => {
                 return item.value === val;
             });
 
-            return info ? info.label : '';
+            return info ? info.label : val;
         },
         showList(list = [], tag = ',') {
             if (!list) {
@@ -104,7 +103,7 @@ export default {
                     phone: phone,
                     code: code
                 })
-                .then(() => {})
+                .then(() => { })
                 .catch(e => {
                     this.$message.error(e.error);
                 });
@@ -118,7 +117,7 @@ export default {
                     .then(() => {
                         this.$router.push('/login');
                     })
-                    .catch(() => {});
+                    .catch(() => { });
 
                 return Promise.reject({
                     error: '未登录'
@@ -133,8 +132,12 @@ export default {
                         cancelButtonText: '取消'
                     })
                         .then(() => {
-                            if (info && info.status === 'DENY') {
+                            if (this.$store.state.personalInfo && info.status === 'PENDING') {
                                 this.$router.push('/authentication');
+                            } else if (this.$store.state.personalInfo && info.status === 'DENY') {
+                                this.$router.push('/Authenticationfail');
+                            } else if (this.$store.state.institutionInfo && info.status === 'DENY') {
+                                this.$router.push('/Authenticationsfail');
                             } else if (!info) {
                                 this.$router.push('/registration');
                             } else if (this.$store.state.personalInfo) {
@@ -143,7 +146,7 @@ export default {
                                 this.$router.push('/authentications');
                             }
                         })
-                        .catch(() => {});
+                        .catch(() => { });
                     return Promise.reject({
                         error: '未认证'
                     });
@@ -157,9 +160,31 @@ export default {
                 this.$alert(res.value, '提示', {
                     confirmButtonText: '确定',
                     center: true,
-                    callback: () => {}
+                    callback: () => { }
                 });
             });
+        },
+        getSetting(flag = 1, keyName) {
+            return this.$http
+                .post('/setting/byFlag', { flag: flag })
+                .then(res => {
+                    let list = res.map(item => {
+                        return {
+                            label: item.name,
+                            value: item.id
+                        }
+                    })
+                    if (keyName) {
+                        this[keyName] = list;
+                    }
+                    return Promise.resolve(list)
+                })
+        }
+    },
+    created() {
+        if (this.needChange || this.list) {
+            let list = Object.keys(this.$data)
+            checkSetting(list, this.getSetting)
         }
     }
 };

+ 22 - 0
src/main/zhi-rong-web/src/utils/getVariables.js

@@ -0,0 +1,22 @@
+import http from "../plugins/http";
+
+const flags = new Map([
+    ['tradingMethodOption', 24],
+    ['patentTypeOptions', 25],
+    ['patentStatusOptions', 26],
+    ['intePropLawStatus',27],
+    ['typeOptions',28],
+    ['tradingMethodOptionsDemands',29],
+    ['tradingMethodOptionsDemand',30]
+])
+
+var checkList = [];
+
+export function checkSetting(keys = [], cb) {
+    let flagKeys = [...flags.keys()];
+    keys.forEach(item => {
+        if (flagKeys.includes(item) && !checkList.includes(item)) {
+            cb(flags.get(item), item)
+        }
+    })
+}

+ 2 - 14
src/main/zhi-rong-web/src/utils/variables.js

@@ -163,20 +163,8 @@ export const logoTypeOptions = [
     }
 ];
 
-export const patentTypeOptions = [
-    {
-        label: '发明',
-        value: 'INVENTION'
-    },
-    {
-        label: '实用新型',
-        value: 'UTILITY_MODEL'
-    },
-    {
-        label: '外观设计',
-        value: 'APPEARANCE_DESIGN'
-    }
-];
+//24
+export var patentTypeOptions =[];
 
 export const lawStatusOptions = [
     {

+ 2 - 2
src/main/zhi-rong-web/src/views/detail/IntellectualProperty.vue

@@ -15,7 +15,7 @@
                     </div>
                     <div class="info-item">
                         <span class="text1">专利区分:</span>
-                        <span class="text2">{{ getLabelName(info.type, typeOptions) }}</span>
+                        <span class="text2">{{ info.type }}</span>
                     </div>
                     <div class="info-item">
                         <span class="text1">行业分类:</span>
@@ -23,7 +23,7 @@
                     </div>
                     <div class="info-item">
                         <span class="text1">法律状态:</span>
-                        <span class="text2">{{ getLabelName(info.lawStatus, intePropLawStatus) }}</span>
+                        <span class="text2">{{ info.lawStatus }}</span>
                     </div>
                     <div class="info-item">
                         <span class="text1">专利权人:</span>

+ 0 - 6
src/main/zhi-rong-web/src/views/detail/Patent.vue

@@ -91,10 +91,7 @@
 import BreadPage from '../../components/page/BreadPage.vue';
 import comEvent from '../../mixins/comEvent';
 import {
-    patentTypeOptions,
-    patentStatusOptions,
     ownerTypeOptions,
-    tradingMethodOptions,
     commissionTypeOptions,
     caseTypeOptions
 } from '../../utils/variables';
@@ -102,10 +99,7 @@ export default {
     data() {
         return {
             info: {},
-            patentTypeOptions,
-            patentStatusOptions,
             ownerTypeOptions,
-            tradingMethodOptions,
             commissionTypeOptions,
             loading: true
         };

+ 3 - 3
src/main/zhi-rong-web/src/views/legal/IntellectualProperty.vue

@@ -42,10 +42,10 @@ export default {
             return [
                 {
                     name: '专利区分',
-                    key: 'type',
+                    key: 'typeId',
                     type: 'select',
                     list: [...this.typeOptions],
-                    default: this.$route.query.type || ''
+                    default: this.$route.query.typeId ? Number(this.$route.query.typeId) : ''
                 },
                 {
                     name: '行业分类',
@@ -55,7 +55,7 @@ export default {
                 },
                 {
                     name: '法律状态',
-                    key: 'lawStatus',
+                    key: 'lawStatusId',
                     type: 'select',
                     list: [...this.intePropLawStatus]
                 },

+ 1 - 1
src/main/zhi-rong-web/src/views/market/Copyright.vue

@@ -60,7 +60,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'tradingMethod',
+                    key: 'tradingMethodId',
                     list: [...this.tradingMethodOption]
                 },
                 {

+ 1 - 1
src/main/zhi-rong-web/src/views/market/CopyrightDemand.vue

@@ -61,7 +61,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'modeId',
                     list: [...this.tradingMethodOption]
                 },
                 {

+ 1 - 1
src/main/zhi-rong-web/src/views/market/Logo.vue

@@ -64,7 +64,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'tradingMethod',
+                    key: 'tradingMethodId',
                     list: [...this.tradingMethodOption]
                 },
                 {

+ 1 - 1
src/main/zhi-rong-web/src/views/market/LogoDemand.vue

@@ -59,7 +59,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'modeId',
                     list: [...this.tradingMethodOption]
                 },
                 {

+ 13 - 38
src/main/zhi-rong-web/src/views/market/Patent.vue

@@ -64,7 +64,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'tradingMethodId',
                     list: [...this.tradingMethodOption]
                 },
                 {
@@ -88,17 +88,17 @@ export default {
                 },
                 {
                     name: '专利类型',
-                    key: 'patentType',
+                    key: 'patentTypeId',
                     list: [...this.patentTypeOptions]
                 },
                 {
                     name: '法律状态',
-                    key: 'lawStatus',
+                    key: 'lawStatusId',
                     list: [...this.patentStatusOptions]
                 },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'tradingMethodId',
                     list: [...this.tradingMethodOption]
                 },
                 {
@@ -140,46 +140,21 @@ export default {
     },
     methods: {
         init() {
-            this.$http
-                .post('/setting/byFlag', { flag: 13 })
-                .then(res => {
-                    if (res.length > 0) {
-                        this.fieldOptions = res.map(item => {
-                            return {
-                                label: item.name,
-                                value: item.id
-                            };
+            if (this.$route.query.caseType == 'DECLASSIFICATION') {
+                this.getSetting(13, 'fieldOptions').then(
+                    () => {
+                        this.$nextTick(() => {
+                            this.$refs.list.init();
                         });
                     }
-
-                    this.$nextTick(() => {
-                        this.$refs.list.init();
-                    });
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
-                });
-            this.$http
-                .post('/setting/byFlag', { flag: 1 })
-                .then(res => {
-                    if (res.length > 0) {
-                        this.fieldOption = res.map(item => {
-                            return {
-                                label: item.name,
-                                value: item.id
-                            };
-                        });
-                    }
-
+                );
+            } else {
+                  this.getSetting(1, 'fieldOption').then(() => {
                     this.$nextTick(() => {
                         this.$refs.list.init();
                     });
-                })
-                .catch(e => {
-                    console.log(e);
-                    this.$message.error(e.error);
                 });
+            }
         },
         addInfo() {
             this.checkLogin(true).then(() => {

+ 4 - 4
src/main/zhi-rong-web/src/views/market/PatentDemand.vue

@@ -71,7 +71,7 @@ export default {
                 // },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'modeId',
                     list: [...this.tradingMethodOption]
                 },
 
@@ -96,18 +96,18 @@ export default {
                 },
                 {
                     name: '专利类型',
-                    key: 'patentType',
+                    key: 'patentTypeId',
                     list: [...this.patentTypeOptions]
                 },
                 {
                     name: '法律状态',
-                    key: 'patentStatus',
+                    key: 'patentStatusId',
                     list: [...this.patentStatusOptions]
                 },
 
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'modeId',
                     list: [...this.tradingMethodOption]
                 },
                 {

+ 2 - 2
src/main/zhi-rong-web/src/views/market/TechProductDemand.vue

@@ -78,7 +78,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'modeId',
                     list: [...this.tradingMethodOptionsDemand]
                 },
                 {
@@ -107,7 +107,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'mode',
+                    key: 'modeId',
                     list: [...this.tradingMethodOptionsDemands]
                 },
                 {

+ 2 - 2
src/main/zhi-rong-web/src/views/market/TechnologyProduct.vue

@@ -75,7 +75,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'tradingMethod',
+                    key: 'tradingMethodId',
                     list: [...this.tradingMethodOptionsDemand]
                 },
                 {
@@ -104,7 +104,7 @@ export default {
                 },
                 {
                     name: '交易方式',
-                    key: 'tradingMethod',
+                    key: 'tradingMethodId',
                     list: [...this.tradingMethodOptionsDemands]
                 },
                 {

+ 3 - 3
src/main/zhi-rong-web/src/views/user/Demandpatent.vue

@@ -40,8 +40,8 @@
                         resize="none"
                     ></el-input>
                 </el-form-item>
-                <el-form-item label="转化类型" prop="mode">
-                    <el-radio-group v-model="formData.mode">
+                <el-form-item label="转化类型" prop="modeId">
+                    <el-radio-group v-model="formData.modeId">
                         <el-radio v-for="item in tradingMethodOptions" :key="item.value" :label="item.value">
                             {{ item.label }}
                         </el-radio>
@@ -119,7 +119,7 @@ export default {
                 keyword: [{ required: true, message: '请输入专利关键字' }],
                 industryClass: [{ required: true, message: '请选择行业分类' }],
                 description: [{ required: true, message: '请输入专利摘要' }],
-                mode: [{ required: true, message: '请选择转化类型' }],
+                modeId: [{ required: true, message: '请选择转化类型' }],
                 expectedPrice: [{ required: true, message: '请输入期望价', trigger: 'blur' }],
                 contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
                 phone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],

+ 0 - 9
src/main/zhi-rong-web/src/views/user/UserMain.vue

@@ -75,15 +75,6 @@ export default {
                     this.$router.push('/userEdit');
                 }
             }
-            if (key == '/publish/patent?caseType=DECLASSIFICATION') {
-                this.$nextTick(() => {
-                    if (this.type) {
-                        this.$router.push('/publish/patent?caseType=DECLASSIFICATION');
-                    } else {
-                        this.$router.push('/userEdit');
-                    }
-                });
-            }
         }
     }
 };

+ 4 - 3
src/main/zhi-rong-web/src/views/user/publish/CopyrightDemandEdit.vue

@@ -43,8 +43,8 @@
                         resize="none"
                     ></el-input>
                 </el-form-item>
-                <el-form-item label="交易方式" prop="mode">
-                    <el-radio-group v-model="formData.mode">
+                <el-form-item label="交易方式" prop="modeId">
+                    <el-radio-group v-model="formData.modeId">
                         <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                             {{ item.label }}
                         </el-radio>
@@ -134,6 +134,7 @@ export default {
     data() {
         return {
             saving: false,
+            needChange: true,
             formData: {},
             workTypeOptions: [],
             mode2Options,
@@ -166,7 +167,7 @@ export default {
                     }
                 ],
                 description: [{ required: true, message: '请填写需求描述', trigger: 'blur' }],
-                mode: [{ required: true, message: '请选择交易方式', trigger: 'blur' }],
+                modeId: [{ required: true, message: '请选择交易方式', trigger: 'blur' }],
                 expectedPrice: [
                     {
                         required: true,

+ 1 - 0
src/main/zhi-rong-web/src/views/user/publish/CopyrightEdit.vue

@@ -161,6 +161,7 @@ export default {
             formData: {},
             workTypeOptions: [],
             tradingMethodOption,
+            needChange: true,
             commissionTypeOptions: [
                 { label: '佣金', value: 'COMMISSION' },
                 { label: '百分比', value: 'PERCENTAGE' }

+ 1 - 0
src/main/zhi-rong-web/src/views/user/publish/FundingEdit.vue

@@ -111,6 +111,7 @@ export default {
         return {
             saving: false,
             formData: {},
+            needChange: true,
             rules: {
                 amount: [{ required: true, message: '请输入拟融资额', trigger: 'blur' }],
                 loanTerm: [{ required: true, message: '请选择期望贷款期限', trigger: 'blur' }],

+ 3 - 2
src/main/zhi-rong-web/src/views/user/publish/Index.vue

@@ -68,7 +68,9 @@ export default {
             console.log(item);
         },
         addRow() {
-            this.$refs.list.addRow();
+            this.checkLogin(true).then(() => {
+                this.$refs.list.addRow();
+            });
         },
         handleClick(info) {
             let path = '';
@@ -77,7 +79,6 @@ export default {
             } else {
                 path = '/publish/patentDemand?caseType=DECLASSIFICATION';
             }
-            console.log(name);
             this.$router.replace({
                 path: path
             });

+ 1 - 0
src/main/zhi-rong-web/src/views/user/publish/LogoEdit.vue

@@ -205,6 +205,7 @@ export default {
         };
         return {
             saving: false,
+            needChange: true,
             formData: {
                 servicesItem: []
             },

+ 10 - 9
src/main/zhi-rong-web/src/views/user/publish/PatentEdit.vue

@@ -32,13 +32,13 @@
                 </el-form-item>
                 <el-form-item
                     v-if="caseType === 'GENERAL'"
-                    prop="patentType"
+                    prop="patentTypeId"
                     label="专利类型"
                     style="margin-right: 133px"
                 >
                     <el-select
                         style="width: 200px"
-                        v-model="formData.patentType"
+                        v-model="formData.patentTypeId"
                         clearable
                         filterable
                         placeholder="请选择"
@@ -91,9 +91,9 @@
                         </el-option>
                     </el-select>
                 </el-form-item> -->
-                <el-form-item prop="lawStatus" v-if="caseType === 'GENERAL'" label="法律状态">
+                <el-form-item prop="lawStatusId" v-if="caseType === 'GENERAL'" label="法律状态">
                     <el-select
-                        v-model="formData.lawStatus"
+                        v-model="formData.lawStatusId"
                         clearable
                         filterable
                         placeholder="请选择"
@@ -177,8 +177,8 @@
                     <rich-text v-model="formData.manual"></rich-text>
                 </el-form-item>
 
-                <el-form-item prop="tradingMethod" label="交易方式" class="block">
-                    <el-radio-group v-model="formData.tradingMethod">
+                <el-form-item prop="tradingMethodId" label="交易方式" class="block">
+                    <el-radio-group v-model="formData.tradingMethodId">
                         <el-radio v-for="item in tradingMethodOption" :key="item.value" :label="item.value">
                             {{ item.label }}
                         </el-radio>
@@ -282,6 +282,7 @@ export default {
             }
         };
         return {
+            needChange: true,
             saving: false,
             formData: {
                 inventor: [],
@@ -291,9 +292,9 @@ export default {
             rules: {
                 name: [{ required: true, message: '请输入专利名称', trigger: 'blur' }],
                 code: [{ required: true, message: '请输入专利申请号', trigger: 'blur' }],
-                patentType: [{ required: true, message: '请选择专利类型', trigger: 'blur' }],
+                patentTypeId: [{ required: true, message: '请选择专利类型', trigger: 'blur' }],
                 industryClass: [{ required: true, message: '请选择所属领域', trigger: 'blur' }],
-                lawStatus: [{ required: true, message: '请选择法律状态', trigger: 'blur' }],
+                lawStatusId: [{ required: true, message: '请选择法律状态', trigger: 'blur' }],
                 ownerType: [{ required: true, message: '请输入专利权人类型', trigger: 'blur' }],
                 owner: [{ required: true, message: '请输入专利权人', trigger: 'blur' }],
                 inventor: [{ required: true, message: '请输入发明人', trigger: 'blur' }],
@@ -301,7 +302,7 @@ export default {
                 applicant: [{ required: true, message: '请输入申请人', trigger: 'blur' }],
                 digest: [{ required: true, message: '请填写专利摘要', trigger: 'blur' }],
                 manual: [{ required: true, message: '请输入专利说明', trigger: 'blur' }],
-                tradingMethod: [{ required: true, message: '请选择交易方式', trigger: 'blur' }],
+                tradingMethodId: [{ required: true, message: '请选择交易方式', trigger: 'blur' }],
                 expectedPrice: [{ required: true, validator: validatePrice, message: '请选择期望价方式' }],
                 contact: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
                 basePrice: [{ required: true, message: '请输入底价', trigger: 'blur' }],

+ 1 - 0
src/main/zhi-rong-web/src/views/user/publish/ServiceProviderEdit.vue

@@ -145,6 +145,7 @@ export default {
                 email: [{ type: 'email', required: true, message: '请输入邮箱', trigger: 'blur' }],
                 address: [{ required: true, message: '请输入所在地区', trigger: 'blur' }]
             },
+            needChange: true,
             fieldOptions: []
         };
     },

+ 6 - 5
src/main/zhi-rong-web/src/views/user/publish/TechProductDemandEdit.vue

@@ -79,15 +79,15 @@
                         </el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item label="交易方式" prop="mode" v-if="tpType === 'TECHNOLOGY'">
-                    <el-radio-group v-model="formData.mode">
+                <el-form-item label="交易方式" prop="modeId" v-if="tpType === 'TECHNOLOGY'">
+                    <el-radio-group v-model="formData.modeId">
                         <el-radio v-for="item in tradingMethodOptionsDemand" :key="item.value" :label="item.value">
                             {{ item.label }}
                         </el-radio>
                     </el-radio-group>
                 </el-form-item>
-                <el-form-item label="交易方式" prop="mode" v-else>
-                    <el-radio-group v-model="formData.mode">
+                <el-form-item label="交易方式" prop="modeId" v-else>
+                    <el-radio-group v-model="formData.modeId">
                         <el-radio v-for="item in tradingMethodOptionsDemands" :key="item.value" :label="item.value">
                             {{ item.label }}
                         </el-radio>
@@ -184,6 +184,7 @@ export default {
         return {
             show: false,
             saving: false,
+            needChange: true,
             formData: {
                 isPatented: false
             },
@@ -219,7 +220,7 @@ export default {
                         trigger: 'blur'
                     }
                 ],
-                mode: [{ required: true, message: '请选择交易方式', trigger: 'blur' }],
+                modeId: [{ required: true, message: '请选择交易方式', trigger: 'blur' }],
                 expectedPrice: [
                     {
                         required: true,

Некоторые файлы не были показаны из-за большого количества измененных файлов