one.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch"> </cSearch>
  9. </el-col>
  10. <el-col :span="24" class="two">
  11. <a-list :loading="loading" :grid="{ gutter: 16, column: 4 }" :data-source="list">
  12. <template #renderItem="{ item }">
  13. <el-col :span="24" class="list">
  14. <el-col :span="24" class="name textOver">
  15. <el-tooltip effect="dark" :content="item.name" placement="top">
  16. {{ item.name || '暂无名称' }}
  17. </el-tooltip>
  18. </el-col>
  19. <el-col :span="24" class="two_1"> <span>服务机构: </span>{{ item.unit || '暂无服务机构' }} </el-col>
  20. <el-col :span="24" class="two_1"> <span>项目编号: </span>{{ item.no || '暂无项目编号' }} </el-col>
  21. <el-col :span="24" class="two_1"> <span>发布日期: </span>{{ item.notice_time || '暂无发布日期' }} </el-col>
  22. <el-col :span="24" class="bottom">
  23. <div class="status">挂牌公告</div>
  24. <div class="button" @click="toView">查看详情</div>
  25. </el-col>
  26. </el-col>
  27. </template>
  28. </a-list>
  29. </el-col>
  30. <el-col :span="24" class="thr">
  31. <a-pagination v-model:page-size="limit" show-size-changer :page-size-options="pageSizeOptions" :total="total" @showSizeChange="onShowSizeChange" />
  32. </el-col>
  33. </div>
  34. </el-col>
  35. </el-row>
  36. <cFoot class="foot"></cFoot>
  37. </div>
  38. </template>
  39. <script setup lang="ts">
  40. // 基础
  41. import type { Ref } from 'vue';
  42. import { onMounted, getCurrentInstance, ref } from 'vue';
  43. import { useRouter } from 'vue-router';
  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. name: '一种利用动物软骨制备硫酸软骨素和胶原蛋白多肽的方法成果的转让',
  56. no: 'XY20231215012',
  57. unit: '浙江工业大学',
  58. notice_time: '2023-12-15 17:47:19',
  59. end_time: '2023-12-25 17:47:19',
  60. status: '0'
  61. },
  62. {
  63. name: '数字矫形肢体骨骼康复机器辅助系统',
  64. no: 'XY20231215012',
  65. unit: '浙江工业大学',
  66. notice_time: '2023-12-15 17:47:19',
  67. end_time: '2023-12-25 17:47:19',
  68. status: '0'
  69. },
  70. {
  71. name: '一种老黄酶NemR-PS突变体及其在制备(S)-香茅醇中的应用等2种成果',
  72. no: 'XY20231215012',
  73. unit: '浙江工业大学',
  74. notice_time: '2023-12-15 17:47:19',
  75. end_time: '2023-12-25 17:47:19',
  76. status: '0'
  77. },
  78. {
  79. name: '常规早稻新品种“浙早33”的相关培育技术',
  80. no: 'XY20231215012',
  81. unit: '浙江工业大学',
  82. notice_time: '2023-12-15 17:47:19',
  83. end_time: '2023-12-25 17:47:19',
  84. status: '0'
  85. },
  86. {
  87. name: '一种利用动物软骨制备硫酸软骨素和胶原蛋白多肽的方法成果的转让',
  88. no: 'XY20231215012',
  89. unit: '浙江工业大学',
  90. notice_time: '2023-12-15 17:47:19',
  91. end_time: '2023-12-25 17:47:19',
  92. status: '0'
  93. },
  94. {
  95. name: '数字矫形肢体骨骼康复机器辅助系统',
  96. no: 'XY20231215012',
  97. unit: '浙江工业大学',
  98. notice_time: '2023-12-15 17:47:19',
  99. end_time: '2023-12-25 17:47:19',
  100. status: '0'
  101. },
  102. {
  103. name: '一种老黄酶NemR-PS突变体及其在制备(S)-香茅醇中的应用等2种成果',
  104. no: 'XY20231215012',
  105. unit: '浙江工业大学',
  106. notice_time: '2023-12-15 17:47:19',
  107. end_time: '2023-12-25 17:47:19',
  108. status: '0'
  109. },
  110. {
  111. name: '常规早稻新品种“浙早33”的相关培育技术',
  112. no: 'XY20231215012',
  113. unit: '浙江工业大学',
  114. notice_time: '2023-12-15 17:47:19',
  115. end_time: '2023-12-25 17:47:19',
  116. status: '0'
  117. },
  118. {
  119. name: '一种利用动物软骨制备硫酸软骨素和胶原蛋白多肽的方法成果的转让',
  120. no: 'XY20231215012',
  121. unit: '浙江工业大学',
  122. notice_time: '2023-12-15 17:47:19',
  123. end_time: '2023-12-25 17:47:19',
  124. status: '0'
  125. },
  126. {
  127. name: '数字矫形肢体骨骼康复机器辅助系统',
  128. no: 'XY20231215012',
  129. unit: '浙江工业大学',
  130. notice_time: '2023-12-15 17:47:19',
  131. end_time: '2023-12-25 17:47:19',
  132. status: '0'
  133. },
  134. {
  135. name: '一种老黄酶NemR-PS突变体及其在制备(S)-香茅醇中的应用等2种成果',
  136. no: 'XY20231215012',
  137. unit: '浙江工业大学',
  138. notice_time: '2023-12-15 17:47:19',
  139. end_time: '2023-12-25 17:47:19',
  140. status: '0'
  141. },
  142. {
  143. name: '常规早稻新品种“浙早33”的相关培育技术',
  144. no: 'XY20231215012',
  145. unit: '浙江工业大学',
  146. notice_time: '2023-12-15 17:47:19',
  147. end_time: '2023-12-25 17:47:19',
  148. status: '0'
  149. }
  150. ]);
  151. let total: Ref<number> = ref(12);
  152. let skip = 0;
  153. let limit: number = proxy.$limit;
  154. const pageSizeOptions = ref<string[]>(['12', '24', '60', '120']);
  155. // 查询数据
  156. let searchForm: Ref<any> = ref({});
  157. let fields: Ref<any[]> = ref([{ label: '公示/公告类型', model: 'type', isSearch: true }]);
  158. // 请求
  159. onMounted(async () => {
  160. loading.value = true;
  161. await searchOther();
  162. await search({ skip, limit });
  163. loading.value = false;
  164. });
  165. const search = async (e: { skip: number; limit: number }) => {
  166. // const info = { skip: e.skip, limit: e.limit };
  167. // const res: IQueryResult = await userCheckAxios.query(info);
  168. // if (res.errcode == '0') {
  169. // list.value = res.data;
  170. // total.value = res.total;
  171. // }
  172. };
  173. // 查询其他信息
  174. const searchOther = async () => {
  175. // let res: IQueryResult;
  176. // // 性别
  177. // res = await dictAxios.query({ type: 'common_gender' });
  178. // if (res.errcode == '0') genderList.value = res.data;
  179. };
  180. const toSearch = (query) => {
  181. searchForm.value = query;
  182. search({ skip, limit });
  183. };
  184. // 交易大厅查看详情
  185. const toView = (item) => {
  186. router.push({ path: '/trade/detail', query: { id: item.id || item._id } });
  187. };
  188. const onShowSizeChange = (current: number, pageSize: number) => {
  189. console.log(current, pageSize);
  190. limit = pageSize;
  191. };
  192. </script>
  193. <style scoped lang="scss">
  194. .main {
  195. background: url(/src/assets/detail.png) right top no-repeat;
  196. background-size: 100%;
  197. .one {
  198. margin: 10px 0 0 0;
  199. }
  200. .two {
  201. .list {
  202. background: #fff;
  203. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.03);
  204. border-radius: 2px;
  205. width: 282px;
  206. height: 194px;
  207. margin-bottom: 30px;
  208. cursor: pointer;
  209. transition: all 0.3s;
  210. padding: 20px;
  211. .name {
  212. font-size: 16px;
  213. color: #121834;
  214. height: 16px;
  215. line-height: 13px;
  216. font-weight: 500;
  217. margin: 10px 0;
  218. }
  219. .name:hover {
  220. color: #2374ff;
  221. }
  222. .two_1 {
  223. font-size: 12px;
  224. text-align: justify;
  225. line-height: 12px;
  226. font-weight: 400;
  227. letter-spacing: 0;
  228. color: #8f97a3;
  229. margin-top: 15px;
  230. span:last-child {
  231. color: #525a68;
  232. }
  233. }
  234. .bottom {
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-between;
  238. margin-top: 20px;
  239. .status {
  240. padding: 5px 12px;
  241. font-size: 12px;
  242. color: #2374ff;
  243. line-height: 12px;
  244. font-weight: 400;
  245. background: rgba(35, 116, 255, 0.05);
  246. border-radius: 16px;
  247. }
  248. .button {
  249. font-size: 12px;
  250. color: #fff;
  251. text-align: center;
  252. line-height: 12px;
  253. font-weight: 500;
  254. padding: 5px 12px;
  255. background: #2374ff;
  256. box-shadow: 0 3px 6px 0 rgba(35, 116, 255, 0.1);
  257. border-radius: 2px;
  258. }
  259. }
  260. }
  261. .list:hover {
  262. background: #f0f7ff;
  263. box-shadow: 0 0 16px rgba(205, 205, 205, 0.6);
  264. }
  265. }
  266. .thr {
  267. display: flex;
  268. flex-direction: row-reverse;
  269. padding: 0 0 10px 0;
  270. }
  271. }
  272. .foot {
  273. background-color: #2e3546;
  274. color: #f0f2f5;
  275. }
  276. </style>