Compare commits

..

4 Commits

  1. 3
      jeecgboot-vue3/.env.development
  2. 42
      jeecgboot-vue3/src/api/mainHome/index.ts
  3. 9
      jeecgboot-vue3/src/router/helper/mainOut.ts
  4. 59
      jeecgboot-vue3/src/views/demo/main-home/components/innovationVouchers/index.vue
  5. 179
      jeecgboot-vue3/src/views/demo/main-home/components/instrumentSharing/index.vue

@ -13,7 +13,8 @@ VITE_GLOB_DOMAIN_URL=http://10.121.2.107:18086/jeecg-boot
#后台接口父地址(必填) #后台接口父地址(必填)
VITE_GLOB_API_URL=/jeecgboot VITE_GLOB_API_URL=/jeecgboot
# 创新券地址
VITE_GLOB_API_URL_CXQ=http://localhost:18088/jeecg-boot
# 接口前缀 # 接口前缀
VITE_GLOB_API_URL_PREFIX= VITE_GLOB_API_URL_PREFIX=

@ -0,0 +1,42 @@
import { defHttp } from '/@/utils/http/axios';
//
export function getindexcomp(params) {
return defHttp.request({
url: '/instrument/instrument/listcms',
method: 'GET',
params,
});
}
//
export function getindexnew(params) {
return defHttp.request({
url: '/instrument/instrument/queryByIdCms',
method: 'GET',
params,
});
}
//
export function getindexsubject() {
return defHttp.request({
url: '/disciplinefieid/disciplineFieid/listcms',
method: 'GET',
});
}
//
export function getindexclass() {
return defHttp.request({
url: '/instrumenttype/instrumentType/listcms',
method: 'GET',
});
}
//
export function getindexaward(params) {
return defHttp.request({
url: '/innovationvoucher/innovationVoucher/listcms',
method: 'GET',
params,
});
}

@ -126,6 +126,15 @@ export const mainOutRoutes: AppRouteModule[] = [
hidden:true hidden:true
}, },
}, },
{
path: '/main-home/innovationVouchers',
name: 'InnovationVouchers',
component: () => import('/@/views/demo/main-home/components/innovationVouchers/index.vue'),
meta: {
title: '创新券',
ignoreAuth: true,
},
},
], ],
}, },
]; ];

@ -0,0 +1,59 @@
<template>
<div class="container">
<a-table :dataSource="indexaward" :columns="columns" >
<template v-if="columns.Key === 'setting'">
<div>
111
</div>
</template>
</a-table>
</div>
</template>
<script setup>
import { ref } from 'vue';
const columns = [
{
title: '申报项目名称',
dataIndex: 'proName',
key: 'proName',
},
{
title: '申报类别',
dataIndex: 'state_dictText',
key: 'state_dictText',
},
{
title: '申请金额',
dataIndex: 'proMoney',
key: 'proMoney',
},
{
title: '创新券编码',
dataIndex: 'cxqCode',
key: 'cxqCode',
},
{
title: '操作',
dataIndex: '',
key: 'setting',
},
];
const indexaward = ref([]);
const getindexawardEvent = async () => {
console.log(111);
fetch(import.meta.env.VITE_GLOB_API_URL_CXQ + '/innovationvoucher/innovationVoucher/listcms')
.then((res) => res.json())
.then((res) => (indexaward.value = res.result.records));
};
getindexawardEvent();
</script>
<style scoped lang="less">
.container {
width: 1200px;
margin: 0 auto;
}
</style>

@ -2,63 +2,176 @@
<div class="contianer"> <div class="contianer">
<div class="classify"> <div class="classify">
<div class="item"> <div class="item">
<div class="left">机构组织</div> <div class="left">仪器类别</div>
<div class="right">驻马店实验室(共407台)</div> <div class="right">
<div>通用</div>
<div>专用</div>
</div>
</div> </div>
<div class="item"> <div class="item">
<div class="left">机构组织</div> <div class="left">学科领域</div>
<div class="right"><div v-for="i in 15" :key="i">黄淮创新中心</div></div> <div class="right"
><div
:class="indexsubjectIndex === index ? 'avtive' : ''"
@click="onIndexsubject(i, index)"
v-for="(i, index) in indexsubject"
:key="i.id"
>{{ i.name }}</div
></div
>
</div> </div>
<div class="item"> <div class="item">
<div class="left">机构组织</div> <div class="left">仪器分类:</div>
<div class="right">驻马店实验室(共407台)</div> <div class="right">
<div :class="indexclassIndex === index ? 'avtive' : ''" @click="onIndexclass(i, index)" v-for="(i, index) in indexclass" :key="i.id">{{
i.instruName
}}</div>
</div>
</div> </div>
</div> </div>
<div class="list"> <div class="list">
<div class="top"> <div class="top">
<div class="left">已筛选条件</div> <div class="left">已筛选条件</div>
<div class="right">2</div> <div class="right"></div>
</div> </div>
<div class="content"> <div class="content">
<div class="item" v-for="i in 10" :key="i"> <div class="item" v-for="item in indexcomplist" :key="item.id">
<div class="left"></div> <div class="left"></div>
<div class="right"> <div class="right">
<div class="info"> <div class="info">
<div class="title">组合型四极杆轨道离子阱质谱仪 Q Exactive Plus Hybrid Quadrupole-Orbitrap Mass Spectrometer</div> <div class="title">{{ item.name }}</div>
<div class="info-list"> <div class="info-list">
<ul> <ul>
<li> <li>
<div class="label">状态</div> <div class="label">状态</div>
<div class="count">使用种</div> <div class="count">{{ item.state_dictText }}</div>
</li>
<li>
<div class="label">类别</div>
<div class="count">{{ item.category_dictText }}</div>
</li>
<li>
<div class="label">服务次数</div>
<div class="count">{{ item.serviceFrequency }}</div>
</li> </li>
<li> <li>
<div class="label">型号</div> <div class="label">型号</div>
<div class="count">Orbitrap Exploris 480</div> <div class="count">{{ item.specification }}</div>
</li> </li>
<li> <li>
<div class="label">管理员</div> <div class="label">类型</div>
<div class="count">赵公正郑婷张美莹孙正李娥</div> <div class="count">{{ item.type_dictText }}</div>
</li> </li>
<li> <li>
<div class="label">申报单位</div>
<div class="count">{{ item.declarationUnit_dictText }}</div>
</li>
<!-- <li>
<div class="label">管理员</div>
<div class="count">赵公正郑婷张美莹孙正李娥</div>
</li> -->
<!-- <li>
<div class="label">所在地点</div> <div class="label">所在地点</div>
<div class="count">Emphasis 高科创新中心B栋116</div> <div class="count">Emphasis 高科创新中心B栋116</div>
</li> </li> -->
<li>查看预约资源</li> <!-- <li>查看预约资源</li> -->
</ul> </ul>
</div> </div>
</div> </div>
<div class="btn"> <div class="btn">
<div class="booking">机时预约</div> <div class="booking" @click="onBooking">机时预约</div>
<div class="show-info">查看详情</div> <div class="show-info">查看详情</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 分页 -->
<div class="pagination"> <Pagination :current="current" :pageSize="page.pageSize" :total="total" show-less-items @change="onChange" /></div>
</div> </div>
</template> </template>
<script setup></script> <script setup lang="ts">
import { ref } from 'vue';
import { getindexcomp, getindexsubject, getindexclass, getindexaward } from '@/api/mainHome/index';
import { Pagination } from 'ant-design-vue';
import { useRouter } from 'vue-router';
import axios from 'axios';
const router = useRouter();
const current = ref(1);
const total = ref(0);
const page = ref({
pageSize: 10,
pageNo: 1,
type: '', //
category: '', //
disciplineFieId: '', //
});
const indexcomplist = ref<any>([]);
const getindexcompEvent = async () => {
const data = page.value;
for (const key in data) {
if (!page.value[key]) {
delete data[key];
}
}
const res: any = await getindexcomp(data);
console.log(res);
total.value = res.total;
indexcomplist.value = res.records;
};
getindexcompEvent();
const onChange = (page: number) => {
console.log(page);
current.value = page;
};
const indexsubject = ref<any>([]);
//
const getindexsubjectEvent = async () => {
const res: any = await getindexsubject();
console.log(res);
indexsubject.value = res;
};
getindexsubjectEvent();
//
const indexclass = ref<any>([]);
const getindexclassEvent = async () => {
const res: any = await getindexclass();
indexclass.value = res;
};
getindexclassEvent();
const indexsubjectIndex = ref(null);
//
const onIndexsubject = (data, index) => {
page.value.disciplineFieId = data.id;
indexsubjectIndex.value = index;
getindexcompEvent();
};
const indexclassIndex = ref(null);
//
const onIndexclass = (data, index) => {
page.value.type = data.id;
indexclassIndex.value = index;
getindexcompEvent();
};
//
const onBooking = () => {
router.push('/instrument/InstrumentList');
};
//
const getindexawardEvent = async () => {
axios.get(import.meta.env.VITE_GLOB_API_URL_CXQ + '/innovationvoucher/innovationVoucher/listcms').then((res) => {
console.log(res);
});
};
getindexawardEvent();
</script>
<style scoped lang="less"> <style scoped lang="less">
.contianer { .contianer {
@ -70,7 +183,6 @@
.item { .item {
display: flex; display: flex;
min-height: 48px; min-height: 48px;
.left { .left {
width: 120px; width: 120px;
background-color: #f1f1f1; background-color: #f1f1f1;
@ -85,6 +197,10 @@
flex-wrap: wrap; flex-wrap: wrap;
div { div {
margin-right: 20px; margin-right: 20px;
cursor: pointer;
}
.avtive {
color: #002e97;
} }
} }
} }
@ -132,10 +248,10 @@
width: 60px; width: 60px;
} }
} }
li:last-child { // li:last-child {
color: #002e97; // color: #002e97;
font-size: 14px; // font-size: 14px;
} // }
} }
} }
} }
@ -153,18 +269,25 @@
font-size: 14px; font-size: 14px;
} }
.booking { .booking {
background-color: #002E97; background-color: #002e97;
color: #fff color: #fff;
cursor: pointer;
} }
.show-info{ .show-info {
border: 1px solid #002E97; border: 1px solid #002e97;
color: #002E97; color: #002e97;
cursor: pointer;
} }
} }
} }
} }
} }
} }
.pagination {
background-color: #fff;
height: 70px;
display: flex;
justify-content: center;
}
} }
</style> </style>

Loading…
Cancel
Save