nubomed-ui 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/.env.bi +13 -0
- package/.env.terminal +13 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +17 -0
- package/index.html +13 -0
- package/nubomed-ui/nubomed-ui.es.js +2005 -0
- package/nubomed-ui/nubomed-ui.umd.js +1 -0
- package/nubomed-ui/style.css +1 -0
- package/package.json +19 -7
- package/src/App.vue +31 -0
- package/src/bi-demos/Header.vue +29 -0
- package/src/bi-demos/Table.vue +69 -0
- package/src/bi-demos/index.vue +132 -0
- package/src/bi-packages/components/Box/images/corner-error.png +0 -0
- package/src/bi-packages/components/Box/images/corner-warning.png +0 -0
- package/src/bi-packages/components/Box/images/corner.png +0 -0
- package/src/bi-packages/components/Box/index.scss +86 -0
- package/src/bi-packages/components/Box/index.vue +53 -0
- package/src/bi-packages/components/Carousel/CarouselItem.vue +0 -0
- package/src/bi-packages/components/Carousel/index.vue +0 -0
- package/src/bi-packages/components/Header/images/left-bg.png +0 -0
- package/src/bi-packages/components/Header/images/logo.png +0 -0
- package/src/bi-packages/components/Header/images/right-bg.png +0 -0
- package/src/bi-packages/components/Header/index.scss +50 -0
- package/src/bi-packages/components/Header/index.vue +54 -0
- package/src/bi-packages/components/Table/TableColgroup.vue +43 -0
- package/src/bi-packages/components/Table/index copy.vue +107 -0
- package/src/bi-packages/components/Table/index.scss +118 -0
- package/src/bi-packages/components/Table/index.vue +108 -0
- package/src/bi-packages/components/TableColumn/index.scss +7 -0
- package/src/bi-packages/components/TableColumn/index.vue +60 -0
- package/src/bi-packages/fonts/OPPOSans-B.ttf +0 -0
- package/src/bi-packages/fonts/OPPOSans-M.ttf +0 -0
- package/src/bi-packages/fonts/font.scss +11 -0
- package/src/bi-packages/iconfont-svg/demo.css +539 -0
- package/src/bi-packages/iconfont-svg/demo_index.html +4811 -0
- package/src/bi-packages/iconfont-svg/iconfont.css +819 -0
- package/src/bi-packages/iconfont-svg/iconfont.js +1 -0
- package/src/bi-packages/iconfont-svg/iconfont.json +1416 -0
- package/src/bi-packages/iconfont-svg/iconfont.ttf +0 -0
- package/src/bi-packages/iconfont-svg/iconfont.woff +0 -0
- package/src/bi-packages/iconfont-svg/iconfont.woff2 +0 -0
- package/src/bi-packages/index.js +34 -0
- package/src/bi-packages/styles/mixin.scss +12 -0
- package/src/bi-packages/styles/var.scss +11 -0
- package/src/demos/ActionBar.vue +59 -0
- package/src/demos/Badge.vue +28 -0
- package/src/demos/Button copy.vue +302 -0
- package/src/demos/Button.vue +116 -0
- package/src/demos/ButtonGroup.vue +40 -0
- package/src/demos/Check.vue +29 -0
- package/src/demos/Dialog.vue +255 -0
- package/src/demos/Empty.vue +38 -0
- package/src/demos/FooterMenu.vue +49 -0
- package/src/demos/Header.vue +71 -0
- package/src/demos/Icons.vue +314 -0
- package/src/demos/Input.vue +87 -0
- package/src/demos/InputKeyboard.vue +30 -0
- package/src/demos/InputNumber.vue +34 -0
- package/src/demos/LeftMenu.vue +128 -0
- package/src/demos/Menus.vue +106 -0
- package/src/demos/OpenCabinetBall.vue +37 -0
- package/src/demos/Statusbar.vue +146 -0
- package/src/demos/Steps.vue +45 -0
- package/src/demos/Tost.vue +35 -0
- package/src/demos/button/button.md +19 -0
- package/src/demos/data/terList.json +145 -0
- package/src/demos/images/cabinets/H3000-D.png +0 -0
- package/src/demos/images/cabinets/H3000-R.png +0 -0
- package/src/demos/images/cabinets/H3000-Rh.png +0 -0
- package/src/demos/images/cabinets/H3000-Rh2.png +0 -0
- package/src/demos/images/cabinets/H3010-R.png +0 -0
- package/src/demos/index.vue +348 -0
- package/src/docs/icons/Icon.vue +72 -0
- package/src/docs/icons/icon.md +21 -0
- package/src/docs/index.html +15 -0
- package/src/docs/index.vue +301 -0
- package/src/main.js +23 -0
- package/src/packages/components/ActionBar/images/error.png +0 -0
- package/src/packages/components/ActionBar/images/loading.gif +0 -0
- package/src/packages/components/ActionBar/images/success.png +0 -0
- package/src/packages/components/ActionBar/images/warning.png +0 -0
- package/src/packages/components/ActionBar/images/warning_yellow.png +0 -0
- package/src/packages/components/ActionBar/index.scss +81 -0
- package/src/packages/components/ActionBar/index.vue +100 -0
- package/src/packages/components/Badge/index.scss +50 -0
- package/src/packages/components/Badge/index.vue +75 -0
- package/src/packages/components/Button/index.scss +241 -0
- package/src/packages/components/Button/index.vue +111 -0
- package/src/packages/components/ButtonGroup/index.scss +54 -0
- package/src/packages/components/ButtonGroup/index.vue +75 -0
- package/src/packages/components/Check/Cate.vue +138 -0
- package/src/packages/components/Check/index.scss +47 -0
- package/src/packages/components/Check/index.vue +105 -0
- package/src/packages/components/Dialog/images/error.png +0 -0
- package/src/packages/components/Dialog/images/success.png +0 -0
- package/src/packages/components/Dialog/images/warning-red.png +0 -0
- package/src/packages/components/Dialog/images/warning-yellow.png +0 -0
- package/src/packages/components/Dialog/index.scss +154 -0
- package/src/packages/components/Dialog/index.vue +305 -0
- package/src/packages/components/Empty/images/empty-abnormal.png +0 -0
- package/src/packages/components/Empty/images/empty-data.png +0 -0
- package/src/packages/components/Empty/images/empty-search.png +0 -0
- package/src/packages/components/Empty/index.vue +68 -0
- package/src/packages/components/Form/FormItem.vue +73 -0
- package/src/packages/components/Form/index.vue +76 -0
- package/src/packages/components/Icon/index.vue +30 -0
- package/src/packages/components/Input/index.scss +184 -0
- package/src/packages/components/Input/index.vue +189 -0
- package/src/packages/components/InputKeyboard/index.scss +63 -0
- package/src/packages/components/InputKeyboard/index.vue +117 -0
- package/src/packages/components/InputNumber/index.scss +103 -0
- package/src/packages/components/InputNumber/index.vue +160 -0
- package/src/packages/components/Menu/index.scss +559 -0
- package/src/packages/components/Menu/index.vue +211 -0
- package/src/packages/components/OpenCabinetBall/CabinetStatus.vue +94 -0
- package/src/packages/components/OpenCabinetBall/index.scss +204 -0
- package/src/packages/components/OpenCabinetBall/index.vue +113 -0
- package/src/packages/components/Statusbar/CabinetList.vue +125 -0
- package/src/packages/components/Statusbar/CabinetListStatus.vue +75 -0
- package/src/packages/components/Statusbar/CabinetListTempHum.vue +108 -0
- package/src/packages/components/Statusbar/index.scss +205 -0
- package/src/packages/components/Statusbar/index.vue +83 -0
- package/src/packages/components/Steps/index.scss +104 -0
- package/src/packages/components/Steps/index.vue +66 -0
- package/src/packages/components/SvgIcon/index.vue +41 -0
- package/src/packages/components/Toast/index.vue +72 -0
- package/src/packages/fonts/OPPOSans-B.ttf +0 -0
- package/src/packages/fonts/OPPOSans-M.ttf +0 -0
- package/src/packages/fonts/font.scss +11 -0
- package/src/packages/iconfont-svg/demo.css +539 -0
- package/src/packages/iconfont-svg/demo_index.html +4811 -0
- package/src/packages/iconfont-svg/iconfont.css +819 -0
- package/src/packages/iconfont-svg/iconfont.js +1 -0
- package/src/packages/iconfont-svg/iconfont.json +1416 -0
- package/src/packages/iconfont-svg/iconfont.ttf +0 -0
- package/src/packages/iconfont-svg/iconfont.woff +0 -0
- package/src/packages/iconfont-svg/iconfont.woff2 +0 -0
- package/src/packages/index.js +64 -0
- package/src/packages/styles/var.scss +24 -0
- package/src/utils/create.js +48 -0
- package/src/utils/index.js +13 -0
- package/src/utils/validate.js +3 -0
- package/vite.config.js +47 -0
- package/nubomed-ui.es.js +0 -152
- package/nubomed-ui.umd.js +0 -1
- package/style.css +0 -1
@@ -0,0 +1,125 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-06 14:24:44
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-06 20:59:12
|
6
|
+
* @Description:
|
7
|
+
-->
|
8
|
+
<template>
|
9
|
+
<div class="nb-statusbar-popover">
|
10
|
+
<ul class="nb-statusbar-list">
|
11
|
+
<li v-for="(item, index) in data" :key="index" :class="itemClasses(item)">
|
12
|
+
<div
|
13
|
+
class="nb-statusbar-list__item__left"
|
14
|
+
@click="handleClickCabinet(item, 0)"
|
15
|
+
>
|
16
|
+
<img :src="item.terModelPic" alt="" />
|
17
|
+
<!-- 上下柜 -->
|
18
|
+
<template v-if="item.sTerModelCodeType === 2">
|
19
|
+
<div
|
20
|
+
class="nb-statusbar-list__item__left__top"
|
21
|
+
@click.stop="handleClickCabinet(item, 0)"
|
22
|
+
>
|
23
|
+
<CabinetListStatus
|
24
|
+
:lock-status="item.lockStatus[0]"
|
25
|
+
:connection-status="item.connectionStatus[0]"
|
26
|
+
/>
|
27
|
+
</div>
|
28
|
+
<div
|
29
|
+
class="nb-statusbar-list__item__left__bottom"
|
30
|
+
@click.stop="handleClickCabinet(item, 1)"
|
31
|
+
>
|
32
|
+
<CabinetListStatus
|
33
|
+
:lock-status="item.lockStatus[1]"
|
34
|
+
:connection-status="item.connectionStatus[1]"
|
35
|
+
/>
|
36
|
+
</div>
|
37
|
+
</template>
|
38
|
+
<!-- 左右柜 -->
|
39
|
+
<template v-if="item.sTerModelCodeType === 3">
|
40
|
+
<div
|
41
|
+
class="nb-statusbar-list__item__left__left"
|
42
|
+
@click.stop="handleClickCabinet(item, 0)"
|
43
|
+
>
|
44
|
+
<CabinetListStatus
|
45
|
+
:lock-status="item.lockStatus[0]"
|
46
|
+
:connection-status="item.connectionStatus[0]"
|
47
|
+
/>
|
48
|
+
</div>
|
49
|
+
<div
|
50
|
+
class="nb-statusbar-list__item__left__right"
|
51
|
+
@click.stop="handleClickCabinet(item, 1)"
|
52
|
+
>
|
53
|
+
<CabinetListStatus
|
54
|
+
:lock-status="item.lockStatus[1]"
|
55
|
+
:connection-status="item.connectionStatus[1]"
|
56
|
+
/>
|
57
|
+
</div>
|
58
|
+
</template>
|
59
|
+
<!-- 一体柜 -->
|
60
|
+
<CabinetListStatus
|
61
|
+
v-else
|
62
|
+
:lock-status="item.lockStatus"
|
63
|
+
:connection-status="item.connectionStatus"
|
64
|
+
/>
|
65
|
+
</div>
|
66
|
+
<div class="nb-statusbar-list__item__right">
|
67
|
+
<p class="nb-statusbar-list__item__name">{{ item.sTerDesc }}</p>
|
68
|
+
<!--库存和效期-->
|
69
|
+
<div class="nb-statusbar-list__item__stock">
|
70
|
+
<span>库存 33</span>
|
71
|
+
<span>效期 正常</span>
|
72
|
+
</div>
|
73
|
+
<!-- 温湿度 -->
|
74
|
+
<CabinetListTempHum :data="item.tempHumList" />
|
75
|
+
</div>
|
76
|
+
</li>
|
77
|
+
</ul>
|
78
|
+
<div v-if="showLockAllButton" class="nb-statusbar-button">
|
79
|
+
<nb-button type="primary" size="small" svg-icon="lock">全部开锁</nb-button>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
</template>
|
83
|
+
<script setup>
|
84
|
+
import CabinetListStatus from "./CabinetListStatus.vue";
|
85
|
+
import CabinetListTempHum from "./CabinetListTempHum.vue";
|
86
|
+
import { createNamespace } from '../../../utils/create.js';
|
87
|
+
|
88
|
+
const [name, bem] = createNamespace("statusbar-list");
|
89
|
+
|
90
|
+
// 定义props
|
91
|
+
const props = defineProps({
|
92
|
+
// 时间
|
93
|
+
date: {
|
94
|
+
type: String,
|
95
|
+
default: "",
|
96
|
+
},
|
97
|
+
// 统计值集合:二维数组,label-显示的文字,icon-显示的图标,value-显示的值,abnormal-是否异常
|
98
|
+
data: {
|
99
|
+
type: Array,
|
100
|
+
required: true,
|
101
|
+
default: () => {
|
102
|
+
return [];
|
103
|
+
},
|
104
|
+
},
|
105
|
+
// 是否显示全部开锁按钮
|
106
|
+
showLockAllButton: {
|
107
|
+
type: Boolean,
|
108
|
+
default: false
|
109
|
+
}
|
110
|
+
});
|
111
|
+
|
112
|
+
// 定义emits
|
113
|
+
const emits = defineEmits(["change"]);
|
114
|
+
|
115
|
+
const itemClasses = (item) => {
|
116
|
+
return bem("item", { disabled: item.connectionStatus.some((x) => !x) });
|
117
|
+
};
|
118
|
+
const handleClickCabinet = (item, index) => {
|
119
|
+
emits("change", item, index);
|
120
|
+
};
|
121
|
+
</script>
|
122
|
+
|
123
|
+
<style lang="scss">
|
124
|
+
@import "./index.scss";
|
125
|
+
</style>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-06 15:17:06
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-26 16:28:44
|
6
|
+
* @Description: 柜子状态
|
7
|
+
-->
|
8
|
+
<template>
|
9
|
+
<div v-show="lockStatus === 0 || lockStatus === 2 || !connectionStatus" class="nb-statusbar-list__status--mask">
|
10
|
+
<!-- 已关:显示锁图标 -->
|
11
|
+
<nb-icon v-if="lockStatus === 0" icon="lock" class="nb-statusbar-list__status--lock" />
|
12
|
+
<!-- 开锁中 -->
|
13
|
+
<nb-icon v-if="lockStatus === 2" icon="loading" class="nb-statusbar-list__status--loading" />
|
14
|
+
<!-- 未连接 -->
|
15
|
+
<nb-icon v-if="!connectionStatus" icon="connect-error" class="nb-statusbar-list__status--unconnected" />
|
16
|
+
</div>
|
17
|
+
</template>
|
18
|
+
<script setup>
|
19
|
+
// 定义props
|
20
|
+
const props = defineProps({
|
21
|
+
// 锁状态:0-关,1-开,2-开锁中
|
22
|
+
lockStatus: {
|
23
|
+
type: Number,
|
24
|
+
default: 0
|
25
|
+
},
|
26
|
+
// 连接状态,true-已连接,false-未连接
|
27
|
+
connectionStatus: {
|
28
|
+
type: Boolean,
|
29
|
+
default: true
|
30
|
+
}
|
31
|
+
})
|
32
|
+
</script>
|
33
|
+
|
34
|
+
<style lang="scss">
|
35
|
+
.nb-statusbar-list__status {
|
36
|
+
&--mask {
|
37
|
+
position: absolute;
|
38
|
+
left: 0;
|
39
|
+
right: 0;
|
40
|
+
bottom: 0;
|
41
|
+
top: 0;
|
42
|
+
background-color: rgba(#ffffff, 0.6);
|
43
|
+
z-index: 1;
|
44
|
+
}
|
45
|
+
|
46
|
+
&--lock {
|
47
|
+
width: 36px;
|
48
|
+
color: 36px;
|
49
|
+
color: var(--nb-theme-color);
|
50
|
+
position: absolute;
|
51
|
+
right: 0;
|
52
|
+
bottom: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
&--loading {
|
56
|
+
width: 30px;
|
57
|
+
height: 30px;
|
58
|
+
color: var(--nb-theme-color);
|
59
|
+
position: absolute;
|
60
|
+
top: 50%;
|
61
|
+
left: 50%;
|
62
|
+
transform: translate(-50%, -50%);
|
63
|
+
}
|
64
|
+
|
65
|
+
&--unconnected {
|
66
|
+
width: 40px;
|
67
|
+
height: 40px;
|
68
|
+
color: var(--nb-abnormal-color);
|
69
|
+
position: absolute;
|
70
|
+
top: 50%;
|
71
|
+
left: 50%;
|
72
|
+
transform: translate(-50%, -50%);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
</style>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-06 15:17:06
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-06 20:34:54
|
6
|
+
* @Description: 柜子的温湿度
|
7
|
+
-->
|
8
|
+
<template>
|
9
|
+
<div v-if="data.length" :class="bem()">
|
10
|
+
<div v-for="(item, index) in data" :key="index" :class="bem('row')">
|
11
|
+
<span
|
12
|
+
v-if="item.label"
|
13
|
+
class="nb-statusbar-list-temp__row__item__label"
|
14
|
+
>{{ item.label }}</span
|
15
|
+
>
|
16
|
+
<span v-if="item.tempShow" :class="itemTempClasses(item)">
|
17
|
+
<nb-icon icon="temperature" />
|
18
|
+
<i>{{ item.temp ?? "--" }}℃</i>
|
19
|
+
</span>
|
20
|
+
<span v-if="item.humShow" :class="itemHumClasses(item)">
|
21
|
+
<nb-icon icon="humidity" />
|
22
|
+
<i>{{ item.hum ?? "--" }}%</i>
|
23
|
+
</span>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</template>
|
27
|
+
<script setup>
|
28
|
+
import { createNamespace } from '../../../utils/create.js';
|
29
|
+
|
30
|
+
const [name, bem] = createNamespace("statusbar-list-temp");
|
31
|
+
// 定义props
|
32
|
+
const props = defineProps({
|
33
|
+
// 数据列表
|
34
|
+
data: {
|
35
|
+
type: Array,
|
36
|
+
default: () => {
|
37
|
+
return [];
|
38
|
+
},
|
39
|
+
},
|
40
|
+
// 温度值,不包含单位
|
41
|
+
temp: {
|
42
|
+
type: [Number, String],
|
43
|
+
default: null,
|
44
|
+
},
|
45
|
+
// 温度是否异常
|
46
|
+
tempAbnormal: {
|
47
|
+
type: Boolean,
|
48
|
+
default: false,
|
49
|
+
},
|
50
|
+
// 温度是否显示
|
51
|
+
tempShow: {
|
52
|
+
type: Boolean,
|
53
|
+
default: true,
|
54
|
+
},
|
55
|
+
// 湿度值,不包含单位
|
56
|
+
hum: {
|
57
|
+
type: [Number, String],
|
58
|
+
default: null,
|
59
|
+
},
|
60
|
+
// 湿度是否异常
|
61
|
+
humAbnormal: {
|
62
|
+
type: Boolean,
|
63
|
+
default: false,
|
64
|
+
},
|
65
|
+
// 湿度是否显示
|
66
|
+
humShow: {
|
67
|
+
type: Boolean,
|
68
|
+
default: true,
|
69
|
+
},
|
70
|
+
});
|
71
|
+
|
72
|
+
const itemTempClasses = (item) => {
|
73
|
+
return bem("row__item", { abnormal: item.tempAbnormal });
|
74
|
+
};
|
75
|
+
const itemHumClasses = (item) => {
|
76
|
+
return bem("row__item", { abnormal: item.humAbnormal });
|
77
|
+
};
|
78
|
+
</script>
|
79
|
+
|
80
|
+
<style lang="scss">
|
81
|
+
.nb-statusbar-list-temp {
|
82
|
+
&__row {
|
83
|
+
display: flex;
|
84
|
+
align-items: center;
|
85
|
+
&__item {
|
86
|
+
flex: 1;
|
87
|
+
display: flex;
|
88
|
+
align-items: center;
|
89
|
+
&__label {
|
90
|
+
margin-right: 10px;
|
91
|
+
}
|
92
|
+
.svg-icon {
|
93
|
+
width: 32px;
|
94
|
+
height: 32px;
|
95
|
+
}
|
96
|
+
i {
|
97
|
+
font-style: normal;
|
98
|
+
}
|
99
|
+
&--abnormal i {
|
100
|
+
color: var(--nb-abnormal-color);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
&__row + &__row {
|
105
|
+
margin-top: 5px;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
</style>
|
@@ -0,0 +1,205 @@
|
|
1
|
+
:root {
|
2
|
+
--nb-statusbar-height: 56px;
|
3
|
+
}
|
4
|
+
|
5
|
+
.nb-statusbar {
|
6
|
+
width: 100%;
|
7
|
+
height: var(--nb-statusbar-height);
|
8
|
+
background-color: var(--nb-font-color);
|
9
|
+
color: #ffffff;
|
10
|
+
display: flex;
|
11
|
+
align-items: center;
|
12
|
+
justify-content: space-between;
|
13
|
+
position: relative;
|
14
|
+
&__date {
|
15
|
+
padding: 0 32px;
|
16
|
+
font-size: 20px;
|
17
|
+
line-height: 28px;
|
18
|
+
flex: 1;
|
19
|
+
}
|
20
|
+
|
21
|
+
&__summary {
|
22
|
+
height: 100%;
|
23
|
+
padding: 0 32px 0 105px;
|
24
|
+
cursor: pointer;
|
25
|
+
font-size: 20px;
|
26
|
+
line-height: 28px;
|
27
|
+
display: flex;
|
28
|
+
align-items: center;
|
29
|
+
|
30
|
+
&__item {
|
31
|
+
height: 32px;
|
32
|
+
display: flex;
|
33
|
+
align-items: center;
|
34
|
+
justify-content: center;
|
35
|
+
|
36
|
+
label {
|
37
|
+
margin-right: 5px;
|
38
|
+
}
|
39
|
+
|
40
|
+
i {
|
41
|
+
font-style: normal;
|
42
|
+
}
|
43
|
+
|
44
|
+
.svg-icon {
|
45
|
+
width: 32px;
|
46
|
+
height: 32px;
|
47
|
+
margin-right: 5px;
|
48
|
+
}
|
49
|
+
|
50
|
+
&--abnormal {
|
51
|
+
background-color: var(--nb-abnormal-color);
|
52
|
+
border-radius: 16px;
|
53
|
+
padding: 0 7px;
|
54
|
+
min-width: 64px;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
&__item+&__item {
|
59
|
+
margin-left: 20px;
|
60
|
+
}
|
61
|
+
|
62
|
+
&__line {
|
63
|
+
width: 1px;
|
64
|
+
height: 20px;
|
65
|
+
margin: 0 20px;
|
66
|
+
background-color: #ffffff;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
.nb-statusbar-popover{
|
72
|
+
position: absolute;
|
73
|
+
top: calc(var(--nb-statusbar-height) + 3px);
|
74
|
+
right: 24px;
|
75
|
+
z-index: 3;
|
76
|
+
max-width: 1016px;
|
77
|
+
border-radius: 16px;padding: 20px 0 0 20px;
|
78
|
+
box-sizing: border-box;
|
79
|
+
background-color: #363956;
|
80
|
+
}
|
81
|
+
.nb-statusbar-button{
|
82
|
+
padding: 4px 20px 24px 20px;text-align: right;
|
83
|
+
}
|
84
|
+
.nb-statusbar-list {
|
85
|
+
display: flex;
|
86
|
+
align-items: center;
|
87
|
+
flex-wrap: wrap;
|
88
|
+
font-size: 24px;
|
89
|
+
line-height: 36px;
|
90
|
+
color: #fff;
|
91
|
+
|
92
|
+
&__item {
|
93
|
+
width: 480px;
|
94
|
+
height: 205px;
|
95
|
+
margin: 0 16px 16px 0;
|
96
|
+
background-color: var(--nb-font-color);
|
97
|
+
border-radius: 8px;
|
98
|
+
padding: 20px;
|
99
|
+
overflow: hidden;
|
100
|
+
display: flex;
|
101
|
+
box-sizing: border-box;
|
102
|
+
|
103
|
+
&__left {
|
104
|
+
width: 110px;
|
105
|
+
height: 165px;
|
106
|
+
border-radius: 8px;
|
107
|
+
overflow: hidden;
|
108
|
+
margin-right: 20px;
|
109
|
+
position: relative;
|
110
|
+
background-color: #fff;
|
111
|
+
|
112
|
+
img {
|
113
|
+
width: 100%;
|
114
|
+
height: 100%;
|
115
|
+
}
|
116
|
+
|
117
|
+
&__top {
|
118
|
+
width: 100%;
|
119
|
+
height: 81px;
|
120
|
+
position: absolute;
|
121
|
+
top: 0;
|
122
|
+
left: 0;
|
123
|
+
z-index: 2;
|
124
|
+
|
125
|
+
&::after {
|
126
|
+
content: '';
|
127
|
+
position: absolute;
|
128
|
+
z-index: 3;
|
129
|
+
left: 0;
|
130
|
+
right: 0;
|
131
|
+
top: 81px;
|
132
|
+
background-color: var(--nb-font-color);
|
133
|
+
height: 3px;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
&__bottom {
|
138
|
+
width: 100%;
|
139
|
+
height: 81px;
|
140
|
+
position: absolute;
|
141
|
+
bottom: 0;
|
142
|
+
left: 0;
|
143
|
+
z-index: 2;
|
144
|
+
}
|
145
|
+
|
146
|
+
&__left {
|
147
|
+
width: 53px;
|
148
|
+
height: 100%;
|
149
|
+
position: absolute;
|
150
|
+
top: 0;
|
151
|
+
left: 0;
|
152
|
+
z-index: 2;
|
153
|
+
|
154
|
+
&::after {
|
155
|
+
content: '';
|
156
|
+
position: absolute;
|
157
|
+
z-index: 2;
|
158
|
+
left: 53px;
|
159
|
+
top: 0;
|
160
|
+
bottom: 0;
|
161
|
+
background-color: var(--nb-font-color);
|
162
|
+
width: 4px;
|
163
|
+
}
|
164
|
+
|
165
|
+
.nb-statusbar-list__status--lock {
|
166
|
+
left: 0;
|
167
|
+
right: inherit;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
&__right {
|
172
|
+
width: 53px;
|
173
|
+
height: 100%;
|
174
|
+
position: absolute;
|
175
|
+
top: 0;
|
176
|
+
bottom: 0;
|
177
|
+
right: 0;
|
178
|
+
z-index: 2;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
&__right {
|
183
|
+
flex: 1;
|
184
|
+
display: flex;
|
185
|
+
flex-direction: column;
|
186
|
+
justify-content: space-between;
|
187
|
+
overflow: hidden;
|
188
|
+
max-height: 100%;
|
189
|
+
}
|
190
|
+
|
191
|
+
&__stock {
|
192
|
+
display: flex;
|
193
|
+
align-items: center;
|
194
|
+
|
195
|
+
span {
|
196
|
+
flex: 1;
|
197
|
+
text-align: left;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
&--disabled {
|
202
|
+
color: rgba(#ffffff, 0.5);
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<!--
|
2
|
+
* @Author: chenghuan.dong
|
3
|
+
* @Date: 2023-07-06 10:20:14
|
4
|
+
* @LastEditors: chenghuan.dong
|
5
|
+
* @LastEditTime: 2023-07-25 18:50:10
|
6
|
+
* @Description: 状态栏
|
7
|
+
-->
|
8
|
+
<template>
|
9
|
+
<div class="nb-statusbar">
|
10
|
+
<div class="nb-statusbar__date">{{ date }}</div>
|
11
|
+
<!-- 统计 -->
|
12
|
+
<div class="nb-statusbar__summary" @click.stop="handleToggle">
|
13
|
+
<template v-for="(item, index) in data">
|
14
|
+
<template v-for="(item2, index2) in item" :key="index2">
|
15
|
+
<span :class="bem('summary__item', { abnormal: item2.abnormal })">
|
16
|
+
<label v-if="item2.hasOwnProperty('label') && item2.label">{{ item2.label }}</label>
|
17
|
+
<nb-icon v-if="item2.hasOwnProperty('icon') && item2.icon" :icon="item2.icon" />
|
18
|
+
<i>{{ item2.value }}</i>
|
19
|
+
</span>
|
20
|
+
<span v-if="data.length - 1 > index" class="nb-statusbar__summary__line"></span>
|
21
|
+
</template>
|
22
|
+
</template>
|
23
|
+
</div>
|
24
|
+
<!-- 柜子列表 -->
|
25
|
+
<CabinetList v-show="toggle" :data="terList" :showLockAllButton="showLockAllButton" @change="handleClick" />
|
26
|
+
</div>
|
27
|
+
</template>
|
28
|
+
<script setup>
|
29
|
+
import { ref } from 'vue'
|
30
|
+
import CabinetList from './CabinetList.vue'
|
31
|
+
import { createNamespace } from '../../../utils/create.js'
|
32
|
+
|
33
|
+
const [name, bem] = createNamespace('statusbar')
|
34
|
+
|
35
|
+
// 定义名称
|
36
|
+
defineOptions({
|
37
|
+
name: 'NbStatusbar'
|
38
|
+
})
|
39
|
+
|
40
|
+
// 定义props
|
41
|
+
const props = defineProps({
|
42
|
+
// 时间
|
43
|
+
date: {
|
44
|
+
type: String,
|
45
|
+
default: ''
|
46
|
+
},
|
47
|
+
// 统计值集合:二维数组,label-显示的文字,icon-显示的图标,value-显示的值,abnormal-是否异常
|
48
|
+
data: {
|
49
|
+
type: Array,
|
50
|
+
required: true,
|
51
|
+
default: () => {
|
52
|
+
return []
|
53
|
+
}
|
54
|
+
},
|
55
|
+
// 终端列表
|
56
|
+
terList: {
|
57
|
+
type: Array,
|
58
|
+
default: () => {
|
59
|
+
return []
|
60
|
+
}
|
61
|
+
},
|
62
|
+
// 是否显示全部开锁按钮
|
63
|
+
showLockAllButton: {
|
64
|
+
type: Boolean,
|
65
|
+
default: false
|
66
|
+
}
|
67
|
+
})
|
68
|
+
// 定义emits
|
69
|
+
const emits = defineEmits(['change'])
|
70
|
+
|
71
|
+
const toggle = ref(false)
|
72
|
+
const handleToggle = () => {
|
73
|
+
toggle.value = !toggle.value
|
74
|
+
}
|
75
|
+
|
76
|
+
const handleClick = (item, index) => {
|
77
|
+
emits('change', item, index)
|
78
|
+
}
|
79
|
+
</script>
|
80
|
+
|
81
|
+
<style lang="scss">
|
82
|
+
@import './index.scss';
|
83
|
+
</style>
|
@@ -0,0 +1,104 @@
|
|
1
|
+
:root {
|
2
|
+
}
|
3
|
+
|
4
|
+
.nb-steps {
|
5
|
+
display: flex;
|
6
|
+
align-items: center;
|
7
|
+
box-sizing: border-box;
|
8
|
+
width: 940px;
|
9
|
+
height: 120px;
|
10
|
+
background: #f4f6f9;
|
11
|
+
border-radius: 8px;
|
12
|
+
padding: 25px 20px 20px;
|
13
|
+
overflow: hidden;
|
14
|
+
&__item {
|
15
|
+
display: flex;
|
16
|
+
flex-direction: column;
|
17
|
+
position: relative;
|
18
|
+
min-width: 96px;
|
19
|
+
flex: 1;
|
20
|
+
align-items: center;
|
21
|
+
&::after {
|
22
|
+
content: '';
|
23
|
+
height: 2px;
|
24
|
+
background-color: #CAD0E0;
|
25
|
+
position: absolute;
|
26
|
+
top: 15px;
|
27
|
+
left: 50%;
|
28
|
+
right: -50%;
|
29
|
+
}
|
30
|
+
&:last-child::after {
|
31
|
+
display: none;
|
32
|
+
}
|
33
|
+
&__text {
|
34
|
+
font-size: 24px;
|
35
|
+
line-height: 36px;
|
36
|
+
margin-top: 7px;
|
37
|
+
color: var(--nb-font-color-2);
|
38
|
+
}
|
39
|
+
&__icon {
|
40
|
+
position: relative;
|
41
|
+
width: 32px;
|
42
|
+
height: 32px;
|
43
|
+
display: flex;
|
44
|
+
align-items: center;
|
45
|
+
justify-content: center;
|
46
|
+
}
|
47
|
+
&--process {
|
48
|
+
&::after {
|
49
|
+
margin-left: 16px;
|
50
|
+
margin-right: 12px;
|
51
|
+
}
|
52
|
+
.nb-steps__item__icon {
|
53
|
+
span {
|
54
|
+
width: 32px;
|
55
|
+
height: 32px;
|
56
|
+
background: #ffffff;
|
57
|
+
border: 8px solid #0066e0;
|
58
|
+
box-sizing: border-box;
|
59
|
+
border-radius: 50%;
|
60
|
+
}
|
61
|
+
.svg-icon {
|
62
|
+
display: none;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
.nb-steps__item__text{
|
66
|
+
color: var(--nb-font-color);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
&--wait {
|
70
|
+
&::after {
|
71
|
+
margin-left: 12px;
|
72
|
+
}
|
73
|
+
.nb-steps__item__icon {
|
74
|
+
span {
|
75
|
+
width: 24px;
|
76
|
+
height: 24px;
|
77
|
+
background: #cad0e0;
|
78
|
+
border-radius: 50%;
|
79
|
+
}
|
80
|
+
.svg-icon {
|
81
|
+
display: none;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
&--finish {
|
86
|
+
&::after {
|
87
|
+
margin-left: 10px;background-color: var(--nb-theme-color);
|
88
|
+
}
|
89
|
+
.nb-steps__item__icon {
|
90
|
+
span {
|
91
|
+
display: none;
|
92
|
+
}
|
93
|
+
.svg-icon {
|
94
|
+
width: 24px;
|
95
|
+
height: 24px;
|
96
|
+
color: var(--nb-theme-color);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
.nb-steps__item__text{
|
100
|
+
color: var(--nb-font-color);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|