seven.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div id="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">
  6. <el-image class="image" :src="news" fit="fill" />
  7. </el-col>
  8. <el-col :span="24" class="two">
  9. <div class="w_1200">
  10. <el-col :span="24" class="two_1">
  11. <el-row class="two_1_1">
  12. <el-col :span="2" class="left">服务分类:</el-col>
  13. <el-col :span="22" class="right">
  14. <a-checkbox-group v-model:value="value" style="width: 100%">
  15. <a-row>
  16. <a-col :span="8" v-for="(item, index) in typeList" :key="index">
  17. <a-checkbox :value="item.value">{{ item.label }}</a-checkbox>
  18. </a-col>
  19. </a-row>
  20. </a-checkbox-group>
  21. </el-col>
  22. </el-row>
  23. <el-row class="two_1_1">
  24. <el-col :span="2" class="left">机构名称:</el-col>
  25. <el-col :span="22" class="right">
  26. <a-input class="input" v-model:value="value" placeholder="请输入机构名称" />
  27. <a-button class="button" type="primary">检索</a-button>
  28. </el-col>
  29. </el-row>
  30. </el-col>
  31. <el-col :span="24" class="two_2">
  32. <a-table :columns="columns" :data-source="data" bordered>
  33. <template #bodyCell="{ column, text, record }">
  34. <template v-if="column.dataIndex === 'operation'">
  35. <a-popconfirm>
  36. <a @click="toView(record.key)">查看</a>
  37. </a-popconfirm>
  38. </template>
  39. </template>
  40. </a-table>
  41. </el-col>
  42. </div>
  43. </el-col>
  44. </el-col>
  45. </el-row>
  46. </div>
  47. </template>
  48. <script setup>
  49. // 图片引入
  50. import news from '/images/news.png'
  51. // 路由
  52. const router = useRouter()
  53. // 加载中
  54. const loading = ref(false)
  55. const typeList = ref([
  56. { label: '科技信息', value: '0' },
  57. { label: '中介咨询', value: '1' },
  58. { label: '科技金融', value: '2' },
  59. { label: '仪器设备', value: '3' },
  60. { label: '创新创业', value: '4' },
  61. { label: '法律服务', value: '5' },
  62. { label: '技术转移与推广', value: '6' },
  63. { label: '知识产权', value: '7' },
  64. { label: '人才培训', value: '8' },
  65. { label: '产品研发', value: '9' },
  66. { label: '财税服务', value: '10' },
  67. { label: '信息化服务', value: '11' }
  68. ])
  69. const columns = [
  70. {
  71. title: '序号',
  72. dataIndex: 'key'
  73. },
  74. {
  75. title: '公司名称',
  76. dataIndex: 'name'
  77. },
  78. {
  79. title: '服务领域',
  80. dataIndex: 'field'
  81. },
  82. {
  83. title: '登记时间',
  84. dataIndex: 'time'
  85. },
  86. {
  87. title: '操作',
  88. dataIndex: 'operation'
  89. }
  90. ]
  91. const data = [
  92. {
  93. key: '1',
  94. name: '长春市XXX有限公司',
  95. field: '科技金融',
  96. time: '2020-07-01'
  97. },
  98. {
  99. key: '2',
  100. name: '长春市XXX有限公司',
  101. field: '科技金融',
  102. time: '2021-02-09'
  103. },
  104. {
  105. key: '3',
  106. name: '长春市XXX有限公司',
  107. field: '科技金融',
  108. time: '2023-11-11'
  109. },
  110. {
  111. key: '4',
  112. name: '长春市XXX有限公司',
  113. field: '科技金融',
  114. time: '2021-04-21'
  115. },
  116. {
  117. key: '5',
  118. name: '长春市XXX有限公司',
  119. field: '科技金融',
  120. time: '2022-09-11'
  121. },
  122. {
  123. key: '6',
  124. name: '长春市XXX有限公司',
  125. field: '科技金融',
  126. time: '2023-07-51'
  127. }
  128. ]
  129. // 请求
  130. onMounted(async () => {
  131. loading.value = true
  132. await search()
  133. loading.value = false
  134. })
  135. const search = async () => {}
  136. // 查看
  137. const toView = (item) => {
  138. router.push({ path: '/server/detail', query: { id: item.id || item._id } })
  139. }
  140. </script>
  141. <style scoped lang="scss">
  142. .main {
  143. .one {
  144. .image {
  145. width: 100%;
  146. height: 200px;
  147. }
  148. }
  149. .two {
  150. .two_1 {
  151. background: #ffffff;
  152. border-radius: 10px;
  153. padding: 15px;
  154. margin: 10px 0 0 0;
  155. .two_1_1 {
  156. display: flex;
  157. align-items: center;
  158. padding: 10px 0;
  159. .right {
  160. display: flex;
  161. align-items: center;
  162. justify-content: space-between;
  163. .button {
  164. margin: 0 0 0 5px;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. }
  171. </style>