From e312d5fcded7492d434d3bab48d31f0c3fc1dbfb Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Thu, 30 Nov 2023 15:44:19 +0800
Subject: [PATCH] 新增
---
src/views/components/publish.vue | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/views/components/publish.vue b/src/views/components/publish.vue
index 3ed921c..dc9f3f2 100644
--- a/src/views/components/publish.vue
+++ b/src/views/components/publish.vue
@@ -23,17 +23,17 @@
<el-button type="primary" :icon="Refresh" class="resetBtn">重置</el-button>
</div>
<div class="list">
- <div v-for="item in state.dataList">
+ <div v-for="item in state.dataList" @click="openDetails('机构公示',item.id)">
<div>
<div><img src="src/assets/images/article.png"></div>
- <div>{{item.title}}</div>
+ <div>{{item.name}}</div>
</div>
<span>
- {{item.updateTime}}
+ {{(item.updateTime?item.updateTime:item.createTime).substring(0,16)}}
</span>
</div>
</div>
- <div class="pag-container">
+ <div class="pag-container" v-if="state.total&&state.total>0">
<el-pagination
v-model:current-page="state.querys.pageNum"
v-model:page-size="state.querys.pageSize"
@@ -49,11 +49,11 @@
</template>
<script setup>
-import {onMounted, ref, reactive, watch, onUnmounted, defineExpose} from "vue"
+import {onMounted, ref, reactive, watch, onUnmounted, defineExpose, defineEmits} from "vue"
import { getPublish } from '@/api/home/homePage'
import { Search, Refresh } from '@element-plus/icons-vue'
import {ElMessage} from "element-plus";
-
+const emit = defineEmits(['openDetails'])
const route = useRoute()
const router = useRouter()
@@ -100,6 +100,10 @@
const handleCurrentChange = (val) => {
state.querys.pageNum = val
getData()
+}
+
+const openDetails = (type,id)=>{
+ emit('openDetails',type,id)
}
defineExpose({
@@ -154,6 +158,8 @@
.list{
padding: 15px 0;
+ max-height: calc(100vh - 402px);
+ overflow-y: auto;
&>div{
display: flex;
@@ -183,7 +189,7 @@
}
}
div:last-of-type{
- width: 1000px;
+ width: 900px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
--
Gitblit v1.9.2