technology.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div id="technology">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-col :span="24" class="shaixuan">
  6. 技术领域:
  7. <el-select v-model="field" filterable clearable placeholder="请选择所属领域" @change="changeField">
  8. <el-option label="先进制造" value="0"></el-option>
  9. <el-option label="新材料" value="1"></el-option>
  10. <el-option label="光电子" value="2"></el-option>
  11. <el-option label="信息技术" value="3"></el-option>
  12. <el-option label="文化和科技融合" value="4"></el-option>
  13. </el-select>
  14. </el-col>
  15. <el-col :span="24">
  16. <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
  17. <el-col :span="24" class="name">
  18. {{ item.name }}
  19. </el-col>
  20. <el-col :span="24" class="text">
  21. 技术领域
  22. <span>
  23. {{
  24. item.field == '0'
  25. ? '先进制造'
  26. : item.field == '1'
  27. ? '新材料'
  28. : item.field == '2'
  29. ? '光电子'
  30. : item.field == '3'
  31. ? '信息技术'
  32. : item.field == '4'
  33. ? '文化和科技融合'
  34. : '暂无'
  35. }}
  36. </span>
  37. </el-col>
  38. <el-col :span="24" class="text">
  39. 合作方式
  40. <span>
  41. {{
  42. item.coopermode == '0'
  43. ? '技术转让'
  44. : item.coopermode == '1'
  45. ? '技术服务'
  46. : item.coopermode == '2'
  47. ? '技术许可'
  48. : item.coopermode == '3'
  49. ? '技术融资'
  50. : item.coopermode == '4'
  51. ? '其他'
  52. : '暂无'
  53. }}
  54. </span>
  55. </el-col>
  56. <el-col :span="24" class="text">
  57. 交易方式:
  58. <span>
  59. {{ item.business == '0' ? '公用' : item.business == '1' ? '竞价' : item.business == '2' ? '转让' : '暂无' }}
  60. </span>
  61. </el-col>
  62. </el-col>
  63. </el-col>
  64. </el-col>
  65. </el-row>
  66. </div>
  67. </template>
  68. <script>
  69. import { mapState, createNamespacedHelpers } from 'vuex';
  70. const { mapActions: dock } = createNamespacedHelpers('dock');
  71. import _ from 'loadsh';
  72. export default {
  73. name: 'technology',
  74. props: {},
  75. components: {},
  76. data: function() {
  77. return {
  78. // 筛选
  79. field: '',
  80. list: [],
  81. newArr: [],
  82. };
  83. },
  84. created() {
  85. this.search();
  86. },
  87. methods: {
  88. ...dock(['query', 'delete', 'update', 'fetch']),
  89. async search({ skip = 0, limit = 10, ...info } = {}) {
  90. let res = await this.fetch(this.user.remark);
  91. let arr = res.data.apply.map(item => item.goodsList);
  92. arr = _.flattenDeep(arr);
  93. var newArr = arr.filter(item => item.totaltype === '0');
  94. this.$set(this, `newArr`, newArr);
  95. this.$set(this, `list`, newArr);
  96. },
  97. // 筛选技术领域
  98. changeField(value) {
  99. var arr = this.newArr.filter(item => item.field === value);
  100. this.$set(this, `list`, arr);
  101. },
  102. },
  103. computed: {
  104. ...mapState(['user']),
  105. pageTitle() {
  106. return `${this.$route.meta.title}`;
  107. },
  108. },
  109. metaInfo() {
  110. return { title: this.$route.meta.title };
  111. },
  112. };
  113. </script>
  114. <style lang="less" scoped>
  115. .shaixuan {
  116. padding: 0 0 10px 10px;
  117. }
  118. .list {
  119. margin: 0 5px 10px 5px;
  120. width: 97%;
  121. padding: 0 10px;
  122. border-radius: 10px;
  123. background: #f9fafc;
  124. .name {
  125. padding: 5px 0px;
  126. font-size: 16px;
  127. }
  128. .text {
  129. padding: 5px 0;
  130. font-size: 14px;
  131. color: #ccc;
  132. span {
  133. color: #000;
  134. }
  135. }
  136. }
  137. </style>