attestation.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <div class="index">
  3. <el-row>
  4. <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
  5. <el-col :span="24" class="one">认证入驻 </el-col>
  6. <el-col :span="24" class="two">
  7. <el-tabs v-model="activeName" class="tabs">
  8. <el-tab-pane :name="item.code" v-for="(item, index) in roleList" :key="index">
  9. <template #label>
  10. <span class="custom-tabs-label">
  11. <span>{{ item.title }}</span>
  12. </span>
  13. </template>
  14. </el-tab-pane>
  15. </el-tabs>
  16. </el-col>
  17. <el-col :span="24" class="thr">
  18. <expert v-if="activeName == 'Expert'"></expert>
  19. <company v-if="activeName == 'Company'"></company>
  20. <incubator v-if="activeName == 'Incubator'"></incubator>
  21. <competition v-if="activeName == 'Competition'"></competition>
  22. <investment v-if="activeName == 'Investment'"></investment>
  23. <association v-if="activeName == 'Association'"></association>
  24. <school v-if="activeName == 'School'"></school>
  25. <state v-if="activeName == 'State'"></state>
  26. <unit v-if="activeName == 'Unit'"></unit>
  27. </el-col>
  28. </el-col>
  29. </el-row>
  30. </div>
  31. </template>
  32. <script setup>
  33. import { cloneDeep } from 'lodash-es'
  34. const $checkRes = inject('$checkRes')
  35. import { UserStore } from '@/store/user'
  36. const userStore = UserStore()
  37. const user = computed(() => userStore.user)
  38. // 组件
  39. import school from './parts/school.vue'
  40. import association from './parts/association.vue'
  41. import company from './parts/company.vue'
  42. import competition from './parts/competition.vue'
  43. import expert from './parts/expert.vue'
  44. import incubator from './parts/incubator.vue'
  45. import state from './parts/state.vue'
  46. import unit from './parts/unit.vue'
  47. import investment from './parts/investment.vue'
  48. // 接口
  49. import { RoleStore } from '@/store/api/system/role'
  50. const roleStore = RoleStore()
  51. import { UsersStore } from '@/store/api/user/user'
  52. const store = UsersStore()
  53. import { DictDataStore } from '@/store/api/system/dictData'
  54. import { RegionStore } from '@/store/api/system/region'
  55. import { SectorStore } from '@/store/api/platform/sector'
  56. const sectorStore = SectorStore()
  57. const dictDataStore = DictDataStore()
  58. const regionStore = RegionStore()
  59. const activeName = ref('')
  60. // 加载中
  61. const loading = ref(false)
  62. // 字典
  63. const roleList = ref([])
  64. const typeList = ref([])
  65. const genderList = ref([])
  66. const fieldList = ref([])
  67. const educationList = ref([])
  68. const cityList = ref([])
  69. const isUseList = ref([])
  70. const patternList = ref([])
  71. const scaleList = ref([])
  72. const IndustryList = ref([])
  73. const cardTypeList = ref([])
  74. const contributionList = ref([])
  75. const plateList = ref([])
  76. const modeList = ref([])
  77. const statusList = ref([])
  78. const yearList = ref([])
  79. // 请求
  80. onMounted(async () => {
  81. loading.value = true
  82. await search()
  83. await searchOther()
  84. loading.value = false
  85. })
  86. const searchOther = async () => {
  87. let result
  88. // 角色
  89. result = await roleStore.prove({ user: user.value.id })
  90. if ($checkRes(result)) {
  91. roleList.value = result.data
  92. activeName.value = result.data[0].code
  93. }
  94. // 性别
  95. result = await dictDataStore.query({ code: 'gender', is_use: '0' })
  96. if ($checkRes(result)) genderList.value = result.data
  97. // 用户类型
  98. result = await dictDataStore.query({ code: 'userType', is_use: '0' })
  99. if ($checkRes(result)) typeList.value = result.data
  100. // 专家领域
  101. result = await dictDataStore.query({ code: 'field', is_use: '0' })
  102. if ($checkRes(result)) fieldList.value = result.data
  103. // 企业类型
  104. result = await dictDataStore.query({ code: 'companyType', is_use: '0' })
  105. if ($checkRes(result)) patternList.value = result.data
  106. // 企业规模
  107. result = await dictDataStore.query({ code: 'companyScale', is_use: '0' })
  108. if ($checkRes(result)) scaleList.value = result.data
  109. // 企业所属行业
  110. result = await dictDataStore.query({ code: 'companyIndustry', is_use: '0' })
  111. if ($checkRes(result)) IndustryList.value = result.data
  112. // 学历
  113. result = await dictDataStore.query({ code: 'education', is_use: '0' })
  114. if ($checkRes(result)) educationList.value = result.data
  115. // 证件类型
  116. result = await dictDataStore.query({ code: 'cardType', is_use: '0' })
  117. if ($checkRes(result)) cardTypeList.value = result.data
  118. // 出资方式
  119. result = await dictDataStore.query({ code: 'contribution', is_use: '0' })
  120. if ($checkRes(result)) contributionList.value = result.data
  121. // 是否使用
  122. result = await dictDataStore.query({ code: 'isUse', is_use: '0' })
  123. if ($checkRes(result)) isUseList.value = result.data
  124. // 城市
  125. result = await regionStore.area({ level: 'province', code: 22 })
  126. if ($checkRes(result)) cityList.value = result.data
  127. // 板块
  128. result = await sectorStore.query({ is_use: '0' })
  129. if ($checkRes(result)) plateList.value = result.data
  130. // 盈利模式
  131. result = await dictDataStore.query({ code: 'modeType', is_use: '0' })
  132. if ($checkRes(result)) modeList.value = result.data
  133. // 状态
  134. result = await dictDataStore.query({ code: 'examStatus', is_use: '0' })
  135. if ($checkRes(result)) statusList.value = result.data
  136. // 年度
  137. result = await dictDataStore.query({ code: 'year', is_use: '0' })
  138. if ($checkRes(result)) yearList.value = result.data
  139. }
  140. const search = async () => {
  141. if (user.value.id) {
  142. let res = await store.detail(user.value.id)
  143. if (res.errcode == '0') userStore.setUser(res.data)
  144. }
  145. }
  146. // provide
  147. provide('cloneDeep', cloneDeep)
  148. // 字典
  149. provide('genderList', genderList)
  150. provide('fieldList', fieldList)
  151. provide('educationList', educationList)
  152. provide('cityList', cityList)
  153. provide('isUseList', isUseList)
  154. provide('patternList', patternList)
  155. provide('scaleList', scaleList)
  156. provide('IndustryList', IndustryList)
  157. provide('cardTypeList', cardTypeList)
  158. provide('contributionList', contributionList)
  159. provide('plateList', plateList)
  160. provide('modeList', modeList)
  161. provide('yearList', yearList)
  162. provide('statusList', statusList)
  163. </script>
  164. <style scoped lang="scss">
  165. .main {
  166. .one {
  167. font-size: $global-font-size-20;
  168. font-weight: 700;
  169. margin: 0 0 20px 0;
  170. }
  171. .thr {
  172. padding: 20px;
  173. }
  174. }
  175. </style>