mixins.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. export default {
  2. data() {
  3. return {
  4. // 回避设计栏位
  5. columnList: [
  6. {
  7. name: "回避设计方向(可粘贴图片)",
  8. type: "String",
  9. value: "direction",
  10. },
  11. ],
  12. // 数据源
  13. tableData: [],
  14. // 回避设计总体方案
  15. wholeContent: '',
  16. }
  17. },
  18. mounted() {
  19. this.getList()
  20. },
  21. methods: {
  22. getList(split={splitType:'1',splitBy:'2'},ifReSplit=false) {
  23. let params = {
  24. ifReSplit: ifReSplit,
  25. projectId: Number(this.projectId),
  26. ...split,//拆分条件
  27. }
  28. this.$api.getAvoidDesign(params).then(res => {
  29. if (res.code == 200) {
  30. this.wholeContent=res.data.wholeContent
  31. if (res.data.avoidDesignRightVOS.length > 0) {
  32. var data = []
  33. res.data.avoidDesignRightVOS.forEach(RightVosItem => {
  34. if (RightVosItem.avoidDesignVOS.length > 0) {
  35. RightVosItem.avoidDesignVOS.forEach(FeaturesItem => {
  36. FeaturesItem.pRightName = RightVosItem.rightName
  37. FeaturesItem.pSignPatentNo = RightVosItem.signPatentNo
  38. FeaturesItem.pPatentNo = RightVosItem.patentNo
  39. FeaturesItem.pContentOut = RightVosItem.contentOut
  40. FeaturesItem.pContent = RightVosItem.content
  41. FeaturesItem.pProjectId = RightVosItem.projectId
  42. FeaturesItem.pType = RightVosItem.type
  43. FeaturesItem.pSort = RightVosItem.sort
  44. this.hasOwn(FeaturesItem)
  45. data.push(FeaturesItem)
  46. })
  47. }
  48. })
  49. this.tableData = data
  50. }
  51. }
  52. })
  53. },
  54. hasOwn(item) {
  55. if (!item.hasOwnProperty("explainText")) {
  56. item.explainText = ''
  57. }
  58. if (!item.hasOwnProperty("direction")) {
  59. item.direction = ''
  60. }
  61. },
  62. },
  63. }