fix:样式冲突处理

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

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

@ -272,7 +272,12 @@ class IotCarePlanWL200 extends Component<any, any> {
title: obj.name, title: obj.name,
}); });
Taro.showLoading({
title: "请求中...",
mask: true,
});
await this.GetModeList(obj.id); await this.GetModeList(obj.id);
Taro.hideLoading();
// 如果不存在设备模式值,则判断为首次进入,弹窗提示 // 如果不存在设备模式值,则判断为首次进入,弹窗提示
let isFirstTipShow = getStorageSync("first_instrument_" + obj.id); let isFirstTipShow = getStorageSync("first_instrument_" + obj.id);
@ -1928,7 +1933,10 @@ class IotCarePlanWL200 extends Component<any, any> {
goFaceReport = () => { goFaceReport = () => {
// 跳转前置空定时器,防止重复提交 // 跳转前置空定时器,防止重复提交
if (currentTimeTimer) clearInterval(currentTimeTimer); 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; width: 690rpx;
height: 320rpx; height: 320rpx;
margin: 28rpx auto 150rpx; margin: 28rpx auto 150rpx;
@ -8,18 +8,7 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.fullscreen {
// 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; position: fixed;
top: 450rpx; top: 450rpx;
left: -450rpx; left: -450rpx;
@ -31,9 +20,9 @@
background-color: rgba(0, 0, 0, 0.5); /* 背景色 */ background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
transform: rotate(90deg); transform: rotate(90deg);
// animation: rotate 0s linear; // animation: rotate 0s linear;
} }
@keyframes rotate { @keyframes echartRotate {
from { from {
width: 690rpx; width: 690rpx;
height: 320rpx; height: 320rpx;
@ -44,9 +33,9 @@
height: 100vw; height: 100vw;
transform: rotate(0deg); transform: rotate(0deg);
} }
} }
.box_background { .box_background {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -97,6 +86,7 @@
font-size: 18rpx; font-size: 18rpx;
color: #cccccc; color: #cccccc;
} }
}
} }
page { page {

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

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

Loading…
Cancel
Save