|
|
@@ -59,27 +59,29 @@
|
|
|
<img src="../../assets/img/更多应用.png" alt="" />
|
|
|
<p>仪器报修</p>
|
|
|
</li>
|
|
|
- <li @click="onRouterPush('/lab/inspection/home')" v-if="userInfos.userRoles !== 'project_group_member'">
|
|
|
+ <!-- <li @click="onRouterPush('/lab/inspection/home')" v-if="userInfos.userRoles !== 'project_group_member'">
|
|
|
<img src="../../assets/img/更多应用.png" alt="" />
|
|
|
<p>巡检任务</p>
|
|
|
- </li>
|
|
|
+ </li> -->
|
|
|
<li @click="onRouterPush('/admin-in-progress')" v-auth="'h5-home-admin-in-progress'">
|
|
|
<img src="../../assets/img/强制下机.png" alt="" />
|
|
|
<p>仪器管理</p>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <div class="swipe-con flex justify-between mt10">
|
|
|
- <van-swipe class="my-swipe" :autoplay="5000" :show-indicators="false" vertical height="30">
|
|
|
- <van-swipe-item v-for="item in noticeList" :key="item.id"
|
|
|
- @click="onRouterPush('/notice/detail', { id: item.id })">
|
|
|
+ <div class="card notice-card">
|
|
|
+ <h4>
|
|
|
+ 仪器公告
|
|
|
+ <span class="link" @click="onRouterPush('/notice')">更多>></span>
|
|
|
+ </h4>
|
|
|
+ <ul class="approval notice-list">
|
|
|
+ <li v-for="item in noticeList" :key="item.id" @click="onRouterPush('/notice/detail', { id: item.id })">
|
|
|
<div class="flex justify-between">
|
|
|
- <span>{{ `【${item.noticeType === '10' ? '公告' : '通知'}】${item.noticeTitle}` }}</span>
|
|
|
+ <div class="item-title">{{ `【${item.noticeType === '10' ? '公告' : '通知'}】${item.noticeTitle}` }}</div>
|
|
|
<span class="time">{{ formatDate(new Date(item.noticeTime), 'YYYY-mm-dd') }}</span>
|
|
|
</div>
|
|
|
- </van-swipe-item>
|
|
|
- </van-swipe>
|
|
|
- <a href="javascript:void(0);" @click="onRouterPush('/notice')">更多</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
<!-- <div class="card">
|
|
|
<h4>
|
|
|
@@ -99,26 +101,6 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div> -->
|
|
|
- <div class="card mb20">
|
|
|
- <h4>
|
|
|
- 培训通知
|
|
|
- <span class="link" @click="onRouterPush('/training')">全部培训>></span>
|
|
|
- </h4>
|
|
|
- <ul class="approval">
|
|
|
- <li v-for="item in trainingList" :key="item.id" @click="onRouterPush('/training/enroll', { state: item.id })">
|
|
|
- <div class="flex justify-between">
|
|
|
- <div class="item-title">{{ item.title }}</div>
|
|
|
- <van-tag v-if="item.status === '40'">已结束</van-tag>
|
|
|
- <van-tag v-if="item.status !== '40' && item.applyStatus === '10'" type="warning">未报名</van-tag>
|
|
|
- <van-tag v-else-if="item.status !== '40' && item.applyStatus === '20'" type="primary">已报名</van-tag>
|
|
|
- </div>
|
|
|
- <footer class="flex justify-between">
|
|
|
- <span>发布人:{{ item.createdName }}</span>
|
|
|
- <span>{{ formatDate(new Date(item.startTime), 'YYYY-mm-dd') }}</span>
|
|
|
- </footer>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -184,7 +166,7 @@ const getApprovalList = async () => {
|
|
|
approvalList.value = res?.data?.list || []
|
|
|
}
|
|
|
const getNotice = async () => {
|
|
|
- const [err, res]: ToResponse = await to(newsApi.getNoticeList())
|
|
|
+ const [err, res]: ToResponse = await to(newsApi.getNoticeList({ pageNum: 1, pageSize: 3 }))
|
|
|
if (err) return
|
|
|
noticeList.value = res?.data?.list || []
|
|
|
}
|
|
|
@@ -355,37 +337,20 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .swipe-con {
|
|
|
- display: flex;
|
|
|
-
|
|
|
- .my-swipe {
|
|
|
- flex: 1;
|
|
|
- height: 30px !important;
|
|
|
- line-height: 30px !important;
|
|
|
-
|
|
|
- :deep(.flex) {
|
|
|
- height: 30px;
|
|
|
- overflow: hidden;
|
|
|
-
|
|
|
- span {
|
|
|
- display: inline-block;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- }
|
|
|
+ .notice-card {
|
|
|
+ .link {
|
|
|
+ color: #3c78e3;
|
|
|
+ }
|
|
|
|
|
|
- span:first-child {
|
|
|
- flex: 1;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- }
|
|
|
+ .notice-list {
|
|
|
+ li {
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- >a {
|
|
|
- flex: 0 0 28px;
|
|
|
- margin-left: 4px;
|
|
|
- color: #3c78e3;
|
|
|
+ .time {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|