@bdsoft/element 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +13 -0
- package/index.js +6 -6
- package/package.json +19 -23
- package/src/App.vue +28 -0
- package/src/assets/css/element.scss +196 -0
- package/src/assets/css/layout.scss +215 -0
- package/src/assets/css/tailwind.scss +67 -0
- package/src/assets/images/banner.gif +0 -0
- package/src/assets/images/banner.png +0 -0
- package/src/assets/images/bg1.svg +22 -0
- package/src/assets/images/bg2.png +0 -0
- package/src/assets/images/ff.png +0 -0
- package/src/assets/images/home-file1.png +0 -0
- package/src/assets/images/ky.png +0 -0
- package/src/assets/images/menu/add.png +0 -0
- package/src/assets/images/menu/del.png +0 -0
- package/src/assets/images/menu/down.png +0 -0
- package/src/assets/images/menu/dr.png +0 -0
- package/src/assets/images/menu/edit.png +0 -0
- package/src/assets/images/menu/kx.png +0 -0
- package/src/assets/images/menu/mb.png +0 -0
- package/src/assets/images/menu/pz.png +0 -0
- package/src/assets/images/menu/save.png +0 -0
- package/src/assets/images/menu/sj.png +0 -0
- package/src/assets/images/menu/sjk.png +0 -0
- package/src/assets/images/menu/up.png +0 -0
- package/src/assets/images/po-i.png +0 -0
- package/src/assets/images/po1-i1.png +0 -0
- package/src/assets/images/po1-i2.png +0 -0
- package/src/assets/images/po1-i3.png +0 -0
- package/src/assets/images/po1-i4.png +0 -0
- package/src/assets/images/po1-i5.png +0 -0
- package/src/assets/images/po1-i6.png +0 -0
- package/src/assets/images/po1-i7.png +0 -0
- package/src/assets/images/po1-i8.png +0 -0
- package/src/assets/images/po2-i1.png +0 -0
- package/src/assets/images/po2-i2.png +0 -0
- package/src/assets/images/po3-i1.png +0 -0
- package/src/assets/images/po4-i1.png +0 -0
- package/src/assets/images/po5-i1.png +0 -0
- package/src/assets/images/po6-i1.png +0 -0
- package/src/assets/images/po6-i2.png +0 -0
- package/src/assets/images/po7-i1.png +0 -0
- package/src/assets/images/tj1.png +0 -0
- package/src/assets/images/tj2.png +0 -0
- package/src/assets/images/tj3.png +0 -0
- package/src/components/3dcloudwords/index.js +346 -0
- package/src/components/3dcloudwords/index.vue +99 -0
- package/src/components/3dcloudwords/readme.md +66 -0
- package/src/components/badge/index.js +167 -0
- package/src/components/badge/index.scss +166 -0
- package/src/components/badge/index.vue +98 -0
- package/src/components/badge/readme.md +18 -0
- package/src/components/basic/Finish.vue +107 -0
- package/src/components/basic/button.vue +19 -0
- package/src/components/basic/readme.md +7 -0
- package/src/components/button/index.vue +48 -0
- package/src/components/button/readme.md +62 -0
- package/src/components/carousel/index.vue +104 -0
- package/src/components/carousel/readme.md +12 -0
- package/src/components/chartconfig/index.vue +141 -0
- package/src/components/chartconfig/readme.md +25 -0
- package/src/components/contextMenu/hookContxtMenu.js +41 -0
- package/src/components/contextMenu/index.vue +245 -0
- package/src/components/contextMenu/readme.md +55 -0
- package/src/components/contextMenu/useElementBounding.js +40 -0
- package/src/components/countup/countUp.js +196 -0
- package/src/components/countup/index.vue +114 -0
- package/src/components/countup/readme.md +9 -0
- package/src/components/empty/assets/build.png +0 -0
- package/src/components/empty/assets/emptybg.gif +0 -0
- package/src/components/empty/assets/emptybg.png +0 -0
- package/src/components/empty/assets/emptybg2.jpg +0 -0
- package/src/components/empty/assets/emptybg3.jpg +0 -0
- package/src/components/empty/assets/wuxiao.png +0 -0
- package/src/components/empty/assets/wuxiao.webp +0 -0
- package/src/components/empty/building.vue +117 -0
- package/src/components/empty/empty.vue +120 -0
- package/src/components/empty/index.js +12 -0
- package/src/components/empty/invalid.vue +56 -0
- package/src/components/error/Error.vue +79 -0
- package/src/components/error/readme.md +20 -0
- package/src/components/form/Form.vue +84 -0
- package/src/components/form/FormItem.vue +143 -0
- package/src/components/form/data.js +52 -0
- package/src/components/form/readme.md +69 -0
- package/src/components/layout/banner.vue +412 -0
- package/src/components/layout/bar.vue +43 -0
- package/src/components/layout/layout1.vue +60 -0
- package/src/components/layout/layout2.vue +134 -0
- package/src/components/layout/layout3.vue +107 -0
- package/src/components/layout/layout4.vue +66 -0
- package/src/components/layout/nav.vue +333 -0
- package/src/components/layout/readme.md +61 -0
- package/src/components/loading/index.vue +122 -0
- package/src/components/loading/readme.md +6 -0
- package/src/components/notice/NoticeList.vue +198 -0
- package/src/components/notice/NoticeListPaging.vue +281 -0
- package/src/components/notice/NoticeView.vue +92 -0
- package/src/components/notice/readme.md +1 -0
- package/src/components/pagination/index.vue +100 -0
- package/src/components/pagination/readme.md +19 -0
- package/src/components/pagination/scroll-to.js +51 -0
- package/src/components/progress/bar.vue +72 -0
- package/src/components/progress/progress.vue +58 -0
- package/src/components/screenfull/index.js +3 -0
- package/src/components/screenfull/index.vue +65 -0
- package/src/components/screenfull/package.json +15 -0
- package/src/components/screenfull/readme.md +6 -0
- package/src/components/statisticalCount/index.vue +80 -0
- package/src/components/statisticalCount/readme.md +21 -0
- package/src/components/username/index.vue +79 -0
- package/src/components/username/readme.md +22 -0
- package/src/components/username//346/225/210/346/236/234/345/233/276.png +0 -0
- package/src/global/index.ts +6 -0
- package/src/global/register-properties.ts +10 -0
- package/src/index.js +88 -0
- package/src/utils/coms/load.jsx +10 -0
- package/src/utils/func.js +32 -0
- package/src/utils/hookDialog.js +38 -0
- package/src/utils/hookPage.js +49 -0
- package/src/utils/index.js +5 -0
- package/src/utils/lib/console.js +39 -0
- package/src/utils/lib/debounce.js +19 -0
- package/src/utils/lib/deepextend.js +51 -0
- package/src/utils/lib/deepset.js +14 -0
- package/src/utils/lib/extend.js +28 -0
- package/src/utils/lib/index.js +13 -0
- package/src/utils/lib/json.js +90 -0
- package/src/utils/lib/mergeprops.js +62 -0
- package/src/utils/lib/mitt.js +43 -0
- package/src/utils/lib/modify.js +8 -0
- package/src/utils/lib/slot.js +19 -0
- package/src/utils/lib/toarray.js +5 -0
- package/src/utils/lib/tocase.js +11 -0
- package/src/utils/lib/todate.js +10 -0
- package/src/utils/lib/toline.js +10 -0
- package/src/utils/lib/tostring.js +7 -0
- package/src/utils/lib/type.js +45 -0
- package/src/utils/lib/unique.js +6 -0
- package/src/utils/message.js +164 -0
- package/src/utils/type.js +45 -0
- package/src/xm_components/HeadSearch/hook/hookSearch.js +96 -0
- package/src/xm_components/HeadSearch/index.vue +206 -0
- package/src/xm_components/HeadSearch/readme.md +12 -0
- package/src/xm_components/HeadSearch//346/220/234/347/264/242/345/210/227/350/241/250.png +0 -0
- package/src/xm_components/Milestone/index.vue +213 -0
- package/src/xm_components/Milestone/readme.md +15 -0
- package/src/xm_components/MultiStatisticalCard/image.png +0 -0
- package/src/xm_components/MultiStatisticalCard/index.vue +114 -0
- package/src/xm_components/MultiStatisticalCard/readme.md +29 -0
- package/src/xm_components/StatisticalCard/image.png +0 -0
- package/src/xm_components/StatisticalCard/index.vue +196 -0
- package/src/xm_components/StatisticalCard/readme.md +41 -0
- package/src/xm_components/readme.md +1 -0
- package/vite.config.js +58 -0
- package/dist/BdElement.js +0 -23432
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 公告列表
|
|
3
|
+
* @Author: 郭勇言
|
|
4
|
+
* @Date: 2024-04-26 17 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, computed, watch, onMounted, nextTick } from 'vue'
|
|
10
|
+
const emits = defineEmits(['liClick'])
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
imgNum: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 3
|
|
15
|
+
},
|
|
16
|
+
noticeData: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
},
|
|
20
|
+
noticeInfo: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => {
|
|
23
|
+
return {
|
|
24
|
+
iconName: 'Reading',
|
|
25
|
+
title: '公告列表'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
noticeNum: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 4
|
|
32
|
+
},
|
|
33
|
+
noticeHeight: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 300
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
/**
|
|
39
|
+
* 行点击事件
|
|
40
|
+
*/
|
|
41
|
+
const liClick = (item) => {
|
|
42
|
+
emits('liClick', item)
|
|
43
|
+
}
|
|
44
|
+
const loading = computed(() => {
|
|
45
|
+
return props.noticeData.length === 0
|
|
46
|
+
})
|
|
47
|
+
</script>
|
|
48
|
+
<template>
|
|
49
|
+
<div id="noticespan">
|
|
50
|
+
<el-skeleton :loading="loading" animated>
|
|
51
|
+
<template #template>
|
|
52
|
+
<el-row justify="center">
|
|
53
|
+
<el-col :span="6">
|
|
54
|
+
<el-skeleton-item variant="image" style="width: 300px; height: 300px; margin-left: 50px" />
|
|
55
|
+
</el-col>
|
|
56
|
+
<el-col :span="12">
|
|
57
|
+
<el-skeleton-item variant="text" style="width: 300px; height: 20px; margin: 10px" /><br>
|
|
58
|
+
<el-skeleton-item variant="text" style="width: 300px; height: 20px; margin: 10px" /><br>
|
|
59
|
+
<el-skeleton-item variant="text" style="width: 300px; height: 20px; margin: 10px" /><br>
|
|
60
|
+
<el-skeleton-item variant="text" style="width: 300px; height: 20px; margin: 10px" /><br>
|
|
61
|
+
<el-skeleton-item variant="text" style="width: 300px; height: 20px; margin: 10px" />
|
|
62
|
+
</el-col>
|
|
63
|
+
</el-row>
|
|
64
|
+
</template>
|
|
65
|
+
<template #default>
|
|
66
|
+
<el-card class="carousel">
|
|
67
|
+
<template #header>
|
|
68
|
+
<div class="card-header-title">
|
|
69
|
+
<div style="display: flex; justify-content: left; align-items: center">
|
|
70
|
+
<el-icon :size="16"><component :is="noticeInfo.iconName" /></el-icon>
|
|
71
|
+
<span style="font-size: 16px; margin-left: 6px">{{ noticeInfo.title }}</span>
|
|
72
|
+
</div>
|
|
73
|
+
<slot name="header"></slot>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
<el-row>
|
|
77
|
+
<el-col :span="9">
|
|
78
|
+
<el-carousel :interval="5000" arrow="always" :height="noticeHeight + 'px'">
|
|
79
|
+
<el-carousel-item v-for="item in noticeData.slice(0, imgNum)" :key="item">
|
|
80
|
+
<el-image :src="item.imgsrc" fit="cover" style="cursor: pointer; width: 100%; height: 100%"></el-image>
|
|
81
|
+
</el-carousel-item>
|
|
82
|
+
</el-carousel>
|
|
83
|
+
</el-col>
|
|
84
|
+
<el-col :span="15">
|
|
85
|
+
<div class="noticeul">
|
|
86
|
+
<div class="noticeli" v-for="(item, index) in noticeData.slice(0, noticeNum)" :key="item.id" @click="liClick(item)" :style="{ borderTop: index != 0 ? '1px #e0e2e2 solid' : 'none' }">
|
|
87
|
+
<el-text type="success">{{ item.typeName }}</el-text>
|
|
88
|
+
<span class="noticetitle" :title="item.title">{{ item.title }}</span>
|
|
89
|
+
<span class="noticedate" :title="item.title">{{ item.create_date }}</span>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</el-col>
|
|
93
|
+
</el-row>
|
|
94
|
+
</el-card>
|
|
95
|
+
</template>
|
|
96
|
+
</el-skeleton>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<style lang="scss" scoped>
|
|
101
|
+
.card-header-title {
|
|
102
|
+
display: flex;
|
|
103
|
+
justify-content: space-between;
|
|
104
|
+
align-items: center;
|
|
105
|
+
color: #909399;
|
|
106
|
+
span {
|
|
107
|
+
margin-left: 8px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
.noticeul {
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
.noticeli {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
margin-left: 20px;
|
|
116
|
+
line-height: 39px;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
.noticetype {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
font-size: 14px;
|
|
121
|
+
margin-left: 8px;
|
|
122
|
+
color: #909399;
|
|
123
|
+
white-space: nowrap; /*强制span不换行*/
|
|
124
|
+
display: inline-block; /*将span当做块级元素对待*/
|
|
125
|
+
width: 20px; /*限制宽度*/
|
|
126
|
+
overflow: hidden; /*超出宽度部分隐藏*/
|
|
127
|
+
text-overflow: ellipsis; /*超出部分以点号代替*/
|
|
128
|
+
}
|
|
129
|
+
.noticetitle {
|
|
130
|
+
display: inline-block;
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
margin-left: 8px;
|
|
133
|
+
color: #909399;
|
|
134
|
+
white-space: nowrap; /*强制span不换行*/
|
|
135
|
+
display: inline-block; /*将span当做块级元素对待*/
|
|
136
|
+
width: calc(100% - 174px); /*限制宽度*/
|
|
137
|
+
overflow: hidden; /*超出宽度部分隐藏*/
|
|
138
|
+
text-overflow: ellipsis; /*超出部分以点号代替*/
|
|
139
|
+
}
|
|
140
|
+
.noticedate {
|
|
141
|
+
display: inline-block;
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
margin-left: 8px;
|
|
144
|
+
color: #909399;
|
|
145
|
+
white-space: nowrap; /*强制span不换行*/
|
|
146
|
+
display: inline-block; /*将span当做块级元素对待*/
|
|
147
|
+
width: 120px; /*限制宽度*/
|
|
148
|
+
overflow: hidden; /*超出宽度部分隐藏*/
|
|
149
|
+
text-overflow: ellipsis; /*超出部分以点号代替*/
|
|
150
|
+
}
|
|
151
|
+
.title-content {
|
|
152
|
+
display: inline-block;
|
|
153
|
+
}
|
|
154
|
+
.title-content-index {
|
|
155
|
+
display: inline-block;
|
|
156
|
+
font-size: 15px;
|
|
157
|
+
font-weight: bold;
|
|
158
|
+
width: 22px;
|
|
159
|
+
height: 30px;
|
|
160
|
+
line-height: 30px;
|
|
161
|
+
background-size: 100% 100%;
|
|
162
|
+
text-align: left;
|
|
163
|
+
margin-right: 4px;
|
|
164
|
+
position: relative;
|
|
165
|
+
color: #9195a3;
|
|
166
|
+
top: 1px;
|
|
167
|
+
}
|
|
168
|
+
.c-index-top1 {
|
|
169
|
+
color: #fe2d46;
|
|
170
|
+
}
|
|
171
|
+
.c-index-top2 {
|
|
172
|
+
color: #f60;
|
|
173
|
+
}
|
|
174
|
+
.c-index-top3 {
|
|
175
|
+
color: #faa90e;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
.noticeli:hover {
|
|
179
|
+
color: #409eff;
|
|
180
|
+
span {
|
|
181
|
+
color: #409eff;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
:deep(.el-carousel__arrow--left) {
|
|
186
|
+
display: none;
|
|
187
|
+
}
|
|
188
|
+
:deep(.el-carousel__arrow--right) {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
.carousel {
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 100%;
|
|
194
|
+
:deep(.el-card__body) {
|
|
195
|
+
// padding: 10px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
</style>
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 公告列表带分页
|
|
3
|
+
* @Author: 郭勇言
|
|
4
|
+
* @Date: 2024-04-26 17 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, computed, watch, onMounted } from 'vue'
|
|
10
|
+
import { parseTime } from '../../utils/index.js'
|
|
11
|
+
const emits = defineEmits(['liClick', 'liRightClick', 'pageChange', 'titleSearch', 'addNew'])
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
data: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => []
|
|
16
|
+
},
|
|
17
|
+
// 显示标题栏
|
|
18
|
+
showHeader: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
// 显示分类
|
|
23
|
+
showCategory: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
// 显示边框
|
|
28
|
+
showBorder: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
headerStyle: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => {
|
|
35
|
+
return {
|
|
36
|
+
marginLeft: '0px',
|
|
37
|
+
height: '38px',
|
|
38
|
+
backgroundColor: '#F2F2F2',
|
|
39
|
+
border: '1px solid #BDD7E3',
|
|
40
|
+
color: 'rgb(68, 68, 68)'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
pageInfo: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: () => {
|
|
47
|
+
return {
|
|
48
|
+
pageSize: 10,
|
|
49
|
+
currentPage: 1,
|
|
50
|
+
total: 0
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
// 图标配置
|
|
55
|
+
icon: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: ''
|
|
58
|
+
},
|
|
59
|
+
// 是否显示添加按钮
|
|
60
|
+
showAddBtn: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
// 显示状态
|
|
65
|
+
showStatus: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
// 是否显示时间(非年月日)
|
|
70
|
+
showTime: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
74
|
+
// 显示访问次数
|
|
75
|
+
showVisits: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
showText: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
const noticeTitle = ref('')
|
|
85
|
+
/**
|
|
86
|
+
* 行点击事件
|
|
87
|
+
*/
|
|
88
|
+
const liClick = (item) => {
|
|
89
|
+
emits('liClick', item)
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 行右键点击事件
|
|
93
|
+
*/
|
|
94
|
+
const liRightClick = (event,item) => {
|
|
95
|
+
emits('liRightClick', event,item)
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* 分页点击事件
|
|
99
|
+
*/
|
|
100
|
+
const handlesCurrentChange = (val) => {
|
|
101
|
+
emits('pageChange', val)
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 标题查询
|
|
105
|
+
*/
|
|
106
|
+
const titleSearch = () => {
|
|
107
|
+
emits('titleSearch', noticeTitle.value)
|
|
108
|
+
}
|
|
109
|
+
const loading = computed(() => {
|
|
110
|
+
return props.data.length === 0
|
|
111
|
+
})
|
|
112
|
+
/**
|
|
113
|
+
* 新增
|
|
114
|
+
*/
|
|
115
|
+
const addNotice = () => {
|
|
116
|
+
emits('addNew')
|
|
117
|
+
}
|
|
118
|
+
</script>
|
|
119
|
+
<template>
|
|
120
|
+
<el-skeleton :loading="loading" animated>
|
|
121
|
+
<template #template>
|
|
122
|
+
<el-row justify="end">
|
|
123
|
+
<el-skeleton-item variant="text" style="width: 200px; height: 20px; margin-left: 50px" />
|
|
124
|
+
</el-row>
|
|
125
|
+
<el-skeleton-item variant="text" style="width: 80%; height: 20px; margin-left: 50px; margin-top: 20px" />
|
|
126
|
+
<el-skeleton-item variant="text" style="width: 80%; height: 20px; margin-left: 50px; margin-top: 20px" />
|
|
127
|
+
<el-skeleton-item variant="text" style="width: 80%; height: 20px; margin-left: 50px; margin-top: 20px" />
|
|
128
|
+
<el-skeleton-item variant="text" style="width: 80%; height: 20px; margin-left: 50px; margin-top: 20px" />
|
|
129
|
+
<el-skeleton-item variant="text" style="width: 200px; height: 20px; margin-left: 50px; margin-top: 20px" />
|
|
130
|
+
</template>
|
|
131
|
+
<template #default>
|
|
132
|
+
<el-card>
|
|
133
|
+
<el-row justify="space-between">
|
|
134
|
+
<el-col :span="4">
|
|
135
|
+
<el-button v-if="showAddBtn" type="primary" @click="addNotice">新增</el-button>
|
|
136
|
+
</el-col>
|
|
137
|
+
<el-col :span="4">
|
|
138
|
+
<el-input v-model="noticeTitle" @clear="titleSearch" @keydown.enter="titleSearch" placeholder="标题" clearable>
|
|
139
|
+
<template #append>
|
|
140
|
+
<el-button icon="Search" @click="titleSearch" />
|
|
141
|
+
</template>
|
|
142
|
+
</el-input>
|
|
143
|
+
</el-col>
|
|
144
|
+
</el-row>
|
|
145
|
+
<el-divider />
|
|
146
|
+
<div class="noticeul">
|
|
147
|
+
<!-- 表头 -->
|
|
148
|
+
<div v-if="showHeader" class="header noticeli" :style="headerStyle">
|
|
149
|
+
<span class="noticespan">标题</span>
|
|
150
|
+
<span class="noticespan1">作者</span>
|
|
151
|
+
<span class="noticespan1" v-if="showVisits" style="width: 50px" title="访问次数">查看</span>
|
|
152
|
+
<span class="noticespan1" title="发布日期">发布日期</span>
|
|
153
|
+
<span v-if="showStatus" class="noticespan1" title="状态">状态</span>
|
|
154
|
+
</div>
|
|
155
|
+
<!-- 表格列 -->
|
|
156
|
+
<div class="noticewarp" :style="{ border: showBorder ? '1px solid #e0e2e2' : 'none' }">
|
|
157
|
+
<el-empty v-if="data && data.length === 0" description="暂未查询到相关数据" />
|
|
158
|
+
<div class="noticeli" v-for="(item, index) in data" :key="item.id" @click="liClick(item)" @contextmenu.prevent="liRightClick($event, item)" :style="{ borderTop: index != 0 ? '1px #e0e2e2 solid' : 'none' }">
|
|
159
|
+
<el-text v-show="props.showText" type="success" style="width: 50px">{{ item.typeName }}</el-text>
|
|
160
|
+
<span class="noticespan" :title="item.title">
|
|
161
|
+
<span v-if="showCategory" class="noticecategory">[{{ item?.systitle || '--未分类--' }}]</span>
|
|
162
|
+
<img :src="icon" v-if="icon" style="margin-right: 10px; vertical-align: -3px" />
|
|
163
|
+
{{ item.title }}</span
|
|
164
|
+
>
|
|
165
|
+
<span class="noticespan1" :title="item.user_name">{{ item.user_name }}</span>
|
|
166
|
+
<span class="noticevisit" v-if="showVisits" style="width: 50px" title="访问次数">{{ item.visits }}</span>
|
|
167
|
+
<span class="noticespan1" title="发布日期">
|
|
168
|
+
<span v-if="!showTime">
|
|
169
|
+
{{ parseTime(item.create_date, 'yyyy-MM-dd') }}
|
|
170
|
+
</span>
|
|
171
|
+
<span v-else>
|
|
172
|
+
{{ parseTime(item.create_date, 'MM-dd HH:mm') }}
|
|
173
|
+
</span>
|
|
174
|
+
</span>
|
|
175
|
+
<span v-if="showStatus" class="noticespan1" >
|
|
176
|
+
<el-text v-if="item.status == '0'">待处理</el-text>
|
|
177
|
+
<el-text v-if="item.status == '1'">处理中</el-text>
|
|
178
|
+
<el-text v-if="item.status == '2'">已处理</el-text>
|
|
179
|
+
</span>
|
|
180
|
+
</div>
|
|
181
|
+
<!-- 容器预留处理-扩展右键菜单等 -->
|
|
182
|
+
<slot name="contextMenu"></slot>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div class="page">
|
|
186
|
+
<el-pagination class="pagination" :current-page="pageInfo.currentPage" :page-size="pageInfo.pageSize" background @current-change="handlesCurrentChange" layout="total, prev, pager, next, jumper" :pager-count="5" :total="pageInfo.total" v-bind="$attrs" />
|
|
187
|
+
</div>
|
|
188
|
+
</el-card>
|
|
189
|
+
</template>
|
|
190
|
+
</el-skeleton>
|
|
191
|
+
</template>
|
|
192
|
+
|
|
193
|
+
<style lang="scss" scoped>
|
|
194
|
+
.header span {
|
|
195
|
+
color: rgb(68, 68, 68) !important;
|
|
196
|
+
}
|
|
197
|
+
.noticeul {
|
|
198
|
+
height: calc(100% - 50px);
|
|
199
|
+
font-size: 14px;
|
|
200
|
+
.noticeli {
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
margin-left: 10px;
|
|
204
|
+
line-height: 39px;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
.noticespan {
|
|
207
|
+
display: inline-block;
|
|
208
|
+
font-size: 14px;
|
|
209
|
+
margin-left: 8px;
|
|
210
|
+
color: #333;
|
|
211
|
+
white-space: nowrap; /*强制span不换行*/
|
|
212
|
+
display: inline-block; /*将span当做块级元素对待*/
|
|
213
|
+
width: calc(100% - 294px); /*限制宽度*/
|
|
214
|
+
overflow: hidden; /*超出宽度部分隐藏*/
|
|
215
|
+
text-overflow: ellipsis; /*超出部分以点号代替*/
|
|
216
|
+
}
|
|
217
|
+
.noticespan1 {
|
|
218
|
+
display: inline-block;
|
|
219
|
+
font-size: 14px;
|
|
220
|
+
margin-left: 8px;
|
|
221
|
+
white-space: nowrap; /*强制span不换行*/
|
|
222
|
+
display: inline-block; /*将span当做块级元素对待*/
|
|
223
|
+
width: 120px; /*限制宽度*/
|
|
224
|
+
overflow: hidden; /*超出宽度部分隐藏*/
|
|
225
|
+
text-overflow: ellipsis; /*超出部分以点号代替*/
|
|
226
|
+
}
|
|
227
|
+
.title-content {
|
|
228
|
+
display: inline-block;
|
|
229
|
+
}
|
|
230
|
+
.title-content-index {
|
|
231
|
+
display: inline-block;
|
|
232
|
+
font-size: 15px;
|
|
233
|
+
font-weight: bold;
|
|
234
|
+
width: 22px;
|
|
235
|
+
height: 30px;
|
|
236
|
+
line-height: 30px;
|
|
237
|
+
background-size: 100% 100%;
|
|
238
|
+
text-align: left;
|
|
239
|
+
margin-right: 4px;
|
|
240
|
+
position: relative;
|
|
241
|
+
color: #9195a3;
|
|
242
|
+
top: 1px;
|
|
243
|
+
}
|
|
244
|
+
.c-index-top1 {
|
|
245
|
+
color: #fe2d46;
|
|
246
|
+
}
|
|
247
|
+
.c-index-top2 {
|
|
248
|
+
color: #f60;
|
|
249
|
+
}
|
|
250
|
+
.c-index-top3 {
|
|
251
|
+
color: #faa90e;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
.noticeli:hover {
|
|
255
|
+
color: #409eff;
|
|
256
|
+
span {
|
|
257
|
+
color: #409eff;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
.page {
|
|
262
|
+
height: 30px;
|
|
263
|
+
display: flex;
|
|
264
|
+
align-items: center;
|
|
265
|
+
margin-top: 20px;
|
|
266
|
+
.pagination {
|
|
267
|
+
margin-left: 10px;
|
|
268
|
+
text-align: center;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
.noticevisit {
|
|
272
|
+
color: #a90000;
|
|
273
|
+
}
|
|
274
|
+
.noticecategory {
|
|
275
|
+
color: #005eac;
|
|
276
|
+
margin-right: 10px;
|
|
277
|
+
}
|
|
278
|
+
.noticewarp {
|
|
279
|
+
position: relative;
|
|
280
|
+
}
|
|
281
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 公告预览界面
|
|
3
|
+
* @Author: gyy
|
|
4
|
+
* @Date: 2024-04-28 08:49:04
|
|
5
|
+
* @LastEditors: gyy
|
|
6
|
+
* @LastEditTime: 2024-04-28 08:49:04
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div class="docview">
|
|
10
|
+
<h1 class="noticeTitle">{{ data.title }}</h1>
|
|
11
|
+
<div style="padding: 20px 0 0px 0">
|
|
12
|
+
<el-text style="color: #999">
|
|
13
|
+
发布人:
|
|
14
|
+
{{ data.user_name }}
|
|
15
|
+
</el-text>
|
|
16
|
+
<el-text style="margin-left: 14px; color: #999">
|
|
17
|
+
发布时间:{{ data.create_date }}</el-text
|
|
18
|
+
>
|
|
19
|
+
<el-text style="margin-left: 14px; color: #999">
|
|
20
|
+
查看:{{ data.visits }}</el-text
|
|
21
|
+
>
|
|
22
|
+
</div>
|
|
23
|
+
<el-divider style="margin: 10px 0" />
|
|
24
|
+
<el-skeleton :loading="loading" :rows="6" animated>
|
|
25
|
+
<template #template>
|
|
26
|
+
<el-skeleton-item variant="h1" style="width: 20%; height: 20px; margin: 20px" /><br />
|
|
27
|
+
<el-skeleton-item variant="text" style="width: 20%; height: 20px; margin: 20px" /><br />
|
|
28
|
+
<el-skeleton-item variant="h3" style="width: 30%; height: 20px; margin: 20px" /><br />
|
|
29
|
+
<el-skeleton-item variant="caption" style="width: 30%; height: 20px; margin: 20px" /><br />
|
|
30
|
+
<el-skeleton-item variant="button" style="width: 30%; height: 20px; margin: 20px" /><br />
|
|
31
|
+
<el-skeleton-item variant="image" style="width: 120px; height: 120px; margin: 20px" /><br />
|
|
32
|
+
<el-skeleton-item variant="rect" style="width: 30%; height: 20px; margin: 20px" /><br />
|
|
33
|
+
</template>
|
|
34
|
+
<template #default>
|
|
35
|
+
<div v-html="data.content"></div>
|
|
36
|
+
<div v-if="data.imgurl">
|
|
37
|
+
<img :src="bdsdk.getBaseImgUrl(data.imgurl)" alt="">
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
</el-skeleton>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<script setup>
|
|
44
|
+
import { defineComponent, ref, reactive, computed, watch, onMounted, inject, nextTick, onBeforeMount, onUnmounted } from 'vue'
|
|
45
|
+
const emits = defineEmits([])
|
|
46
|
+
const props = defineProps({
|
|
47
|
+
bdsdk: {
|
|
48
|
+
type: Object
|
|
49
|
+
},
|
|
50
|
+
data: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: () => ({
|
|
53
|
+
title: '',
|
|
54
|
+
user_name: '',
|
|
55
|
+
date: '',
|
|
56
|
+
content: '',
|
|
57
|
+
visits: 0
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
const bdsdk = props.bdsdk
|
|
62
|
+
const loading = computed(() => {
|
|
63
|
+
return props.data.content == null
|
|
64
|
+
})
|
|
65
|
+
watch(
|
|
66
|
+
() => props.data,
|
|
67
|
+
(pdata) => {
|
|
68
|
+
console.info(props.data, 'props.data')
|
|
69
|
+
// if (pdata) {
|
|
70
|
+
// const sdk = props.bdsdk
|
|
71
|
+
// const { sdk.getBaseImgUrl } = sdk
|
|
72
|
+
// }
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
onBeforeMount(() => {})
|
|
76
|
+
onMounted(() => {})
|
|
77
|
+
defineExpose({})
|
|
78
|
+
</script>
|
|
79
|
+
<style lang="scss" scoped>
|
|
80
|
+
.docview {
|
|
81
|
+
text-align: center;
|
|
82
|
+
}
|
|
83
|
+
.noticeTitle {
|
|
84
|
+
font-size: 20px;
|
|
85
|
+
color: #444;
|
|
86
|
+
margin-top: 30px;
|
|
87
|
+
margin: 0 auto;
|
|
88
|
+
}
|
|
89
|
+
.notice_icon {
|
|
90
|
+
margin-right: 6px;
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## 通知公共组件
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 分页组件
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2021-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div :class="{ hidden: hidden }" class="pagination-container">
|
|
10
|
+
<el-pagination :background="background" :current-page="currentPage" :page-size="pageSize" :layout="layout" :page-sizes="pageSizes" :total="total" v-bind="$attrs" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { scrollTo } from './scroll-to.js';
|
|
16
|
+
import {computed } from 'vue';
|
|
17
|
+
|
|
18
|
+
const emits = defineEmits(['update:page', 'update:pageSize', 'pagination']);
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
total: {
|
|
22
|
+
required: true,
|
|
23
|
+
type: Number
|
|
24
|
+
},
|
|
25
|
+
page: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 1
|
|
28
|
+
},
|
|
29
|
+
pageSize: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 20
|
|
32
|
+
},
|
|
33
|
+
pageSizes: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default() {
|
|
36
|
+
return [10, 20, 30, 50];
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
layout: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: 'prev, pager, next, jumper, ->, total'
|
|
42
|
+
},
|
|
43
|
+
background: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
autoScroll: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
},
|
|
51
|
+
hidden: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const currentPage = computed({
|
|
58
|
+
get: () => {
|
|
59
|
+
return props.page;
|
|
60
|
+
},
|
|
61
|
+
set: val => {
|
|
62
|
+
emits('update:page', val);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const pageSize = computed({
|
|
67
|
+
get: () => {
|
|
68
|
+
return props.pageSize;
|
|
69
|
+
},
|
|
70
|
+
set: val => {
|
|
71
|
+
emits('update:pageSize', val);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const handleSizeChange = val => {
|
|
76
|
+
emits('pagination', { page: currentPage.value, pageSize: val });
|
|
77
|
+
if (props.autoScroll) {
|
|
78
|
+
scrollTo(0, 800);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const handleCurrentChange = val => {
|
|
83
|
+
emits('pagination', { page: val, pageSize: pageSize.value });
|
|
84
|
+
if (props.autoScroll) {
|
|
85
|
+
scrollTo(0, 800);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style scoped>
|
|
91
|
+
.pagination-container {
|
|
92
|
+
background: #fff;
|
|
93
|
+
padding: 0;
|
|
94
|
+
/* height: 40px; */
|
|
95
|
+
}
|
|
96
|
+
.pagination-container.hidden {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
100
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# 说明文档
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
import {BdPagination,usePage} from '@bdsoft/element'
|
|
5
|
+
// 分页查询
|
|
6
|
+
const getPageList = (parm = {}) => {
|
|
7
|
+
let parms = Object.assign({}, parm)
|
|
8
|
+
getXXX(parms, pageHeader.value).then((res) => {
|
|
9
|
+
let resData = res.data[0].datas
|
|
10
|
+
total.value = res.data[0].total
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 分页hook
|
|
15
|
+
const { currentPage, pageSize, total, pageHeader, handlePagination } = usePage(getPageList)
|
|
16
|
+
|
|
17
|
+
<!-- 分页 -->
|
|
18
|
+
<Pagination :pageSize="pageSize" style="margin-top: 8px" :page="currentPage" layout="prev, pager, next,->, total" :total="total" @pagination="handlePagination"></Pagination>
|
|
19
|
+
```
|