|
|
|
|
@ -4,7 +4,7 @@ import { go } from "@/utils/traoAPI";
|
|
|
|
|
import { InstrumentInfo } from "@/utils/Interface";
|
|
|
|
|
|
|
|
|
|
import "taro-ui/dist/style/components/button.scss"; // 按需引入
|
|
|
|
|
import Taro from "@tarojs/taro";
|
|
|
|
|
import Taro, { setStorageSync } from "@tarojs/taro";
|
|
|
|
|
// 引入 Swiper, SwiperItem 组件
|
|
|
|
|
|
|
|
|
|
/*** redux ***/
|
|
|
|
|
@ -13,6 +13,7 @@ import { setMobile } from "@/store/features/userInfo";
|
|
|
|
|
/*** redux end ***/
|
|
|
|
|
import Navbar from "@/components/navbar/navbar";
|
|
|
|
|
import Echarts from "./Echarts/index";
|
|
|
|
|
|
|
|
|
|
import "./moisture_test_report.less";
|
|
|
|
|
|
|
|
|
|
class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
@ -40,7 +41,9 @@ class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
imglist: [],
|
|
|
|
|
id: 0,
|
|
|
|
|
show: false,
|
|
|
|
|
modeId: 0
|
|
|
|
|
modeId: 0,
|
|
|
|
|
echartsData: {},
|
|
|
|
|
showEcharts: false
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -54,11 +57,9 @@ class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
componentDidHide() { }
|
|
|
|
|
|
|
|
|
|
onLoad(option) {
|
|
|
|
|
console.log(option.data);
|
|
|
|
|
console.log(option);
|
|
|
|
|
|
|
|
|
|
let data = JSON.parse(option.data)
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
|
|
let { reportData } = this.state
|
|
|
|
|
reportData.curDate = option.date
|
|
|
|
|
data.GearData.map(item => {
|
|
|
|
|
@ -78,18 +79,10 @@ class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({ reportData, modeId: option.modeId });
|
|
|
|
|
this.moistureTest(option.id, reportData.curDate)
|
|
|
|
|
this.setState({ reportData, modeId: option.modeId, echartsData: JSON.parse(option.echartsData) });
|
|
|
|
|
// this.moistureTest(option.id, reportData.curDate)
|
|
|
|
|
}
|
|
|
|
|
async initData() { }
|
|
|
|
|
async moistureTest(id, curDate) {
|
|
|
|
|
let data = {
|
|
|
|
|
queryDate: curDate,
|
|
|
|
|
instrumentId: id
|
|
|
|
|
}
|
|
|
|
|
let res = await InstrumentInfo.fr200.moistureTest(data);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toIndex() {
|
|
|
|
|
Taro.reLaunch({ url: "/pages/index/index" });
|
|
|
|
|
@ -99,7 +92,7 @@ class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show, modeId } = this.state
|
|
|
|
|
let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show, modeId, echartsData, showEcharts } = this.state
|
|
|
|
|
|
|
|
|
|
const getStatusData = (level) => {
|
|
|
|
|
var bgCssData = {
|
|
|
|
|
@ -263,9 +256,9 @@ class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View className='report_chart'>
|
|
|
|
|
<View className='chart_title common_title'>肌肤整体</View>
|
|
|
|
|
<View className='chart_title common_title'>肌肤整体水分测试报告</View>
|
|
|
|
|
<View className='container'>
|
|
|
|
|
<Echarts></Echarts>
|
|
|
|
|
<Echarts echartsData={echartsData}></Echarts>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
@ -310,7 +303,7 @@ class MoistureTestReport extends Component<any, any> {
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
</Block>
|
|
|
|
|
</Block >
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|