@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,51 @@
|
|
|
1
|
+
Math.easeInOutQuad = function (t, b, c, d) {
|
|
2
|
+
t /= d / 2
|
|
3
|
+
if (t < 1) {
|
|
4
|
+
return c / 2 * t * t + b
|
|
5
|
+
}
|
|
6
|
+
t--
|
|
7
|
+
return -c / 2 * (t * (t - 2) - 1) + b
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
|
|
11
|
+
var requestAnimFrame = (function () {
|
|
12
|
+
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) { window.setTimeout(callback, 1000 / 60) }
|
|
13
|
+
})()
|
|
14
|
+
|
|
15
|
+
// because it's so fucking difficult to detect the scrolling element, just move them all
|
|
16
|
+
function move (amount) {
|
|
17
|
+
document.documentElement.scrollTop = amount
|
|
18
|
+
document.body.parentNode.scrollTop = amount
|
|
19
|
+
document.body.scrollTop = amount
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function position () {
|
|
23
|
+
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function scrollTo (to, duration, callback) {
|
|
27
|
+
const start = position()
|
|
28
|
+
const change = to - start
|
|
29
|
+
const increment = 20
|
|
30
|
+
let currentTime = 0
|
|
31
|
+
duration = (typeof (duration) === 'undefined') ? 500 : duration
|
|
32
|
+
var animateScroll = function () {
|
|
33
|
+
// increment the time
|
|
34
|
+
currentTime += increment
|
|
35
|
+
// find the value with the quadratic in-out easing function
|
|
36
|
+
var val = Math.easeInOutQuad(currentTime, start, change, duration)
|
|
37
|
+
// move the document.body
|
|
38
|
+
move(val)
|
|
39
|
+
// do the animation unless its over
|
|
40
|
+
if (currentTime < duration) {
|
|
41
|
+
requestAnimFrame(animateScroll)
|
|
42
|
+
} else {
|
|
43
|
+
if (callback && typeof (callback) === 'function') {
|
|
44
|
+
// the animation is done so lets callback
|
|
45
|
+
callback()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
animateScroll()
|
|
50
|
+
}
|
|
51
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 状态条
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2021-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div class="status-bar-container" :style="containerStyle">
|
|
10
|
+
<div class="bar" v-for="index in barCount" :key="index" :style="barStyle"></div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script setup>
|
|
14
|
+
import { ref, reactive, computed, watch, onMounted } from "vue";
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
containerWidth: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 80
|
|
19
|
+
},
|
|
20
|
+
bgcolor: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: '#409eff'
|
|
23
|
+
},
|
|
24
|
+
barWidth: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 3
|
|
27
|
+
},
|
|
28
|
+
barSpacing: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 3
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
// const containerWidth = ref(200); // 容器宽度
|
|
34
|
+
// const containerHeight = ref(40); // 容器高度
|
|
35
|
+
const barWidth = ref(props.barWidth); // 长条宽度
|
|
36
|
+
const barSpacing = ref(props.barSpacing); // 长条间隔
|
|
37
|
+
|
|
38
|
+
const containerStyle = computed(() => ({
|
|
39
|
+
width: `100%`,
|
|
40
|
+
height: `100%`,
|
|
41
|
+
// backgroundColor: props.bgcolor, // 容器背景颜色,根据需要调整
|
|
42
|
+
display: 'flex',
|
|
43
|
+
flexDirection: 'row',
|
|
44
|
+
alignItems: 'stretch'
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
const barCount = computed(() => {
|
|
48
|
+
// 计算可以放置多少个长条
|
|
49
|
+
const totalBarWidth = barWidth.value + barSpacing.value; // 单个长条总占用宽度
|
|
50
|
+
return Math.floor(props.containerWidth / totalBarWidth); // 计算可以放置的长条数量
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const barStyle = computed(() => ({
|
|
54
|
+
width: `${barWidth.value}px`,
|
|
55
|
+
marginRight: `${barSpacing.value}px`,
|
|
56
|
+
backgroundColor: props.bgcolor // 长条颜色,根据需要调整
|
|
57
|
+
}));
|
|
58
|
+
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="scss" scoped>
|
|
62
|
+
/* 容器和长条的基本样式 */
|
|
63
|
+
.status-bar-container {
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
/* 隐藏多余的长条 */
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bar {
|
|
69
|
+
height: 100%;
|
|
70
|
+
/* 长条高度充满容器 */
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 进度条内显示百分比标识
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2021-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<el-progress class="bd-progress" :color="bgcolor" :text-inside="true" striped :stroke-width="strokeWidth"
|
|
10
|
+
:percentage="percentage" />
|
|
11
|
+
</template>
|
|
12
|
+
<script setup>
|
|
13
|
+
import { ref, reactive, computed, watch, onMounted } from "vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
width: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 20
|
|
18
|
+
},
|
|
19
|
+
bgcolor: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: '#409eff'
|
|
22
|
+
},
|
|
23
|
+
strokeWidth: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 20
|
|
26
|
+
},
|
|
27
|
+
percentage: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 50
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const getColor = computed(() => {
|
|
34
|
+
let p = props.percentage
|
|
35
|
+
if (p < 30) {
|
|
36
|
+
return '#67c23a'
|
|
37
|
+
} else if (p < 50) {
|
|
38
|
+
return '#ffa724'
|
|
39
|
+
} else if (p > 70) {
|
|
40
|
+
return '#f56c6c'
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
.bd-progress {
|
|
47
|
+
:deep(.el-progress-bar) {
|
|
48
|
+
.el-progress-bar__outer {
|
|
49
|
+
border-radius: 5px !important;
|
|
50
|
+
background-color: #07215c;
|
|
51
|
+
|
|
52
|
+
.el-progress-bar__inner {
|
|
53
|
+
border-radius: 5px !important;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<slot/>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
|
10
|
+
import screenfull from 'screenfull'
|
|
11
|
+
|
|
12
|
+
// 定义响应式变量
|
|
13
|
+
const isFullscreen = ref(false)
|
|
14
|
+
|
|
15
|
+
// 处理点击事件
|
|
16
|
+
const click = () => {
|
|
17
|
+
if (!screenfull.enabled) {
|
|
18
|
+
alert('你的浏览器不支持全屏模式')
|
|
19
|
+
return false
|
|
20
|
+
}
|
|
21
|
+
screenfull.toggle()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 处理全屏状态变化
|
|
25
|
+
const change = () => {
|
|
26
|
+
isFullscreen.value = screenfull.isFullscreen
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 初始化事件监听
|
|
30
|
+
const init = () => {
|
|
31
|
+
if (screenfull.enabled) {
|
|
32
|
+
screenfull.on('change', change)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 销毁事件监听
|
|
37
|
+
const destroy = () => {
|
|
38
|
+
if (screenfull.enabled) {
|
|
39
|
+
screenfull.off('change', change)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 组件挂载时初始化
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
init()
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
// 组件卸载前销毁事件监听
|
|
49
|
+
onBeforeUnmount(() => {
|
|
50
|
+
destroy()
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style scoped>
|
|
55
|
+
.screenfull-svg {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
fill: #5a5e66;
|
|
59
|
+
width: 20px;
|
|
60
|
+
height: 20px;
|
|
61
|
+
vertical-align: 10px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
</style>
|
|
65
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bdsoft/element-screenfull",
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"screenfull": "^6.0.2"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 统计数组件
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2021-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<el-row style="height: 100%;width: 100%;border-radius: 10px;padding:0 10px;" :style="{ background: bgColor }">
|
|
10
|
+
<el-col :span="10">
|
|
11
|
+
<div
|
|
12
|
+
style="width: 100%;padding: 10px 0;display: flex;align-items: center;justify-content: center;">
|
|
13
|
+
<img :src="countIcon" alt="" height="30px">
|
|
14
|
+
</div>
|
|
15
|
+
<div style="height: 30px;width: 100%;display: flex;justify-content: center; line-height: 30px;text-align: center;color: #fff;">
|
|
16
|
+
<span>{{ countTitle }}</span>
|
|
17
|
+
</div>
|
|
18
|
+
</el-col>
|
|
19
|
+
<el-col :span="14" style="display: flex;align-items: center;justify-content: center;">
|
|
20
|
+
<div class="stepnum">
|
|
21
|
+
<count-up :id-name="idName" class="infor-intro-num user-created-count" id-name="idName3"
|
|
22
|
+
:end-val="countNum" :countSize="1033" :countWeight="700"> </count-up>
|
|
23
|
+
<span class="dw">{{ countDw }}</span>
|
|
24
|
+
</div>
|
|
25
|
+
</el-col>
|
|
26
|
+
</el-row>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { ref, reactive, computed, watch, onMounted } from "vue";
|
|
31
|
+
|
|
32
|
+
// import countUp from '../coms/countup/countUp.vue';
|
|
33
|
+
import countUp from '../countup/index.vue'
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
idName: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ''
|
|
38
|
+
},
|
|
39
|
+
countTitle: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ''
|
|
42
|
+
},
|
|
43
|
+
countIcon: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ''
|
|
46
|
+
},
|
|
47
|
+
countNum: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 0,
|
|
50
|
+
require:true
|
|
51
|
+
},
|
|
52
|
+
countDw: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ''
|
|
55
|
+
},
|
|
56
|
+
bgColor: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: '#0b2f6a'
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
</script>
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
.stepnum {
|
|
65
|
+
color: #fff;
|
|
66
|
+
font-size: 32px;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
|
|
69
|
+
.infor-intro-num {
|
|
70
|
+
display: inline-block;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dw {
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
line-height: 1;
|
|
76
|
+
font-weight: normal;
|
|
77
|
+
margin-left: 5px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## 统计数组件
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
```
|
|
5
|
+
import { BdStatisticalCount } from '@bdsoft/element'
|
|
6
|
+
|
|
7
|
+
<el-row style="height: 100px;margin-bottom: 10px;">
|
|
8
|
+
<el-col :span="12" style="padding: 10px;">
|
|
9
|
+
<BdStatisticalCount :idName="'id1'" :countTitle="'云服务器'" :countIcon="'count/yfwq.png'"
|
|
10
|
+
:countNum="statistics.servernum" :countDw="''"
|
|
11
|
+
bgColor=" linear-gradient( 135deg, #FDD819 10%, #E80505 100%)">
|
|
12
|
+
</BdStatisticalCount>
|
|
13
|
+
</el-col>
|
|
14
|
+
<el-col :span="12" style="padding: 10px;">
|
|
15
|
+
<BdStatisticalCount :idName="'id3'" :countTitle="'专业软件'" :countIcon="'syslog/yingyong1.png'"
|
|
16
|
+
:countNum="statistics.modulecount" :countDw="''"
|
|
17
|
+
:bgColor="'linear-gradient( 135deg, #6B73FF 10%, #000DFF 100%)'">
|
|
18
|
+
</BdStatisticalCount>
|
|
19
|
+
</el-col>
|
|
20
|
+
</el-row>
|
|
21
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @FileDescription: 名字组件
|
|
3
|
+
* @Author: 李兵泉
|
|
4
|
+
* @Date: 2025-06-08 09 时
|
|
5
|
+
* @LastEditors: 最后更新作者
|
|
6
|
+
* @LastEditTime: 最后更新时间
|
|
7
|
+
-->
|
|
8
|
+
<template>
|
|
9
|
+
<div
|
|
10
|
+
class="name-container"
|
|
11
|
+
:style="{
|
|
12
|
+
backgroundColor: bgColor === 'random' ? getRandomColor() : bgColor,
|
|
13
|
+
color: textColor,
|
|
14
|
+
width: width,
|
|
15
|
+
height: height
|
|
16
|
+
}"
|
|
17
|
+
>
|
|
18
|
+
{{ displayName }}
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
export default {
|
|
24
|
+
props: {
|
|
25
|
+
name: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
// 定义背景颜色 传递random则随机生成颜色
|
|
30
|
+
bgColor: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '#007BFF'
|
|
33
|
+
},
|
|
34
|
+
// 定义文字颜色
|
|
35
|
+
textColor: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: '#FFFFFF'
|
|
38
|
+
},
|
|
39
|
+
// 定义组件的宽高
|
|
40
|
+
width: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '28px'
|
|
43
|
+
},
|
|
44
|
+
height: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '28px'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
computed: {
|
|
50
|
+
displayName() {
|
|
51
|
+
return this.name.slice(-2)
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
getRandomColor() {
|
|
56
|
+
const letters = '0123456789ABCDEF'
|
|
57
|
+
let color = '#'
|
|
58
|
+
for (let i = 0; i < 6; i++) {
|
|
59
|
+
color += letters[Math.floor(Math.random() * 16)]
|
|
60
|
+
}
|
|
61
|
+
return color
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style scoped>
|
|
68
|
+
.name-container {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
width: 30px;
|
|
73
|
+
height: 30px;
|
|
74
|
+
border-radius: 50%;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
margin-right: 10px;
|
|
77
|
+
/* font-weight: bold; */
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
## 名字组件
|
|
3
|
+
功能:
|
|
4
|
+
1. 显示用户名称(后两位)
|
|
5
|
+
2. 随机背景色(bgColor="random")
|
|
6
|
+
3. 修改组件宽高
|
|
7
|
+
|
|
8
|
+
使用方法:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
import { BdUserName } from '@bdsoft/element'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<el-table-column label="用户名称" prop="user_name" width="200" show-overflow-tooltip>
|
|
15
|
+
<template #default="scope">
|
|
16
|
+
<span style="display: flex; align-items: center">
|
|
17
|
+
<BdUserName :name="scope.row.user_name" bgColor="random"></BdUserName>
|
|
18
|
+
{{ scope.row.user_name }}
|
|
19
|
+
</span>
|
|
20
|
+
</template>
|
|
21
|
+
</el-table-column>
|
|
22
|
+
```
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
|
|
3
|
+
import { showsuccess, showerror, showwarning, showinfo } from '../utils/message.js'
|
|
4
|
+
// App是用来确定类型
|
|
5
|
+
export default function registerProperties(app: App) {
|
|
6
|
+
app.config.globalProperties.showsuccess = showsuccess
|
|
7
|
+
app.config.globalProperties.showerror = showerror
|
|
8
|
+
app.config.globalProperties.showwarning = showwarning
|
|
9
|
+
app.config.globalProperties.showinfo = showinfo
|
|
10
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// 导出element 开发的相关的界面
|
|
2
|
+
import BdEmpty from './components/empty/empty.vue'
|
|
3
|
+
import BdInvalid from './components/empty/invalid.vue' // 无效页面组件
|
|
4
|
+
import BdBuilding from './components/empty/building.vue'
|
|
5
|
+
import BdBar from './components/layout/bar.vue'
|
|
6
|
+
import BdNav from './components/layout/nav.vue'
|
|
7
|
+
import BdBadge from './components/badge/index.vue'
|
|
8
|
+
import BdLayout1 from './components/layout/layout1.vue'
|
|
9
|
+
import BdLayout2 from './components/layout/layout2.vue'
|
|
10
|
+
import BdLayout3 from './components/layout/layout3.vue'
|
|
11
|
+
import BdLayout4 from './components/layout/layout4.vue'
|
|
12
|
+
// 搜索框组件
|
|
13
|
+
import HeadSearch from './xm_components/HeadSearch/index.vue'
|
|
14
|
+
// 里程碑组件
|
|
15
|
+
import Milestone from './xm_components/Milestone/index.vue'
|
|
16
|
+
// 多维数据统计组件
|
|
17
|
+
import StatisticalCard from './xm_components/StatisticalCard/index.vue'
|
|
18
|
+
// 多数据指标统计
|
|
19
|
+
import MultiStatisticalCard from './xm_components/MultiStatisticalCard/index.vue'
|
|
20
|
+
import BDCarousel from './components/carousel/index.vue'
|
|
21
|
+
import BdFormItem from './components/form/FormItem.vue'
|
|
22
|
+
import BdForm from './components/form/Form.vue'
|
|
23
|
+
import Notice from './components/notice/NoticeList.vue'
|
|
24
|
+
import NoticePage from './components/notice/NoticeListPaging.vue'
|
|
25
|
+
import NoticeView from './components/notice/NoticeView.vue'
|
|
26
|
+
// 完成提示动画组件
|
|
27
|
+
import BdFinish from './components/basic/Finish.vue'
|
|
28
|
+
// 计数组件
|
|
29
|
+
import BdCountUp from './components/countup/index.vue'
|
|
30
|
+
// 按钮组件
|
|
31
|
+
import BdButton from './components/button/index.vue'
|
|
32
|
+
// 进度条
|
|
33
|
+
import BDProgress from './components/progress/progress.vue'
|
|
34
|
+
import BDProgressBar from './components/progress/bar.vue'
|
|
35
|
+
// 分页组件
|
|
36
|
+
import BdPagination from './components/pagination/index.vue'
|
|
37
|
+
// 词云组件
|
|
38
|
+
import BdWordsCloud from './components/3dcloudwords/index.vue'
|
|
39
|
+
// 右键菜单
|
|
40
|
+
import BdContextMenu from './components/contextMenu/index.vue'
|
|
41
|
+
// loading菜单
|
|
42
|
+
import BdLoading from './components/loading/index.vue'
|
|
43
|
+
// 异常页面
|
|
44
|
+
import BdError from './components/error/Error.vue'
|
|
45
|
+
// 名字组件
|
|
46
|
+
import BdUserName from './components/username/index.vue'
|
|
47
|
+
// 图表属性配置组件
|
|
48
|
+
import BdChartConfig from './components/chartconfig/index.vue'
|
|
49
|
+
// 统计数+图标组件
|
|
50
|
+
import BdStatisticalCount from './components/statisticalCount/index.vue'
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
BdStatisticalCount,
|
|
55
|
+
BdBuilding,
|
|
56
|
+
BdChartConfig,
|
|
57
|
+
BdUserName,
|
|
58
|
+
BdError,
|
|
59
|
+
BdLoading,
|
|
60
|
+
BdContextMenu,
|
|
61
|
+
BdWordsCloud,
|
|
62
|
+
BdPagination,
|
|
63
|
+
BdNav,
|
|
64
|
+
BdBar,
|
|
65
|
+
BdBadge,
|
|
66
|
+
BdLayout1,
|
|
67
|
+
BdLayout2,
|
|
68
|
+
BdLayout3,
|
|
69
|
+
BdLayout4,
|
|
70
|
+
HeadSearch,
|
|
71
|
+
Milestone,
|
|
72
|
+
StatisticalCard,
|
|
73
|
+
MultiStatisticalCard,
|
|
74
|
+
BdEmpty,
|
|
75
|
+
BdInvalid,
|
|
76
|
+
BDCarousel,
|
|
77
|
+
BDProgress,
|
|
78
|
+
BDProgressBar,
|
|
79
|
+
BdFormItem,
|
|
80
|
+
BdForm,
|
|
81
|
+
Notice,
|
|
82
|
+
NoticePage,
|
|
83
|
+
NoticeView,
|
|
84
|
+
BdButton,
|
|
85
|
+
BdCountUp,
|
|
86
|
+
BdFinish
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function LoadComponent(props, { slots, emit, attrs }) {
|
|
2
|
+
return (
|
|
3
|
+
<div class="loadsvg" style="height:20px;width:20px;">
|
|
4
|
+
<svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true">
|
|
5
|
+
<path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</div>
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
export default LoadComponent
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import is from './type';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 获取url参数
|
|
5
|
+
* @param {*} name
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export function getUrlKey(name, url) {
|
|
9
|
+
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url || location.href) || [, ''])[1].replace(/\+/g, '%20')) || null
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// 生成guid
|
|
13
|
+
function S4() {
|
|
14
|
+
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 生成guid
|
|
18
|
+
export function NewGuid() {
|
|
19
|
+
return S4() + S4() + '-' + S4() + '-' + S4() + '-' + S4() + '-' + S4() + S4() + S4()
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 创建一个防抖函数
|
|
23
|
+
// const debouncedClick = debounce(handleQa, 500);
|
|
24
|
+
export const debounce = (func, delay) => {
|
|
25
|
+
let timer
|
|
26
|
+
return (...args) => {
|
|
27
|
+
clearTimeout(timer)
|
|
28
|
+
timer = setTimeout(() => {
|
|
29
|
+
func(...args)
|
|
30
|
+
}, delay)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ref, nextTick } from 'vue'
|
|
2
|
+
|
|
3
|
+
// 公共的Hook,用于管理对话框的显示和隐藏 用法如下:
|
|
4
|
+
// import {useDialog} from '@bdsoft/element'
|
|
5
|
+
// const { visible, showDialog,openParms,hideDialog } = useDialog()
|
|
6
|
+
// defineExpose({
|
|
7
|
+
// showDialog,
|
|
8
|
+
// hideDialog
|
|
9
|
+
// })
|
|
10
|
+
// 自定义Hook,用于管理对话框的显示和隐藏
|
|
11
|
+
export function useDialog(showFn) {
|
|
12
|
+
const visible = ref(false)
|
|
13
|
+
// 打开窗体传递的对象
|
|
14
|
+
const openParms = ref({})
|
|
15
|
+
const extParms = ref({}) // 扩展用
|
|
16
|
+
// 显示窗体
|
|
17
|
+
const showDialog = (parm,ext) => {
|
|
18
|
+
visible.value = true
|
|
19
|
+
openParms.value = parm
|
|
20
|
+
|
|
21
|
+
extParms.value = ext
|
|
22
|
+
nextTick(() => {
|
|
23
|
+
showFn && showFn()
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
// 隐藏窗体
|
|
27
|
+
const hideDialog = () => {
|
|
28
|
+
visible.value = false
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
visible,
|
|
33
|
+
openParms,
|
|
34
|
+
extParms,
|
|
35
|
+
showDialog,
|
|
36
|
+
hideDialog
|
|
37
|
+
}
|
|
38
|
+
}
|