123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- <template>
- <div id="index">
- <el-row>
- <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
- <cHead style="background-color: #2e3546; color: #f0f2f5"></cHead>
- <div class="w_1200">
- <el-col :span="24" class="one">
- <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch"> </cSearch>
- </el-col>
- <el-col :span="24" class="two">
- <a-list :loading="loading" :grid="{ gutter: 16, column: 4 }" :data-source="list">
- <template #renderItem="{ item }">
- <el-col :span="24" class="list">
- <el-col :span="24" class="name textOver">
- <el-tooltip effect="dark" :content="item.name" placement="top">
- {{ item.name || '暂无名称' }}
- </el-tooltip>
- </el-col>
- <el-col :span="24" class="two_1"> <span>服务机构: </span>{{ item.unit || '暂无服务机构' }} </el-col>
- <el-col :span="24" class="two_1"> <span>项目编号: </span>{{ item.no || '暂无项目编号' }} </el-col>
- <el-col :span="24" class="two_1"> <span>发布日期: </span>{{ item.notice_time || '暂无发布日期' }} </el-col>
- <el-col :span="24" class="bottom">
- <div class="status">挂牌公告</div>
- <div class="button" @click="toView">查看详情</div>
- </el-col>
- </el-col>
- </template>
- </a-list>
- </el-col>
- <el-col :span="24" class="thr">
- <a-pagination v-model:page-size="limit" show-size-changer :page-size-options="pageSizeOptions" :total="total" @showSizeChange="onShowSizeChange" />
- </el-col>
- </div>
- </el-col>
- </el-row>
- <cFoot class="foot"></cFoot>
- </div>
- </template>
- <script setup lang="ts">
- // 基础
- import type { Ref } from 'vue';
- import { onMounted, getCurrentInstance, ref } from 'vue';
- import { useRouter } from 'vue-router';
- // 接口
- // import { ToolsStore } from '@/stores/tool';
- // import type { IQueryResult } from '@/util/types.util';
- // const toolsAxios = ToolsStore();
- const { proxy } = getCurrentInstance() as any;
- // 路由
- const router = useRouter();
- // 加载中
- const loading: Ref<any> = ref(false);
- let list: Ref<any> = ref([
- {
- name: '一种利用动物软骨制备硫酸软骨素和胶原蛋白多肽的方法成果的转让',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '数字矫形肢体骨骼康复机器辅助系统',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '一种老黄酶NemR-PS突变体及其在制备(S)-香茅醇中的应用等2种成果',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '常规早稻新品种“浙早33”的相关培育技术',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '一种利用动物软骨制备硫酸软骨素和胶原蛋白多肽的方法成果的转让',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '数字矫形肢体骨骼康复机器辅助系统',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '一种老黄酶NemR-PS突变体及其在制备(S)-香茅醇中的应用等2种成果',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '常规早稻新品种“浙早33”的相关培育技术',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '一种利用动物软骨制备硫酸软骨素和胶原蛋白多肽的方法成果的转让',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '数字矫形肢体骨骼康复机器辅助系统',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '一种老黄酶NemR-PS突变体及其在制备(S)-香茅醇中的应用等2种成果',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- },
- {
- name: '常规早稻新品种“浙早33”的相关培育技术',
- no: 'XY20231215012',
- unit: '浙江工业大学',
- notice_time: '2023-12-15 17:47:19',
- end_time: '2023-12-25 17:47:19',
- status: '0'
- }
- ]);
- let total: Ref<number> = ref(12);
- let skip = 0;
- let limit: number = proxy.$limit;
- const pageSizeOptions = ref<string[]>(['12', '24', '60', '120']);
- // 查询数据
- let searchForm: Ref<any> = ref({});
- let fields: Ref<any[]> = ref([{ label: '公示/公告类型', model: 'type', isSearch: true }]);
- // 请求
- onMounted(async () => {
- loading.value = true;
- await searchOther();
- await search({ skip, limit });
- loading.value = false;
- });
- const search = async (e: { skip: number; limit: number }) => {
- // const info = { skip: e.skip, limit: e.limit };
- // const res: IQueryResult = await userCheckAxios.query(info);
- // if (res.errcode == '0') {
- // list.value = res.data;
- // total.value = res.total;
- // }
- };
- // 查询其他信息
- const searchOther = async () => {
- // let res: IQueryResult;
- // // 性别
- // res = await dictAxios.query({ type: 'common_gender' });
- // if (res.errcode == '0') genderList.value = res.data;
- };
- const toSearch = (query) => {
- searchForm.value = query;
- search({ skip, limit });
- };
- // 交易大厅查看详情
- const toView = (item) => {
- router.push({ path: '/trade/detail', query: { id: item.id || item._id } });
- };
- const onShowSizeChange = (current: number, pageSize: number) => {
- console.log(current, pageSize);
- limit = pageSize;
- };
- </script>
- <style scoped lang="scss">
- .main {
- background: url(/src/assets/detail.png) right top no-repeat;
- background-size: 100%;
- .one {
- margin: 10px 0 0 0;
- }
- .two {
- .list {
- background: #fff;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.03);
- border-radius: 2px;
- width: 282px;
- height: 194px;
- margin-bottom: 30px;
- cursor: pointer;
- transition: all 0.3s;
- padding: 20px;
- .name {
- font-size: 16px;
- color: #121834;
- height: 16px;
- line-height: 13px;
- font-weight: 500;
- margin: 10px 0;
- }
- .name:hover {
- color: #2374ff;
- }
- .two_1 {
- font-size: 12px;
- text-align: justify;
- line-height: 12px;
- font-weight: 400;
- letter-spacing: 0;
- color: #8f97a3;
- margin-top: 15px;
- span:last-child {
- color: #525a68;
- }
- }
- .bottom {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 20px;
- .status {
- padding: 5px 12px;
- font-size: 12px;
- color: #2374ff;
- line-height: 12px;
- font-weight: 400;
- background: rgba(35, 116, 255, 0.05);
- border-radius: 16px;
- }
- .button {
- font-size: 12px;
- color: #fff;
- text-align: center;
- line-height: 12px;
- font-weight: 500;
- padding: 5px 12px;
- background: #2374ff;
- box-shadow: 0 3px 6px 0 rgba(35, 116, 255, 0.1);
- border-radius: 2px;
- }
- }
- }
- .list:hover {
- background: #f0f7ff;
- box-shadow: 0 0 16px rgba(205, 205, 205, 0.6);
- }
- }
- .thr {
- display: flex;
- flex-direction: row-reverse;
- padding: 0 0 10px 0;
- }
- }
- .foot {
- background-color: #2e3546;
- color: #f0f2f5;
- }
- </style>
|