dolphin-weex-bc 0.0.12 → 0.0.13
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/CHANGELOG.md +5 -0
- package/dist/index.native.js +155 -83
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +145 -82
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-consumables/assets/css/index_diablo.css +50 -2
- package/packages/dof-consumables/index.vue +33 -29
- package/packages/material-event/index.js +18 -9
package/package.json
CHANGED
|
@@ -41,6 +41,56 @@
|
|
|
41
41
|
color: #8E969B;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
.title-txt2-user1{
|
|
45
|
+
font-size: 22px;
|
|
46
|
+
color: #797C7E;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.title-txt2-user1-1{
|
|
50
|
+
font-size: 22px;
|
|
51
|
+
color: #303538;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.title-txt2-user2{
|
|
55
|
+
font-size: 22px;
|
|
56
|
+
color: #8E969B;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.title-txt2-user3{
|
|
60
|
+
font-size: 24px;
|
|
61
|
+
color: #797C7E;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.title-txt2-user3-3{
|
|
65
|
+
font-size: 24px;
|
|
66
|
+
color: #303538;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.title-txt2-user4{
|
|
70
|
+
font-size: 24px;
|
|
71
|
+
color: #8E969B;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.title-txt2-user-n1{
|
|
75
|
+
font-size: 22px;
|
|
76
|
+
color: #D35926;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.title-txt2-user-n2{
|
|
80
|
+
font-size: 22px;
|
|
81
|
+
color: #F56428;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.title-txt2-user-n3{
|
|
85
|
+
font-size: 24px;
|
|
86
|
+
color: #D35926;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.title-txt2-user-n4{
|
|
90
|
+
font-size: 24px;
|
|
91
|
+
color: #F56428;
|
|
92
|
+
}
|
|
93
|
+
|
|
44
94
|
|
|
45
95
|
.title-icon-isScale{
|
|
46
96
|
width: 81px;
|
|
@@ -57,8 +107,6 @@
|
|
|
57
107
|
|
|
58
108
|
.title-txt2-user-isScale{
|
|
59
109
|
font-size: 22px;
|
|
60
|
-
max-width: 340px;
|
|
61
|
-
background-color: #f00;
|
|
62
110
|
}
|
|
63
111
|
|
|
64
112
|
.title-txt2-user-isDiablo{
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
<template v-for="(item, index) in deviceMaterialList">
|
|
4
4
|
<div
|
|
5
5
|
class="material-list"
|
|
6
|
-
:style="{
|
|
6
|
+
:style="{
|
|
7
|
+
width: width + 'px',
|
|
8
|
+
'background-color': isDiablo ? '#101315' : needBackground ? '#fff' : '#F6F7F9',
|
|
9
|
+
'margin-bottom': isScale ? '15px' : '34px'
|
|
10
|
+
}"
|
|
7
11
|
:key="index"
|
|
8
12
|
>
|
|
9
13
|
<template v-if="item.consumables && item.consumables.length > 0">
|
|
@@ -17,14 +21,29 @@
|
|
|
17
21
|
item.deviceInfo.deviceName
|
|
18
22
|
}}</text>
|
|
19
23
|
<div class="title-txt3-box">
|
|
24
|
+
<!-- 因为动态class会产生不预期的bug,先暂时用ifelse处理 -->
|
|
20
25
|
<text v-if="isScale && isDiablo" class="title-txt2-o1">{{ item.deviceInfo.roomName }}</text>
|
|
21
26
|
<text v-else-if="isScale" class="title-txt2-o2">{{ item.deviceInfo.roomName }}</text>
|
|
22
27
|
<text v-else-if="isDiablo" class="title-txt2-o3">{{ item.deviceInfo.roomName }}</text>
|
|
23
28
|
<text v-else-if="!isScale && !isDiablo" class="title-txt2-o4">{{ item.deviceInfo.roomName }}</text>
|
|
24
|
-
|
|
25
|
-
<text
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
|
|
30
|
+
<text v-if="isScale && isDiablo" class="title-txt2-user1-1"> | </text>
|
|
31
|
+
<text v-else-if="isScale" class="title-txt2-user2"> | </text>
|
|
32
|
+
<text v-else-if="isDiablo" class="title-txt2-user3-3"> | </text>
|
|
33
|
+
<text v-else-if="!isScale && !isDiablo" class="title-txt2-user4"> | </text>
|
|
34
|
+
|
|
35
|
+
<template v-if="item.deviceInfo.isOnline == 1">
|
|
36
|
+
<text v-if="isScale && isDiablo" class="title-txt2-user1">在线</text>
|
|
37
|
+
<text v-else-if="isScale" class="title-txt2-user2">在线</text>
|
|
38
|
+
<text v-else-if="isDiablo" class="title-txt2-user3">在线</text>
|
|
39
|
+
<text v-else-if="!isScale && !isDiablo" class="title-txt2-user4">在线</text>
|
|
40
|
+
</template>
|
|
41
|
+
<template v-else>
|
|
42
|
+
<text v-if="isScale && isDiablo" class="title-txt2-user-n1">离线</text>
|
|
43
|
+
<text v-else-if="isScale" class="title-txt2-user-n2">离线</text>
|
|
44
|
+
<text v-else-if="isDiablo" class="title-txt2-user-n3">离线</text>
|
|
45
|
+
<text v-else-if="!isScale && !isDiablo" class="title-txt2-user-n4">离线</text>
|
|
46
|
+
</template>
|
|
28
47
|
</div>
|
|
29
48
|
</div>
|
|
30
49
|
</div>
|
|
@@ -250,27 +269,7 @@ export default {
|
|
|
250
269
|
data() {
|
|
251
270
|
return {
|
|
252
271
|
deviceMaterialList: this.data,
|
|
253
|
-
|
|
254
|
-
chartData: {
|
|
255
|
-
completedColor: '#00a4f2', //环形进度条未完成后的颜色默认#267AFF
|
|
256
|
-
incompletedColor: '#f9f9f9', //环形进度条未完成后的颜色,默认透明
|
|
257
|
-
thickness: 3, //环形进度条宽度,默认4
|
|
258
|
-
cornerRadius: 44, //环形的半径,默认是width/2
|
|
259
|
-
totalCounter: 100, //环形进度条的最大值,默认是360
|
|
260
|
-
progressCounter: 80, //设置进度值,默认是从0-360, 默认为0
|
|
261
|
-
autoProgress: false, //设置是否需要自动执行环形进度,默认false, 如果设置为true,则每秒进度值+1操作
|
|
262
|
-
clockwise: false, //环形自动执行进度的方向,默认是true,即顺时针方向,false为逆时针方向
|
|
263
|
-
startingSlice: 360, //环形进度开始的起始位置,当totalCounter为360的时候,0: 0点钟位置起点,90:3点钟位置起点 180:6点钟位置起点
|
|
264
|
-
pointShow: false, //环形进度中的进度球是否需要显示,默认不显示
|
|
265
|
-
pointRadius: 8, //默认是环形进度宽度的一半
|
|
266
|
-
pointColor: '#FFFFFF', //环形进度中的进度球颜色
|
|
267
|
-
duration: 1000
|
|
268
|
-
},
|
|
269
|
-
arrowIcon: Icon.icon_arrow,
|
|
270
|
-
from: '',
|
|
271
|
-
homegroupId: '',
|
|
272
|
-
applianceCode: '',
|
|
273
|
-
deviceInfo: {}
|
|
272
|
+
arrowIcon: Icon.icon_arrow
|
|
274
273
|
}
|
|
275
274
|
},
|
|
276
275
|
computed: {
|
|
@@ -315,7 +314,9 @@ export default {
|
|
|
315
314
|
methods: {
|
|
316
315
|
async getAllMaterialList() {
|
|
317
316
|
try {
|
|
318
|
-
this.deviceMaterialList = await MaterialEvent.getAllMaterialList(this.materialParams
|
|
317
|
+
this.deviceMaterialList = await MaterialEvent.getAllMaterialList(this.materialParams, {
|
|
318
|
+
isDiablo: this.isDiablo
|
|
319
|
+
})
|
|
319
320
|
console.log('新的耗材数据' + JSON.stringify(this.deviceMaterialList))
|
|
320
321
|
this.getInnerHeight()
|
|
321
322
|
} catch (error) {
|
|
@@ -327,7 +328,10 @@ export default {
|
|
|
327
328
|
|
|
328
329
|
async getMaterialList() {
|
|
329
330
|
try {
|
|
330
|
-
this.deviceMaterialList = await MaterialEvent.getMaterialList(this.materialParams,
|
|
331
|
+
this.deviceMaterialList = await MaterialEvent.getMaterialList(this.materialParams, {
|
|
332
|
+
isDiablo: this.isDiablo,
|
|
333
|
+
isCurrentHome: this.isCurrentHome
|
|
334
|
+
})
|
|
331
335
|
console.log('新的耗材数据' + JSON.stringify(this.deviceMaterialList))
|
|
332
336
|
this.getInnerHeight()
|
|
333
337
|
} catch (error) {
|
|
@@ -338,7 +342,7 @@ export default {
|
|
|
338
342
|
},
|
|
339
343
|
|
|
340
344
|
setWavePercent(item) {
|
|
341
|
-
MaterialEvent.setWavePercent(item)
|
|
345
|
+
return MaterialEvent.setWavePercent(item)
|
|
342
346
|
},
|
|
343
347
|
|
|
344
348
|
// 跳转前节流
|
|
@@ -529,8 +529,13 @@ const MaterialEvent = {
|
|
|
529
529
|
|
|
530
530
|
deviceMaterialList: [],
|
|
531
531
|
|
|
532
|
+
isDiablo: false,
|
|
533
|
+
|
|
534
|
+
isCurrentHome: false,
|
|
535
|
+
|
|
532
536
|
//批量查询耗材的情况
|
|
533
|
-
async getAllMaterialList(params) {
|
|
537
|
+
async getAllMaterialList(params, options) {
|
|
538
|
+
if (options.isDiablo) this.isDiablo = options.isDiablo
|
|
534
539
|
return new Promise(async (resolve, reject) => {
|
|
535
540
|
try {
|
|
536
541
|
console.log('进来这里啦' + JSON.stringify(params))
|
|
@@ -551,12 +556,14 @@ const MaterialEvent = {
|
|
|
551
556
|
})
|
|
552
557
|
},
|
|
553
558
|
|
|
554
|
-
async getMaterialList(params,
|
|
559
|
+
async getMaterialList(params, options) {
|
|
560
|
+
if (options.isDiablo) this.isDiablo = options.isDiablo
|
|
561
|
+
if (options.isCurrentHome) this.isCurrentHome = options.isCurrentHome
|
|
555
562
|
return new Promise(async (resolve, reject) => {
|
|
556
563
|
try {
|
|
557
564
|
console.log('进来这里啦11' + JSON.stringify(params))
|
|
558
565
|
let deviceList = []
|
|
559
|
-
if (isCurrentHome) {
|
|
566
|
+
if (options.isCurrentHome) {
|
|
560
567
|
const res = await this.getCurrentHomeInfo()
|
|
561
568
|
deviceList = res.deviceList
|
|
562
569
|
} else {
|
|
@@ -646,7 +653,8 @@ const MaterialEvent = {
|
|
|
646
653
|
//处理接口返回数据
|
|
647
654
|
async handleMaterialRes(deviceList) {
|
|
648
655
|
let tmpcodeList = []
|
|
649
|
-
let circleColorList = ['#F56428', '#FFAA10', '#00A4F2']
|
|
656
|
+
let circleColorList = this.isDiablo ? ['#D35936', '#BE8214', '#0490D3'] : ['#F56428', '#FFAA10', '#00A4F2']
|
|
657
|
+
console.log('颜色集合:' + JSON.stringify(circleColorList))
|
|
650
658
|
this.deviceMaterialList.forEach(item => {
|
|
651
659
|
let device = deviceList.findIndex(it => item.applianceCode == it.deviceId)
|
|
652
660
|
|
|
@@ -674,6 +682,8 @@ const MaterialEvent = {
|
|
|
674
682
|
const percent = it.percent
|
|
675
683
|
? it.percent
|
|
676
684
|
: Math.ceil(this.floatMul(this.floatDiv(it.remainingValue, it.total), 100))
|
|
685
|
+
|
|
686
|
+
chartData.incompletedColor = this.isDiablo ? '#2b2f32' : '#ffffff'
|
|
677
687
|
it.chartData = {
|
|
678
688
|
...chartData,
|
|
679
689
|
...{
|
|
@@ -880,15 +890,14 @@ const MaterialEvent = {
|
|
|
880
890
|
let type = item.remainingStatus
|
|
881
891
|
let percent = type == 2 ? 0.4 : 0.05
|
|
882
892
|
let percentTxt = type == 2 ? '充足' : '不足'
|
|
883
|
-
let textColorList = ['#F56428', '#F56428', '#00A4F2']
|
|
884
|
-
let frontColorList = ['#F56428', '#F56428', '#9fdaf5']
|
|
885
|
-
let backColorList = ['#fc9791', '#fc9791', '#c7e8f7']
|
|
886
|
-
|
|
893
|
+
let textColorList = this.isDiablo ? ['#D35926', '#D35926', '#0490D3'] : ['#F56428', '#F56428', '#00A4F2']
|
|
894
|
+
let frontColorList = this.isDiablo ? ['#D35926', '#D35926', '#ADE0F6'] : ['#F56428', '#F56428', '#9fdaf5']
|
|
895
|
+
let backColorList = this.isDiablo ? ['#FCA6A1', '#FCA6A1', '#CFEBF8'] : ['#fc9791', '#fc9791', '#c7e8f7']
|
|
887
896
|
return {
|
|
888
897
|
frontWaveColor: frontColorList[type], //已完成后的颜色默认#FFFFFF
|
|
889
898
|
backWaveColor: backColorList[type],
|
|
890
899
|
animate: true,
|
|
891
|
-
backgroundColor: '#FFFFFF', //背景色 默认为#000000
|
|
900
|
+
backgroundColor: this.isDiablo ? '#1E2326' : '#FFFFFF', //背景色 默认为#000000
|
|
892
901
|
progress: percent, // 进度 [0 ... 1]
|
|
893
902
|
textFont: 11, //字体大小,默认为14
|
|
894
903
|
text: percentTxt, //文本 默认为空
|