fix:样式冲突处理

master
blak-kong 2 years ago
parent c76c055467
commit 32d03bd9ee

@ -15,65 +15,65 @@
display: flex;
justify-content: center;
}
}
.countdown-popup-loading {
position: relative;
}
.countdown-popup-loading-time {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 50rpx;
height: 50rpx;
line-height: 50rpx;
margin: auto;
font-size: 54rpx;
text-align: center;
color: #ecf0f3;
font-weight: bold;
}
.countdown-popup-loading {
position: relative;
}
.ui-loading__bg {
position: relative;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
background-color: #ecf0f3;
/* background-image: conic-gradient(#3CACFF 100%,#000 0%); */
}
.ui-loading__bg::before {
content: "";
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 140rpx;
height: 140rpx;
border-radius: 50%;
background-color: #fff;
}
.countdown-popup-loading-time {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 50rpx;
height: 50rpx;
line-height: 50rpx;
margin: auto;
font-size: 54rpx;
text-align: center;
color: #ecf0f3;
font-weight: bold;
}
.ui-loading {
position: absolute;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
background: transparent;
box-sizing: border-box;
border: 10rpx solid #3cacff;
clip-path: polygon(0% 0%, 25% 0%, 50% 50%, 0% 25%);
animation: rotate 1s linear infinite;
}
.ui-loading__bg {
position: relative;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
background-color: #ecf0f3;
/* background-image: conic-gradient(#3CACFF 100%,#000 0%); */
}
.ui-loading__bg::before {
content: "";
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 140rpx;
height: 140rpx;
border-radius: 50%;
background-color: #fff;
}
@keyframes rotate {
from {
transform: rotateZ(0deg);
.ui-loading {
position: absolute;
width: 160rpx;
height: 160rpx;
border-radius: 50%;
background: transparent;
box-sizing: border-box;
border: 10rpx solid #3cacff;
clip-path: polygon(0% 0%, 25% 0%, 50% 50%, 0% 25%);
animation: countdownRotate 1s linear infinite;
}
to {
transform: rotateZ(360deg);
@keyframes countdownRotate {
from {
transform: rotateZ(0deg);
}
to {
transform: rotateZ(360deg);
}
}
}

@ -272,7 +272,12 @@ class IotCarePlanWL200 extends Component<any, any> {
title: obj.name,
});
Taro.showLoading({
title: "请求中...",
mask: true,
});
await this.GetModeList(obj.id);
Taro.hideLoading();
// 如果不存在设备模式值,则判断为首次进入,弹窗提示
let isFirstTipShow = getStorageSync("first_instrument_" + obj.id);
@ -1928,7 +1933,10 @@ class IotCarePlanWL200 extends Component<any, any> {
goFaceReport = () => {
// 跳转前置空定时器,防止重复提交
if (currentTimeTimer) clearInterval(currentTimeTimer);
go("/recording/pages/face_report/face_report?id=" + this.state.currentDevice.id);
go(
"/recording/pages/face_report/face_report?id=" +
this.state.currentDevice.id
);
};
// 完成配对

@ -1,4 +1,4 @@
.box {
.echart-component {
width: 690rpx;
height: 320rpx;
margin: 28rpx auto 150rpx;
@ -8,94 +8,84 @@
box-sizing: border-box;
position: relative;
// writing-mode: vertical-lr;
// text-orientation: upright;
// white-space: nowrap;
// font-size: 18px;
// font-weight: bold;
// background-color: #c2e5f3;
// color: #fff;
// width: 100%;
}
.fullscreen {
position: fixed;
top: 450rpx;
left: -450rpx;
right: 0;
bottom: 0;
width: 100vh;
height: 100vw;
z-index: 9999;
background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
transform: rotate(90deg);
// animation: rotate 0s linear;
}
@keyframes rotate {
from {
width: 690rpx;
height: 320rpx;
transform: rotate(0deg);
}
to {
.fullscreen {
position: fixed;
top: 450rpx;
left: -450rpx;
right: 0;
bottom: 0;
width: 100vh;
height: 100vw;
transform: rotate(0deg);
z-index: 9999;
background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
transform: rotate(90deg);
// animation: rotate 0s linear;
}
}
.box_background {
position: absolute;
top: 0;
left: 0;
width: 690rpx;
height: 320rpx;
border-radius: 30rpx;
background-color: #fff;
.power {
margin: 34rpx 0 28rpx 28rpx;
font-family: PingFang-SC;
font-weight: 500;
font-size: 18rpx;
color: #cccccc;
@keyframes echartRotate {
from {
width: 690rpx;
height: 320rpx;
transform: rotate(0deg);
}
to {
width: 100vh;
height: 100vw;
transform: rotate(0deg);
}
}
.full {
width: 24rpx;
height: 24rpx;
.box_background {
position: absolute;
top: 32rpx;
right: 26rpx;
z-index: 2;
}
.line {
margin: 0 0 6rpx 35rpx;
font-family: PingFang-SC;
font-size: 14rpx;
color: #cccccc;
display: flex;
position: relative;
height: 18rpx;
.bottom_line {
// border-bottom: 1rpx #ccc dashed;
width: 550rpx;
margin-left: 20rpx;
top: 0;
left: 0;
width: 690rpx;
height: 320rpx;
border-radius: 30rpx;
background-color: #fff;
.power {
margin: 34rpx 0 28rpx 28rpx;
font-family: PingFang-SC;
font-weight: 500;
font-size: 18rpx;
color: #cccccc;
}
.full {
width: 24rpx;
height: 24rpx;
position: absolute;
bottom: -6rpx;
right: 74rpx;
height: 4rpx;
color: #fff;
top: 32rpx;
right: 26rpx;
z-index: 2;
}
.line {
margin: 0 0 6rpx 35rpx;
font-family: PingFang-SC;
font-size: 14rpx;
color: #cccccc;
display: flex;
position: relative;
height: 18rpx;
.bottom_line {
// border-bottom: 1rpx #ccc dashed;
width: 550rpx;
margin-left: 20rpx;
position: absolute;
bottom: -6rpx;
right: 74rpx;
height: 4rpx;
color: #fff;
}
}
}
.time {
position: absolute;
bottom: 22rpx;
right: 24rpx;
font-family: PingFang-SC;
font-size: 18rpx;
color: #cccccc;
.time {
position: absolute;
bottom: 22rpx;
right: 24rpx;
font-family: PingFang-SC;
font-size: 18rpx;
color: #cccccc;
}
}
}

@ -9,13 +9,11 @@ import echarts from "@/utils/echarts.min.js";
import "./index.less";
interface Props {
series: any,
full:any
series: any;
full: any;
}
function Index({ series ,full}: Props) {
function Index({ series, full }: Props) {
const echartsRef = useRef<EchartsHandle>(null);
const [options, setOptions] = useState({
animation: false,
@ -145,40 +143,36 @@ function Index({ series ,full}: Props) {
color: "#ff8410",
},
},
series: []
})
series: [],
});
const level = [8, 7, 6, 5, 4, 3, 2];
const [newOptions, setNewOptions] = useState(options)
const [newOptions, setNewOptions] = useState(options);
const updata = useCallback((res) => {
let option = JSON.parse(JSON.stringify(options))
option.series = JSON.parse(JSON.stringify(res))
let option = JSON.parse(JSON.stringify(options));
option.series = JSON.parse(JSON.stringify(res));
// 更新图表数据
setNewOptions(option)
}, [])
setNewOptions(option);
}, []);
const cancelFull = useCallback((res) => {
full()
}, [])
full();
}, []);
useEffect(() => {
setOptions(newOptions)
setOptions(newOptions);
}, [newOptions]);
useEffect(() => {
updata(series)
}, [series])
updata(series);
}, [series]);
return (
<Block>
<View id='box' className='box'>
<View id="box" className="echart-component">
<Echarts
force-use-old-canvas='false'
force-use-old-canvas="false"
echarts={echarts}
option={options}
ref={echartsRef}
@ -186,22 +180,26 @@ function Index({ series ,full}: Props) {
// style自定义设置echarts宽高
style={{ width: "630rpx", height: "260rpx", zIndex: 1 }}
/>
<View className='box_background'>
<Image className='full' src={require("@/img/full-scran.png")} onClick={cancelFull}></Image>
<View className='power'></View>
<View className="box_background">
<Image
className="full"
src={require("@/img/full-scran.png")}
onClick={cancelFull}
></Image>
<View className="power"></View>
{level.map((item) => (
<View className='line' key={item}>
<View className='number'>{item}</View>
<View className='bottom_line'></View>
<View className="line" key={item}>
<View className="number">{item}</View>
<View className="bottom_line"></View>
</View>
))}
<View className='line'>
<View className='number'>1</View>
<View className="line">
<View className="number">1</View>
</View>
<View className='time'></View>
<View className="time"></View>
</View>
</View>
</Block >
</Block>
);
}

@ -1132,7 +1132,7 @@ class Index extends Component<any, any> {
return (
<Block>
{/* <PageMeta pageOrientation="landscape"> */}
{/* <PageMeta pageOrientation="landscape"></PageMeta> */}
<View catchMove>
<PopupAlert
isShow={isCommonError}
@ -1457,13 +1457,6 @@ class Index extends Component<any, any> {
<Popup show={show} className="custom-popup" overlay={false}>
<View className="popBox"></View>
</Popup>
{/* </PageMeta>
<View
style="position:fixed;width:100vw;height:100vh"
onClick={this.goTest}
>
</View> */}
</Block>
);
}

Loading…
Cancel
Save