index.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
  5. <cHead style="background-color: #2e3546; color: #f0f2f5"></cHead>
  6. <div class="w_1200">
  7. <el-col :span="24" class="one">
  8. <el-tabs v-model="activeName" @tab-click="handleClick">
  9. <el-tab-pane label="全部报名" name="0"></el-tab-pane>
  10. <el-tab-pane label="会议报名" name="1"></el-tab-pane>
  11. <el-tab-pane label="培训报名" name="2"></el-tab-pane>
  12. <el-tab-pane label="通知公告" name="3"></el-tab-pane>
  13. </el-tabs>
  14. </el-col>
  15. <el-col :span="24" class="two">
  16. <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
  17. <el-col :span="17" class="left textOver">
  18. <span class="value" :class="[item.status == '0' ? 'status0' : 'status1']">{{ item.status == '0' ? '会议' : '培训' }}</span>
  19. {{ item.title || '暂无标题' }}
  20. </el-col>
  21. <el-col :span="7" class="right">
  22. <span class="time">{{ moment(item.time).format('MM-DD HH:mm') }}</span>
  23. &nbsp;
  24. <span class="time">{{ item.status == '0' ? '报名已截止' : '报名已截止' }}</span>
  25. </el-col>
  26. </el-col>
  27. </el-col>
  28. <el-col :span="24" class="thr">
  29. <a-pagination v-model:page-size="limit" show-size-changer :page-size-options="pageSizeOptions" :total="total" @showSizeChange="onShowSizeChange" />
  30. </el-col>
  31. </div>
  32. </el-col>
  33. </el-row>
  34. <cFoot class="foot"></cFoot>
  35. </div>
  36. </template>
  37. <script setup lang="ts">
  38. // 基础
  39. import type { TabsPaneContext } from 'element-plus';
  40. import type { Ref } from 'vue';
  41. import { onMounted, getCurrentInstance, ref } from 'vue';
  42. import { useRouter } from 'vue-router';
  43. import moment from 'moment';
  44. // 接口
  45. // import { ToolsStore } from '@/stores/tool';
  46. // import type { IQueryResult } from '@/util/types.util';
  47. // const toolsAxios = ToolsStore();
  48. const { proxy } = getCurrentInstance() as any;
  49. // 路由
  50. const router = useRouter();
  51. // 加载中
  52. const loading: Ref<any> = ref(false);
  53. let list: Ref<any> = ref([
  54. {
  55. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  56. time: '2023-07-31',
  57. status: '0'
  58. },
  59. {
  60. title: '浙江省科学技术厅 关于第七届中国创新挑战赛(浙江)暨 2022年浙江省技术需求“揭榜挂帅”大赛技术需求公告',
  61. time: '2023-07-31',
  62. status: '1'
  63. },
  64. {
  65. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  66. time: '2023-07-31',
  67. status: '0'
  68. },
  69. {
  70. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  71. time: '2023-07-31',
  72. status: '0'
  73. },
  74. {
  75. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  76. time: '2023-07-31',
  77. status: '0'
  78. },
  79. {
  80. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  81. time: '2023-07-31',
  82. status: '1'
  83. },
  84. {
  85. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  86. time: '2023-07-31',
  87. status: '1'
  88. },
  89. {
  90. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  91. time: '2023-07-31',
  92. status: '1'
  93. },
  94. {
  95. title: '关于浙江大学衢州研究院1件技术秘密转让的公示',
  96. time: '2023-07-31',
  97. status: '0'
  98. }
  99. ]);
  100. let total: Ref<number> = ref(12);
  101. let skip = 0;
  102. let limit: number = proxy.$limit;
  103. const pageSizeOptions = ref<string[]>(['12', '24', '60', '120']);
  104. const activeName = ref('0');
  105. // 请求
  106. onMounted(async () => {
  107. loading.value = true;
  108. await searchOther();
  109. await search({ skip, limit });
  110. loading.value = false;
  111. });
  112. const search = async (e: { skip: number; limit: number }) => {
  113. const info = { skip: e.skip, limit: e.limit };
  114. // const res: IQueryResult = await userCheckAxios.query(info);
  115. // if (res.errcode == '0') {
  116. // list.value = res.data;
  117. // total.value = res.total;
  118. // }
  119. };
  120. // 查询其他信息
  121. const searchOther = async () => {
  122. // let res: IQueryResult;
  123. // // 性别
  124. // res = await dictAxios.query({ type: 'common_gender' });
  125. // if (res.errcode == '0') genderList.value = res.data;
  126. };
  127. // 活动大厅报告通知查看详情
  128. const toView = (item) => {
  129. router.push({ path: '/activity/new', query: { id: item.id || item._id } });
  130. };
  131. const onShowSizeChange = (current: number, pageSize: number) => {
  132. console.log(current, pageSize);
  133. limit = pageSize;
  134. };
  135. const handleClick = (tab: TabsPaneContext, event: Event) => {
  136. console.log(tab, event);
  137. }
  138. </script>
  139. <style scoped lang="scss">
  140. .main {
  141. background: url(/src/assets/detail.png) right top no-repeat;
  142. background-size: 100%;
  143. .two {
  144. .list:hover {
  145. box-shadow: 0 0 16px rgba(35, 116, 255, 0.6);
  146. }
  147. .list {
  148. display: flex;
  149. justify-content: space-between;
  150. align-items: center;
  151. margin-bottom: 30px;
  152. padding: 20px;
  153. border-bottom: 1px solid #dcdfe6;
  154. .left {
  155. font-size: 16px;
  156. color: #383b40;
  157. letter-spacing: 0;
  158. line-height: 24px;
  159. cursor: pointer;
  160. .value {
  161. padding: 2px 10px;
  162. border-radius: 12px;
  163. margin-right: 5px;
  164. font-size: 12px;
  165. line-height: 20px;
  166. text-align: center;
  167. }
  168. .status0 {
  169. background: rgba(35, 116, 255, 0.05);
  170. color: #2374ff;
  171. }
  172. .status1 {
  173. background: rgba(18, 172, 117, 0.05);
  174. color: #12ac75;
  175. }
  176. }
  177. .left:hover {
  178. color: #2374ff;
  179. }
  180. .right {
  181. text-align: center;
  182. .time {
  183. color: #aaaaaa;
  184. }
  185. .date {
  186. color: #525a68;
  187. }
  188. }
  189. }
  190. }
  191. .thr {
  192. display: flex;
  193. flex-direction: row-reverse;
  194. padding: 10px 0;
  195. }
  196. }
  197. .foot {
  198. background-color: #2e3546;
  199. color: #f0f2f5;
  200. }
  201. </style>