2611 lines
70 KiB
Vue
2611 lines
70 KiB
Vue
<template>
|
||
<view class="qualitySpringback">
|
||
<view class="fixedheader">
|
||
<headers :showBack="true">
|
||
<view class="headerName">
|
||
测量数据
|
||
</view>
|
||
</headers>
|
||
</view>
|
||
|
||
<view class="content">
|
||
|
||
<view class="measure_data">
|
||
<view class="title">·构件信息·</view>
|
||
<view class="measure_content">
|
||
<view class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%">轴线: </view>
|
||
<view style="display:flex;align-items: center;margin-right: 32rpx">X:<input class="num_input" disabled v-model="axisX" type="number" placeholder="请输入" /></view>
|
||
<view style="display:flex;align-items: center;">Y:<input class="num_input" disabled v-model="axisY" type="number" placeholder="请输入" /></view>
|
||
</view>
|
||
<view class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%;position: relative;">
|
||
测量类型:
|
||
<uni-icons2 type="help" size="14" @click="showDetail = true"></uni-icons2>
|
||
<view v-show="showDetail" class="info_detail">
|
||
高强回弹仪 测量范围 C20-C100,适用范围C50-C100
|
||
<uni-icons2 class="close_btn" type="closeempty" size="14" @click="showDetail = false"></uni-icons2>
|
||
</view>
|
||
</view>
|
||
<picker disabled class="picker" @change="pickerChangeType" :value="typeIndex" :range="optionList3"
|
||
range-key="name">
|
||
<view class="uni-input">{{optionList3[typeIndex].name}}</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<view class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%;position: relative;">
|
||
构件类型:
|
||
</view>
|
||
<picker disabled class="picker" @change="pickerChangeType2" :value="typeIndex2" :range="optionList4"
|
||
range-key="name">
|
||
<view class="uni-input">{{optionList4[typeIndex2].name}}</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<view v-if="typeIndex!= 2" class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%">测量角度: </view>
|
||
<picker disabled class="picker" @change="pickerChangeFloor" :value="angleIndex" :range="optionList"
|
||
range-key="name">
|
||
<view class="uni-input">{{optionList[angleIndex].name}}</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<view v-else-if="typeIndex == 2" class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%">测量角度: </view>
|
||
<picker disabled="typeIndex == 2" class="picker" :value="0" :range="optionList"
|
||
range-key="name">
|
||
<view class="uni-input">水平0°</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<view v-if="typeIndex != 2" class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%;">测区混凝土类型: </view>
|
||
<picker disabled class="picker" @change="pickerChangeConcreteType" :value="concreteType"
|
||
:range="concreteTypeList" range-key="name">
|
||
<view class="uni-input">{{concreteTypeList[concreteType].name}}</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<view v-else-if="typeIndex == 2" class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%;">测区混凝土类型: </view>
|
||
<picker :disabled="typeIndex == 2" class="picker" value=""
|
||
:range="concreteTypeList" range-key="name">
|
||
<view class="uni-input">动能4.5J回弹仪测区强度换算</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<!-- <view class="flex2" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%">碳化深度:</view>
|
||
<input class="input_box" :value="123" type="number" placeholder="请输入" />
|
||
</view> -->
|
||
<view class="flex2" style="margin:0px 0 40rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%">设计强度: </view>
|
||
<picker disabled class="picker" @change="pickerChangeStrength" :value="strengthIndex"
|
||
:range="optionList2" range-key="name">
|
||
<view class="uni-input">{{optionList2[strengthIndex].name}}</view>
|
||
<uni-icons2 class="arrowdown" type="arrowdown"></uni-icons2>
|
||
</picker>
|
||
</view>
|
||
<view class="flex2 f-start" style="margin:0px 0 20rpx">
|
||
<view style="font-size:30rpx;color:#372D66;width: 40%">选择测区:</view>
|
||
<view class="img_box">
|
||
<image class="img_bg" :src="url_config+'image/'+imgUrl" />
|
||
<view v-if="isShowPoint" class="point" :style="{left: mapX+'%',top: mapY+'%'}">
|
||
<image v-if="resultType==1" src="../../../../static/betonManage/g-icon.png"></image>
|
||
<image v-if="resultType==2 && pageType == ''" src="../../../../static/betonManage/y-icon.png"></image>
|
||
<image v-if="resultType==2 && pageType == 1" src="../../../../static/betonManage/o-icon.png"></image>
|
||
<image v-if="resultType==2 && pageType == 2" src="../../../../static/betonManage/r-icon.png"></image>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
<view class="content">
|
||
<view class="measure_data st_2">
|
||
<view v-if="typeIndex != 2" class="title" style="margin-bottom: 20rpx;">·碳化深度·</view>
|
||
<view v-if="typeIndex != 2" class="flex2 depth_wrap">
|
||
<view class="depth" style="width: 22%;"><input class="uni-input" :disabled="isShow10" placeholder-style="font-size:24rpx"
|
||
placeholder="--" disabled @input="(e)=>changeCarbonation(e,1)"
|
||
v-model="carbonation.carbonationDepth1" />
|
||
</view>
|
||
<view class="depth" style="width: 22%;"><input class="uni-input" :disabled="isShow10" placeholder-style="font-size:24rpx"
|
||
placeholder="--" disabled @input="(e)=>changeCarbonation(e,2)"
|
||
v-model="carbonation.carbonationDepth2" />
|
||
</view>
|
||
<view class="depth" style="width: 22%;"><input class="uni-input" :disabled="isShow10" placeholder-style="font-size:24rpx"
|
||
placeholder="--" disabled @input="(e)=>changeCarbonation(e,3)"
|
||
v-model="carbonation.carbonationDepth3" />
|
||
</view>
|
||
<view class="depth" style="width: 44%;">平均值: {{form.carbonationDepthAvg}}</view>
|
||
</view>
|
||
<view class="title">·数据测量·</view>
|
||
<view class="measure_content">
|
||
<view v-if="isShow10">
|
||
<scroll-view class="scroll-view_H" scroll-x="true">
|
||
<view class="scroll-view-item_H" :class="activeTabIndex==index?'active':''" v-for="(item,index) in 10" :key="index" @click="changeLevel(index)">
|
||
<text class="name">测区{{index+1}}</text>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
<view class="flex3">
|
||
<view class="table flex4">
|
||
<ul class="table_box">
|
||
<li :class="colorIndexArr.indexOf(1)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,1)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue1" /></li>
|
||
<li :class="colorIndexArr.indexOf(5)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,5)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue5" /></li>
|
||
<li :class="colorIndexArr.indexOf(9)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,9)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue9" /></li>
|
||
<li :class="colorIndexArr.indexOf(13)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,13)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue13" /></li>
|
||
</ul>
|
||
<ul class="table_box">
|
||
<li :class="colorIndexArr.indexOf(2)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,2)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue2" /></li>
|
||
<li :class="colorIndexArr.indexOf(6)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,6)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue6" /></li>
|
||
<li :class="colorIndexArr.indexOf(10)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,10)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue10" /></li>
|
||
<li :class="colorIndexArr.indexOf(14)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,14)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue14" /></li>
|
||
</ul>
|
||
<ul class="table_box">
|
||
<li :class="colorIndexArr.indexOf(3)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,3)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue3" /></li>
|
||
<li :class="colorIndexArr.indexOf(7)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,7)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue7" /></li>
|
||
<li :class="colorIndexArr.indexOf(11)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,11)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue11" /></li>
|
||
<li :class="colorIndexArr.indexOf(15)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,15)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue15" /></li>
|
||
</ul>
|
||
<ul class="table_box">
|
||
<li :class="colorIndexArr.indexOf(4)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,4)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue4" /></li>
|
||
<li :class="colorIndexArr.indexOf(8)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,8)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue8" /></li>
|
||
<li :class="colorIndexArr.indexOf(12)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,12)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue12" /></li>
|
||
<li :class="colorIndexArr.indexOf(16)!=-1?'red':''"><input class="uni-input"
|
||
@input="(e)=>reboundValue(e,16)" disabled placeholder-style="font-size:24rpx"
|
||
placeholder="--" v-model="table.reboundValue16" /></li>
|
||
</ul>
|
||
</view>
|
||
<view class="measure_right">
|
||
<view style="margin-bottom: 20rpx;" v-if="surveyStrength">
|
||
<view>{{surveyStrength}}</view>
|
||
<view>标准强度差</view>
|
||
<!-- <view class="start_btn start_btn2" @click="send('24535253F8230D0A')">开始采集</view> -->
|
||
</view>
|
||
<view>
|
||
<view>{{form.reboundAvgValue}}</view>
|
||
<view>回弹平均值</view>
|
||
<!-- <view class="start_btn start_btn2" @click="send('24535253F8230D0A')">开始采集</view> -->
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
<view class="content" v-if="resultType == 2">
|
||
<view class="measure_data st_2">
|
||
<view class="title">·自测报告·</view>
|
||
<view class="measure_content">
|
||
<view class="form_box">
|
||
<view class="form_item">
|
||
<text>自测报告上传</text>
|
||
<view class="uni-form-input imgBox_wrap">
|
||
<view class="imgBox" v-show="imgFileList.length>0" v-for="(item,index) in imgFileList" :key="index">
|
||
<image :src="url_config+'image/'+item.url" class="img"
|
||
@click="previewImage(url_config+'image/'+item.url)"></image>
|
||
<!-- <text>{{item.name}}</text>
|
||
<text>{{item.createTime}}</text> -->
|
||
<uni-icons2 v-if="isEdit" @click="deleteImg(index)" class="deleteImg" type="clear" size="12" color="#F65352"></uni-icons2>
|
||
</view>
|
||
<view class="addImgBox" @click="uploadImg" v-if="isEdit">
|
||
<!-- <image src="/static/icon-add.png" class="icon-add"></image> -->
|
||
<uni-icons2 type="camera" size="20" color="#fff"></uni-icons2>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="flex form_item">
|
||
<text class="form_label">自测报告结果状态</text>
|
||
<radio-group class="radio_box" @change="radioChange">
|
||
<label class="radio"><radio :disabled="!isEdit" value="1" :checked="selfTestState == 1" />正常</label>
|
||
<label class="radio"><radio :disabled="!isEdit" value="2" :checked="selfTestState == 2"/>异常</label>
|
||
</radio-group>
|
||
</view>
|
||
</view>
|
||
<view class="start_wrap bottom_btn" v-if="isEdit">
|
||
<view class="start_btn" @click="submitForm">提交</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="test_result status" v-if="resultType == 1">
|
||
测量数据合格
|
||
</view>
|
||
<!-- <view class="test_result status2" v-if="infoType ==2">
|
||
测量数据不合格,请测量10个测区的指标进行判别
|
||
</view>
|
||
<view class="test_result status2" v-if="infoType == 3">
|
||
测量数据不合格,已生成报警记录
|
||
需后续在测量记录上传自测报告
|
||
</view> -->
|
||
<!-- <view class="start_wrap bottom_btn" >
|
||
<view class="start_btn" @click="addTest" v-if="resultType == 2">加测10个点位</view>
|
||
</view> -->
|
||
<!-- <view class="start_wrap bottom_btn" v-if="resultType!=1&&editId!=''">
|
||
<view class="start_btn" @click="measureAgainFn">重新测量构件</view>
|
||
</view> -->
|
||
<!-- <view class="start_wrap bottom_btn" v-if="resultType==1">
|
||
<view class="start_btn" @click="measureAgainFn">测量下一个构件</view>
|
||
</view> -->
|
||
<!-- <view class="start_wrap bottom_btn" v-if="resultType == 0 && !isShow10">
|
||
<view class="start_btn" @click="saveBtn">保存</view>
|
||
</view>
|
||
|
||
<view class="start_wrap bottom_btn" v-if="resultType == 0 && isShow10">
|
||
<view class="start_btn" @click="saveBtn2">保存</view>
|
||
</view> -->
|
||
|
||
<dialogs ref="dialogs">
|
||
|
||
<template v-slot:content>
|
||
<view class="dialogTitle">
|
||
测强结果
|
||
</view>
|
||
<view class="formBox2">
|
||
<view class="circleBox" v-if="!isoutline" :class="resultType==1?'':'red'">
|
||
<view class="num">
|
||
{{surveyStrength}}
|
||
</view>
|
||
<view class="txt">
|
||
{{resultType==1?'合格':'不合格'}}
|
||
</view>
|
||
</view>
|
||
<view v-else>当前处于离线状态,待网络通畅后再上传数据</view>
|
||
<view class="start_wrap">
|
||
<view class="start_btn" @click="measureAgainFn">测量下一个构件</view>
|
||
</view>
|
||
<view class="closeBtn" @click="backToHome">
|
||
返回到首页
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
</dialogs>
|
||
<dialogs ref="dialogs3">
|
||
|
||
<template v-slot:content>
|
||
<view class="dialogTitle">
|
||
提示
|
||
</view>
|
||
<view class="formBox2">
|
||
<view style="color: #FF5A5F;">
|
||
当前浇筑令已有3个以上构件测量不合格,需重新测量!
|
||
</view>
|
||
|
||
<view class="start_wrap">
|
||
<view class="start_btn" @click="restTest">重新测量</view>
|
||
</view>
|
||
<!-- <view class="closeBtn" @click="backToHome">
|
||
返回到首页
|
||
</view> -->
|
||
</view>
|
||
</template>
|
||
|
||
</dialogs>
|
||
<dialogs class="formDialog" ref="dialogs2">
|
||
<template v-slot:content>
|
||
<view class="dialog-title">
|
||
选择测区
|
||
</view>
|
||
<view class="dialog-content">
|
||
<movable-area class="movableBox" ref="movableBox">
|
||
<movable-view direction="all" @scale="onScale" @change="changePosFn" :x="changePos.x" :y="changePos.y" :friction="100" scale="true" scale-min="0.1" scale-max="10" :scale-value="changePos.scale">
|
||
<view class="drawing_wrap" @click="clickDraw2">
|
||
<!-- <img-cache class="drawing_bg" ref="drawing" :src="url_config+'image/'+imgUrl" :style="{width:imgOriginW+'px',height:imgOriginH+'px'}"></img-cache> -->
|
||
<!-- <image class="drawing_bg" ref="drawing" src="_doc/uniapp_save/16377541225310.png" :style="{width:imgOriginW+'px',height:imgOriginH+'px'}"></image> -->
|
||
<image class="drawing_bg" ref="drawing" :src="url_config+'image/'+imgUrl" :style="{width:imgOriginW+'px',height:imgOriginH+'px'}"></image>
|
||
<!-- @click.stop="goDetails(item.id)" -->
|
||
<view class="marker" v-for="(item,index) in markerList" :key="index" :style="{top:item.coordinateY+'px',left:item.coordinateX+'px'}" >
|
||
<!-- <view class="marker" v-for="(item,index) in markerList" :key="index" :style="{top:item.y+'px',left:item.x+'px'}" > -->
|
||
<image class="addrImg" v-if="item.resultType==1" src="../../../../static/betonManage/g-icon.png"></image>
|
||
<image class="addrImg" v-else src="/static/addr_red.png"></image>
|
||
</view>
|
||
</view>
|
||
</movable-view>
|
||
</movable-area>
|
||
</view>
|
||
<view class="dialog-btn">
|
||
<view class="cancle-btn" @click="cancleReply">取消</view>
|
||
<view class="primary-btn" @click="submitReply">提交</view>
|
||
</view>
|
||
</template>
|
||
</dialogs>
|
||
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import { jsonData } from './js/jsonData.js'
|
||
import { angleJsonData } from './js/angleJsonData.js'
|
||
import dialogs from "../../../../components/dialog/dialog.vue"
|
||
import {
|
||
writeBLE
|
||
} from '@/static/js/BLEConn.js';
|
||
let offsetHeight = 0;
|
||
let offsetWidth = 0;
|
||
export default {
|
||
components: {
|
||
dialogs
|
||
},
|
||
data() {
|
||
return {
|
||
changePos: {
|
||
"y": 0,
|
||
"scale": 0.5,
|
||
"x": 0
|
||
},
|
||
infoType: 0,
|
||
mapX: 0,
|
||
mapY: 0,
|
||
axisX: '',
|
||
axisY: '',
|
||
pageType: '',
|
||
markerList:[],
|
||
imgFileList: [],
|
||
activeTabIndex: 0,
|
||
showDetail: false,
|
||
jsonData: jsonData,
|
||
angleJsonData: angleJsonData,
|
||
surveyStrength: 0,
|
||
resultType: 0,//2不合格 1合格
|
||
buildName: '',
|
||
floorName: '',
|
||
typeIndex: 0,
|
||
isEdit: false,
|
||
optionList3:[{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: '普通设备',
|
||
value: 1
|
||
},{
|
||
name: '高强设备',
|
||
value: 2
|
||
}],
|
||
typeIndex2: 0,
|
||
optionList4:[{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: '水平构件',
|
||
value: 1
|
||
},{
|
||
name: '竖向构件',
|
||
value: 2
|
||
}],
|
||
optionList: [{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: '向上90°',
|
||
value: 90
|
||
},
|
||
{
|
||
name: '向上60°',
|
||
value: 60
|
||
},
|
||
{
|
||
name: '向上45°',
|
||
value: 45
|
||
},
|
||
{
|
||
name: '向上30°',
|
||
value: 30
|
||
},
|
||
{
|
||
name: '水平0°',
|
||
value: 0
|
||
},
|
||
{
|
||
name: '向下30°',
|
||
value: -30
|
||
},
|
||
{
|
||
name: '向下45°',
|
||
value: -45
|
||
},
|
||
{
|
||
name: '向下60°',
|
||
value: -60
|
||
},
|
||
{
|
||
name: '向下90°',
|
||
value: -90
|
||
},
|
||
],
|
||
optionList2: [
|
||
// {
|
||
// name: 'C7.5',
|
||
// value: 'C7.5'
|
||
// },
|
||
// {
|
||
// name: 'C10',
|
||
// value: 'C10'
|
||
// },
|
||
{
|
||
name: '请选择',
|
||
value: ''
|
||
},
|
||
{
|
||
name: 'C15',
|
||
value: 'C15'
|
||
},
|
||
{
|
||
name: 'C20',
|
||
value: 'C20'
|
||
},
|
||
{
|
||
name: 'C25',
|
||
value: 'C25'
|
||
},
|
||
{
|
||
name: 'C30',
|
||
value: 'C30'
|
||
},
|
||
{
|
||
name: 'C35',
|
||
value: 'C35'
|
||
},
|
||
{
|
||
name: 'C40',
|
||
value: 'C40'
|
||
},
|
||
{
|
||
name: 'C45',
|
||
value: 'C45'
|
||
}, {
|
||
name: 'C50',
|
||
value: 'C50'
|
||
}, {
|
||
name: 'C55',
|
||
value: 'C55'
|
||
}, {
|
||
name: 'C60',
|
||
value: 'C60'
|
||
},
|
||
],
|
||
concreteTypeList: [{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: '非泵送混凝土',
|
||
value: 1
|
||
},
|
||
{
|
||
name: '泵送混凝土',
|
||
value: 2
|
||
},
|
||
],
|
||
strengthIndex: 0,
|
||
concreteType: 0,
|
||
angleIndex: 0,
|
||
form: {
|
||
angle: 0,
|
||
floorId: '',
|
||
coordinateX: '',
|
||
coordinateY: '',
|
||
projectSn: '',
|
||
reboundAvgValue: 0,
|
||
carbonationDepthAvg: 0,
|
||
surveyType: 1,
|
||
measureDevType: 1,
|
||
designStrength: 'C15'
|
||
},
|
||
table: {
|
||
// reboundValue1: 0,
|
||
// reboundValue2: 1,
|
||
// reboundValue3: 2,
|
||
// reboundValue4: 7,
|
||
// reboundValue5: 10,
|
||
// reboundValue6: 5,
|
||
// reboundValue7: 6,
|
||
// reboundValue8: 7,
|
||
// reboundValue9: 5,
|
||
// reboundValue10: 11,
|
||
// reboundValue11: 4,
|
||
// reboundValue12: 0,
|
||
// reboundValue13: 0,
|
||
// reboundValue14: 1,
|
||
// reboundValue15: 2,
|
||
// reboundValue16: 3,
|
||
reboundValue1: '',
|
||
reboundValue2: '',
|
||
reboundValue3: '',
|
||
reboundValue4: '',
|
||
reboundValue5: '',
|
||
reboundValue6: '',
|
||
reboundValue7: '',
|
||
reboundValue8: '',
|
||
reboundValue9: '',
|
||
reboundValue10: '',
|
||
reboundValue11: '',
|
||
reboundValue12: '',
|
||
reboundValue13: '',
|
||
reboundValue14: '',
|
||
reboundValue15: '',
|
||
reboundValue16: '',
|
||
},
|
||
carbonation: {
|
||
carbonationDepth1: "",
|
||
carbonationDepth2: "",
|
||
carbonationDepth3: "",
|
||
},
|
||
dataIndex: 1,
|
||
colorIndexArr: [],
|
||
detailId:'',
|
||
editId:'',
|
||
isoutline: false,
|
||
isTest: false,
|
||
coordinateX: '',
|
||
coordinateY: '',
|
||
isCheck: false,
|
||
imgOriginW: 0,
|
||
imgOriginH: 0,
|
||
imgScale: 0.5,
|
||
movableBoxTop: 0,
|
||
imgUrl: '',
|
||
isShowPoint: false,
|
||
pouringId: '',
|
||
isShowReport: false,
|
||
isShow10: false,
|
||
tenTestArr: [],
|
||
surveyAreaId: '',
|
||
isChange: true,
|
||
selfTestState: '',
|
||
ids: ''
|
||
}
|
||
},
|
||
onLoad(option) {
|
||
console.log(jsonData)
|
||
console.log((option))
|
||
this.detailId = option.id
|
||
this.pouringId = option.pouringId
|
||
this.surveyAreaId = option.surveyAreaId
|
||
this.getImg()
|
||
this.loadData()
|
||
// this.buildName = option.buildName;
|
||
// this.floorName = option.floorName;
|
||
// this.form.floorId = option.floorId;
|
||
// this.form.coordinateX = option.coordinateX;
|
||
// this.form.coordinateY = option.coordinateY;
|
||
this.form.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||
this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId;
|
||
|
||
if(uni.getStorageSync('oldObj')){
|
||
// let obj = {
|
||
// typeIndex: that.typeIndex,
|
||
// angleIndex: that.angleIndex,
|
||
// concreteType: that.concreteType,
|
||
// strengthIndex: that.strengthIndex
|
||
// }
|
||
console.log(uni.getStorageSync('oldObj'))
|
||
let obj = uni.getStorageSync('oldObj')
|
||
this.form.measureDevType = obj.typeIndex
|
||
|
||
this.typeIndex = obj.typeIndex
|
||
this.angleIndex = obj.angleIndex,
|
||
this.concreteType = obj.concreteType,
|
||
this.strengthIndex = obj.strengthIndex
|
||
if(this.typeIndex == 2){
|
||
this.optionList2 = [{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: 'C20',
|
||
value: 'C20'
|
||
},
|
||
{
|
||
name: 'C25',
|
||
value: 'C25'
|
||
},
|
||
{
|
||
name: 'C30',
|
||
value: 'C30'
|
||
},
|
||
{
|
||
name: 'C35',
|
||
value: 'C35'
|
||
},
|
||
{
|
||
name: 'C40',
|
||
value: 'C40'
|
||
},
|
||
{
|
||
name: 'C45',
|
||
value: 'C45'
|
||
}, {
|
||
name: 'C50',
|
||
value: 'C50'
|
||
}, {
|
||
name: 'C55',
|
||
value: 'C55'
|
||
}, {
|
||
name: 'C60',
|
||
value: 'C60'
|
||
},{
|
||
name: 'C65',
|
||
value: 'C65'
|
||
},{
|
||
name: 'C70',
|
||
value: 'C70'
|
||
},{
|
||
name: 'C75',
|
||
value: 'C75'
|
||
},{
|
||
name: 'C80',
|
||
value: 'C80'
|
||
},{
|
||
name: 'C85',
|
||
value: 'C85'
|
||
},{
|
||
name: 'C90',
|
||
value: 'C90'
|
||
},{
|
||
name: 'C95',
|
||
value: 'C95'
|
||
},{
|
||
name: 'C100',
|
||
value: 'C100'
|
||
}]
|
||
this.form.angle = 0
|
||
} else {
|
||
this.form.angle = this.optionList[this.angleIndex].value;
|
||
}
|
||
this.form.surveyType = this.concreteTypeList[this.concreteType].value
|
||
this.form.designStrength = this.optionList2[this.strengthIndex].value
|
||
// this.pickerChangeType({detail: uni.getStorageSync('measureDevType') - 1})
|
||
} else {
|
||
this.typeIndex = 0
|
||
this.angleIndex = 0
|
||
this.concreteType = 0
|
||
this.strengthIndex = 0
|
||
|
||
}
|
||
// setTimeout(() => {
|
||
// this.calculate();
|
||
// this.carbonationFn();
|
||
// }, 2000)
|
||
console.log(option)
|
||
// if(option.isAdd == 'true'){
|
||
// this.startSpringback()
|
||
// }
|
||
// this.selectCount()
|
||
// if(option)
|
||
// this.startSpringback()
|
||
// if(option.id){
|
||
// this.detailId=option.id
|
||
// this.editId=option.id
|
||
// this.getDetails(option.id)
|
||
// }else{
|
||
// this.startSpringback()
|
||
// }
|
||
|
||
// this.measureBtn()
|
||
// if(option.isTest == 'true'){
|
||
// this.isTest = true
|
||
// }
|
||
|
||
},
|
||
mounted() {
|
||
// this.$refs.dialogs.showFn()
|
||
},
|
||
onUnload() {
|
||
// this.stopGetData()
|
||
},
|
||
methods: {
|
||
submitForm(){
|
||
console.log(this.imgFileList, this.selfTestState)
|
||
let data = {
|
||
id: this.ids,
|
||
selfTestReport: JSON.stringify(this.imgFileList),
|
||
selfTestState: this.selfTestState,
|
||
pouringId: this.pouringId,
|
||
projectSn: this.form.projectSn,
|
||
surveyAreaId: this.surveyAreaId
|
||
}
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundMainMeasureRecord/edit',
|
||
method: 'post',
|
||
data: data,
|
||
success: (res) => {
|
||
uni.showToast({
|
||
title:'提交成功!',
|
||
icon:"none"
|
||
})
|
||
uni.navigateBack({
|
||
|
||
})
|
||
},
|
||
})
|
||
},
|
||
loadData(){
|
||
let that = this
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundMainMeasureRecord/queryById',
|
||
method: 'post',
|
||
data: {mainId: this.detailId},
|
||
success: (res) => {
|
||
console.log(res.result)
|
||
|
||
let data = res.result
|
||
that.axisX = data.axisX
|
||
that.axisY = data.axisY
|
||
that.typeIndex = data.measureDevType
|
||
that.typeIndex2 = data.memberType
|
||
// strengthIndex
|
||
that.ids = data.mainId
|
||
that.form.coordinateX =data.coordinateX
|
||
that.form.coordinateY = data.coordinateY
|
||
that.mapX = (data.coordinateX*100/this.imgOriginW).toFixed(2)
|
||
that.mapY = (data.coordinateY*100/this.imgOriginH).toFixed(2)
|
||
that.isShowPoint = true
|
||
that.optionList2.forEach((item,index)=>{
|
||
if(item.value == data.designStrength){
|
||
that.strengthIndex = index
|
||
}
|
||
})
|
||
if(data.measureDevType == 1){
|
||
that.optionList.forEach((item,index)=>{
|
||
if(item.value == data.angle){
|
||
that.angleIndex = index
|
||
}
|
||
})
|
||
that.concreteType = data.surveyType
|
||
}
|
||
that.carbonation.carbonationDepth1 = data.carbonationDepth1
|
||
that.carbonation.carbonationDepth2 = data.carbonationDepth2
|
||
that.carbonation.carbonationDepth3 = data.carbonationDepth3
|
||
that.form.carbonationDepthAvg= data.carbonationDepthAvg
|
||
if(data.list){
|
||
that.tenTestArr = data.list
|
||
that.isShow10 = true
|
||
that.changeLevel(0)
|
||
} else {
|
||
that.table = {
|
||
reboundValue1: data.reboundValue1,
|
||
reboundValue2: data.reboundValue2,
|
||
reboundValue3: data.reboundValue3,
|
||
reboundValue4: data.reboundValue4,
|
||
reboundValue5: data.reboundValue5,
|
||
reboundValue6: data.reboundValue6,
|
||
reboundValue7: data.reboundValue7,
|
||
reboundValue8: data.reboundValue8,
|
||
reboundValue9: data.reboundValue9,
|
||
reboundValue10: data.reboundValue10,
|
||
reboundValue11: data.reboundValue11,
|
||
reboundValue12: data.reboundValue12,
|
||
reboundValue13: data.reboundValue13,
|
||
reboundValue14: data.reboundValue14,
|
||
reboundValue15: data.reboundValue15,
|
||
reboundValue16: data.reboundValue16,
|
||
}
|
||
that.form.reboundAvgValue = data.reboundAvgValue
|
||
that.surveyStrength = data.surveyStrength
|
||
}
|
||
|
||
that.resultType = data.resultType
|
||
that.selfTestState = data.selfTestState
|
||
that.pageType = data.selfTestState
|
||
if(that.userId == data.createUser){
|
||
if(!data.selfTestState && !data.selfTestReport){
|
||
that.isEdit = true
|
||
}
|
||
} else {
|
||
that.isEdit = false
|
||
}
|
||
if(data.selfTestReport){
|
||
that.imgFileList = JSON.parse(data.selfTestReport)
|
||
}
|
||
}
|
||
})
|
||
},
|
||
restTest(){
|
||
let that = this
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundMainMeasureRecord/updateRetestMeasure',
|
||
method: 'post',
|
||
data: {pouringId: this.pouringId},
|
||
success: (res) => {
|
||
console.log(res)
|
||
that.$refs.dialogs3.hideFn2()
|
||
// uni.navigateBack({
|
||
|
||
// })
|
||
that.measureAgainFn()
|
||
}
|
||
})
|
||
},
|
||
selectCount(){
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundMainMeasureRecord/selectMeasureResultCount',
|
||
method: 'post',
|
||
data: {pouringId: this.pouringId},
|
||
success: (res) => {
|
||
console.log(res)
|
||
if(res.result.unqualifiedNum > 2){
|
||
this.$refs.dialogs3.showFn()
|
||
}
|
||
}
|
||
})
|
||
},
|
||
saveBtn2(){
|
||
let flag = true
|
||
this.tenTestArr.forEach(item=>{
|
||
if(!item.surveyStrength){
|
||
flag = false
|
||
}
|
||
})
|
||
if(!flag){
|
||
uni.showToast({
|
||
title:'请测完十个测区',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
let data = {
|
||
pouringId: this.pouringId,
|
||
projectSn: JSON.parse(uni.getStorageSync('projectDetail')).projectSn,
|
||
surveyAreaId: this.surveyAreaId,
|
||
subitemList: this.tenTestArr
|
||
}
|
||
let that = this
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundMainMeasureRecord/saveSubitemMeasureData',
|
||
method: 'post',
|
||
data: data,
|
||
success: (res) => {
|
||
console.log(res)
|
||
that.surveyStrength = res.result.measureStrength
|
||
that.resultType = 1
|
||
if(res.result.measureResult == 2){
|
||
that.infoType = 3
|
||
} else {
|
||
that.infoType = 1
|
||
}
|
||
// that.resultType = res.result.measureResult
|
||
that.surveyAreaId = res.result.surveyAreaId
|
||
if(res.result.measureState == 1){
|
||
that.selectCount()
|
||
}
|
||
}
|
||
})
|
||
console.log(this.tenTestArr,data)
|
||
},
|
||
addTest(){
|
||
this.isShow10 = true
|
||
this.tenTestArr = []
|
||
this.resultType = 0
|
||
for(let i = 0; i < 10; i++){
|
||
this.tenTestArr.push({
|
||
reboundAvgValue: 0,
|
||
reboundNumber: i+Number(1),
|
||
reboundValue1: '',
|
||
reboundValue2: '',
|
||
reboundValue3: '',
|
||
reboundValue4: '',
|
||
reboundValue5: '',
|
||
reboundValue6: '',
|
||
reboundValue7: '',
|
||
reboundValue8: '',
|
||
reboundValue9: '',
|
||
reboundValue10: '',
|
||
reboundValue11: '',
|
||
reboundValue12: '',
|
||
reboundValue13: '',
|
||
reboundValue14: '',
|
||
reboundValue15: '',
|
||
reboundValue16: '',
|
||
surveyStrength: '',
|
||
})
|
||
}
|
||
this.changeLevel(0)
|
||
console.log(this.tenTestArr)
|
||
},
|
||
getImg(id){
|
||
let that = this
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundPouringOrder/queryById',
|
||
method: 'post',
|
||
data: {
|
||
id: this.pouringId
|
||
},
|
||
success: res => {
|
||
that.imgUrl = res.result.drawingUrl
|
||
let imageLength = res.result.imageLength; //获取图片高度
|
||
let imageWidth = res.result.imageWidth; //获取图片宽度
|
||
that.imgOriginW=imageWidth
|
||
that.imgOriginH=imageLength
|
||
console.log(res)
|
||
}
|
||
})
|
||
},
|
||
radioChange(e){
|
||
console.log(e)
|
||
this.selfTestState = Number(e.detail.value)
|
||
},
|
||
clickDraw2(e){
|
||
console.log(e)
|
||
console.log(e.detail.x,e.detail.y,this.imgScale,this.movableBoxTop)
|
||
// console.log(this.changePos.x,this.changePos.y)
|
||
|
||
this.coordinateX = ((e.detail.x-50-this.changePos.x))/this.imgScale
|
||
this.coordinateY = ((e.detail.y-485-this.changePos.y-this.movableBoxTop))/this.imgScale
|
||
|
||
console.log(this.coordinateX,this.coordinateY,this.imgScale)
|
||
// console.log(this.imgRatioX+'_'+this.imgRatioY)
|
||
// alert(this.coordinateX+'_'+this.coordinateY+'_'+this.changePos.scale+'_'+this.imgRatioX+'_'+this.imgRatioY)
|
||
|
||
if(this.markerList.length>0){
|
||
if(this.markerList[this.markerList.length-1].isNewPoint){
|
||
this.markerList.splice(this.markerList.length-1,1)
|
||
}
|
||
} else {
|
||
this.markerList.splice(0,1)
|
||
}
|
||
this.markerList.push({
|
||
coordinateX: this.coordinateX,
|
||
coordinateY: this.coordinateY,
|
||
resultType: 1,
|
||
isNewPoint: true
|
||
})
|
||
this.isCheck = true
|
||
},
|
||
changePosFn(e){
|
||
console.log('移动')
|
||
console.log(e.detail)
|
||
this.changePos.x = e.detail.x
|
||
this.changePos.y = e.detail.y
|
||
},
|
||
onScale(e){
|
||
console.log('缩放')
|
||
// this.changePos = e.detail
|
||
this.imgScale = e.detail.scale
|
||
this.changePos.x = this.changePos.x+e.detail.x
|
||
this.changePos.y = this.changePos.y+e.detail.y
|
||
// this.scale=e
|
||
console.log(e.detail)
|
||
},
|
||
submitReply(){
|
||
this.form.coordinateX = this.markerList[0].coordinateX
|
||
this.form.coordinateY = this.markerList[0].coordinateY
|
||
this.mapX = (this.markerList[0].coordinateX*100/this.imgOriginW).toFixed(2)
|
||
this.mapY = (this.markerList[0].coordinateY*100/this.imgOriginH).toFixed(2)
|
||
// console.log(this.markerList[0].coordinateX,this.markerList[0].coordinateY)
|
||
// console.log(this.imgOriginW,this.imgOriginH)
|
||
// console.log(this.mapX,this.mapY)
|
||
this.isShowPoint = true
|
||
this.$refs.dialogs2.hideFn2()
|
||
},
|
||
cancleReply(){
|
||
this.$refs.dialogs2.hideFn2()
|
||
},
|
||
showDialog(){
|
||
this.$refs.dialogs2.showFn()
|
||
let that = this
|
||
this.$nextTick(()=>{
|
||
uni.getSystemInfo({
|
||
success: function(res) { // res - 各种参数
|
||
let obj = uni.createSelectorQuery().select('.movableBox')
|
||
console.log(obj)
|
||
obj.boundingClientRect(function(data) { // data - 各种参数
|
||
|
||
console.log('各种参数')
|
||
console.log(JSON.stringify(data))
|
||
that.movableBoxTop = data.top;
|
||
}).exec()
|
||
}
|
||
})
|
||
})
|
||
},
|
||
previewImage(url) {
|
||
uni.previewImage({
|
||
urls: [url]
|
||
})
|
||
},
|
||
getNowTime() {
|
||
let dateTime
|
||
let yy = new Date().getFullYear()
|
||
let mm = new Date().getMonth() + 1
|
||
let dd = new Date().getDate()
|
||
let hh = new Date().getHours()
|
||
let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
|
||
:
|
||
new Date().getMinutes()
|
||
let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
|
||
:
|
||
new Date().getSeconds()
|
||
dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
|
||
console.log(dateTime)
|
||
return dateTime
|
||
},
|
||
uploadImg(){
|
||
var that = this
|
||
uni.chooseImage({
|
||
count: 5 - that.imgFileList.length,
|
||
success(res) {
|
||
const tempFilePaths = res.tempFilePaths;
|
||
uni.uploadFile({
|
||
url: that.url_config + 'upload/image', //仅为示例,非真实的接口地址
|
||
filePath: tempFilePaths[0],
|
||
name: 'files',
|
||
success: (uploadFileRes) => {
|
||
let data = {
|
||
name: res.tempFiles[0].name,
|
||
url: JSON.parse(uploadFileRes.data).data[0].imageUrl,
|
||
createTime: that.getNowTime()
|
||
};
|
||
that.imgFileList.push(data)
|
||
}
|
||
});
|
||
}
|
||
})
|
||
},
|
||
deleteImg(val) {
|
||
let that = this;
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '确定删除该附件吗?',
|
||
success: function(res) {
|
||
if (res.confirm) {
|
||
that.imgFileList.splice(val,1)
|
||
} else if (res.cancel) {
|
||
console.log('用户点击取消');
|
||
}
|
||
}
|
||
});
|
||
|
||
},
|
||
changeLevel(val){
|
||
console.log(this.isChange)
|
||
if(!this.isChange){
|
||
uni.showToast({
|
||
title:'请先测量完当前测区',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
this.activeTabIndex = val
|
||
this.stopGetData()
|
||
if(this.tenTestArr[val].surveyStrength != '') {
|
||
this.table = this.tenTestArr[val]
|
||
this.surveyStrength = this.tenTestArr[val].surveyStrength
|
||
this.form.reboundAvgValue = this.tenTestArr[val].reboundAvgValue
|
||
} else {
|
||
this.table = {
|
||
reboundValue1: '',
|
||
reboundValue2: '',
|
||
reboundValue3: '',
|
||
reboundValue4: '',
|
||
reboundValue5: '',
|
||
reboundValue6: '',
|
||
reboundValue7: '',
|
||
reboundValue8: '',
|
||
reboundValue9: '',
|
||
reboundValue10: '',
|
||
reboundValue11: '',
|
||
reboundValue12: '',
|
||
reboundValue13: '',
|
||
reboundValue14: '',
|
||
reboundValue15: '',
|
||
reboundValue16: '',
|
||
}
|
||
this.surveyStrength = ''
|
||
this.form.reboundAvgValue = 0
|
||
this.dataIndex = 1
|
||
this.startSpringback()
|
||
}
|
||
|
||
// this.tenTestArr.forEach(item=>{
|
||
// if((item.reboundNumber - 1) == val){
|
||
// this.table = item
|
||
// this.surveyStrength = item.surveyStrength
|
||
// }
|
||
// })
|
||
|
||
console.log(this.tenTestArr[val])
|
||
// if(!this.tenTestArr[val].surveyStrength){
|
||
// this.stopGetData()
|
||
// this.dataIndex = 1
|
||
// this.startSpringback()
|
||
// }
|
||
|
||
},
|
||
getResult(data){
|
||
console.log(data)
|
||
// let obj = {
|
||
// carbonationDepthAvg: 1,
|
||
// reboundAvgValue: 19.0,
|
||
// designStrength: 'C20',
|
||
// measureDevType: 1,
|
||
// surveyType: 2,
|
||
// angle: 0
|
||
// }
|
||
let obj = data
|
||
if(obj.measureDevType == 2){
|
||
let result = 0.0079*obj.reboundAvgValue*obj.reboundAvgValue+0.75*obj.reboundAvgValue-7.83
|
||
this.surveyStrength = parseInt(result*100)/100
|
||
// this.resultType = result >= obj.designStrength.split('C')[1] ? 1:2
|
||
this.editId=''
|
||
// this.$refs.dialogs.showFn()
|
||
console.log(result,obj.designStrength.split('C'))
|
||
}else if(obj.measureDevType == 1){
|
||
if(obj.angle != 0 && obj.reboundAvgValue >= 20 && obj.reboundAvgValue <= 50){
|
||
obj.reboundAvgValue = this.getReboundAvgValue(obj.angle,obj.reboundAvgValue)
|
||
}
|
||
// 非泵送混凝土
|
||
if(obj.surveyType == 1){
|
||
if(obj.reboundAvgValue < 20){
|
||
this.surveyStrength = '小于10'
|
||
// this.resultType = 2
|
||
// this.$refs.dialogs.showFn()
|
||
} else if (obj.reboundAvgValue > 60){
|
||
this.surveyStrength = '大于60'
|
||
// this.resultType = 1
|
||
// this.$refs.dialogs.showFn()
|
||
} else {
|
||
let arr = this.jsonData.RECORDS.filter(item=>item.type == 1)
|
||
let arr2 = arr.filter(item=>item.rebound_avg_value == obj.reboundAvgValue || (item.rebound_avg_value < obj.reboundAvgValue && item.rebound_avg_value+0.1 >= obj.reboundAvgValue) || (item.rebound_avg_value > obj.reboundAvgValue && item.rebound_avg_value-0.1 <= obj.reboundAvgValue))
|
||
// console.log(arr2)
|
||
if(arr2 && arr2.length == 1){
|
||
let val = this.getCarbonationKey(obj.carbonationDepthAvg,arr2[0])
|
||
console.log(val)
|
||
if(val == 'up'){
|
||
this.surveyStrength = '大于60'
|
||
// this.resultType = 1
|
||
// this.$refs.dialogs.showFn()
|
||
} else if(val == 'down'){
|
||
this.surveyStrength = '小于10'
|
||
// this.resultType = 2
|
||
// this.$refs.dialogs.showFn()
|
||
} else {
|
||
this.surveyStrength = val
|
||
// this.resultType = val >= obj.designStrength.split('C')[1] ? 1:2
|
||
// this.$refs.dialogs.showFn()
|
||
}
|
||
|
||
} else if(arr2.length == 2){
|
||
let x = this.getCarbonationKey(obj.carbonationDepthAvg,arr2[0])
|
||
let y = this.getCarbonationKey(obj.carbonationDepthAvg,arr2[1])
|
||
if(x == 'down' || y == 'down'){
|
||
this.surveyStrength = '小于10'
|
||
// this.resultType = 2
|
||
// this.$refs.dialogs.showFn()
|
||
} else if(x == 'up' || y == 'up'){
|
||
this.surveyStrength = '大于60'
|
||
// this.resultType = 1
|
||
// this.$refs.dialogs.showFn()
|
||
} else {
|
||
let val = (y-x)*(obj.reboundAvgValue-arr2[0].rebound_avg_value)/(arr2[1].rebound_avg_value - arr2[0].rebound_avg_value)+x
|
||
this.surveyStrength = val.toFixed(2)
|
||
// this.resultType = val >= obj.designStrength.split('C')[1] ? 1:2
|
||
// this.$refs.dialogs.showFn()
|
||
console.log(val.toFixed(2))
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
} else if(obj.surveyType == 2){
|
||
if(obj.reboundAvgValue < 18.6){
|
||
this.surveyStrength = '小于10'
|
||
// this.resultType = 2
|
||
// this.$refs.dialogs.showFn()
|
||
} else if (obj.reboundAvgValue > 52.8){
|
||
this.surveyStrength = '大于60'
|
||
// this.resultType = 1
|
||
// this.$refs.dialogs.showFn()
|
||
} else {
|
||
let arr = this.jsonData.RECORDS.filter(item=>item.type == 2)
|
||
let arr2 = arr.filter(item=>item.rebound_avg_value == obj.reboundAvgValue || (item.rebound_avg_value < obj.reboundAvgValue && item.rebound_avg_value+0.1 >= obj.reboundAvgValue) || (item.rebound_avg_value > obj.reboundAvgValue && item.rebound_avg_value-0.1 <= obj.reboundAvgValue))
|
||
console.log(arr2)
|
||
if(arr2 && arr2.length == 1){
|
||
let val = this.getCarbonationKey(obj.carbonationDepthAvg,arr2[0])
|
||
console.log(val)
|
||
if(val == 'up'){
|
||
this.surveyStrength = '大于60'
|
||
// this.resultType = 1
|
||
// this.$refs.dialogs.showFn()
|
||
} else if(val == 'down'){
|
||
this.surveyStrength = '小于10'
|
||
// this.resultType = 2
|
||
// this.$refs.dialogs.showFn()
|
||
} else {
|
||
this.surveyStrength = val
|
||
// this.resultType = val >= obj.designStrength.split('C')[1] ? 1:2
|
||
// this.$refs.dialogs.showFn()
|
||
}
|
||
|
||
} else if(arr2.length == 2){
|
||
let x = this.getCarbonationKey(obj.carbonationDepthAvg,arr2[0])
|
||
let y = this.getCarbonationKey(obj.carbonationDepthAvg,arr2[1])
|
||
if(x == 'down' || y == 'down'){
|
||
this.surveyStrength = '小于10'
|
||
// this.resultType = 2
|
||
// this.$refs.dialogs.showFn()
|
||
} else if(x == 'up' || y == 'up'){
|
||
this.surveyStrength = '大于60'
|
||
// this.resultType = 1
|
||
// this.$refs.dialogs.showFn()
|
||
} else {
|
||
let val = (y-x)*(obj.reboundAvgValue-arr2[0].rebound_avg_value)/(arr2[1].rebound_avg_value - arr2[0].rebound_avg_value)+x
|
||
this.surveyStrength = val.toFixed(2)
|
||
// this.resultType = val >= obj.designStrength.split('C')[1] ? 1:2
|
||
// this.$refs.dialogs.showFn()
|
||
console.log(val.toFixed(2))
|
||
}
|
||
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// console.log(data)
|
||
// console.log(jsonData)
|
||
},
|
||
// 获取计算值
|
||
getCarbonationKey(carbonationDepthAvg,val){
|
||
let result = ''
|
||
console.log(carbonationDepthAvg)
|
||
switch(carbonationDepthAvg) {
|
||
case 0:
|
||
result = val.carbonation_depth_zero == -2 ? 'up':val.carbonation_depth_zero == -1 ? 'down':val.carbonation_depth_zero
|
||
break;
|
||
case 0.5:
|
||
result = val.carbonation_depth_zero_point_five == -2 ? 'up':val.carbonation_depth_zero_point_five == -1 ? 'down':val.carbonation_depth_zero_point_five
|
||
break;
|
||
case 1:
|
||
result = val.carbonation_depth_one == -2 ? 'up':val.carbonation_depth_one == -1 ? 'down':val.carbonation_depth_one
|
||
break;
|
||
case 1.5:
|
||
result = val.carbonation_depth_one_point_five == -2 ? 'up':val.carbonation_depth_one_point_five == -1 ? 'down':val.carbonation_depth_one_point_five
|
||
break;
|
||
case 2:
|
||
result = val.carbonation_depth_two == -2 ? 'up':val.carbonation_depth_two == -1 ? 'down':val.carbonation_depth_two
|
||
break;
|
||
case 2.5:
|
||
result = val.carbonation_depth_two_point_five == -2 ? 'up':val.carbonation_depth_two_point_five == -1 ? 'down':val.carbonation_depth_two_point_five
|
||
break;
|
||
case 3:
|
||
return val.carbonation_depth_three == -2 ? 'up':val.carbonation_depth_three == -1 ? 'down':val.carbonation_depth_three
|
||
break;
|
||
case 3.5:
|
||
result = val.carbonation_depth_three_point_five == -2 ? 'up':val.carbonation_depth_three_point_five == -1 ? 'down':val.carbonation_depth_three_point_five
|
||
break;
|
||
case 4:
|
||
result = val.carbonation_depth_four == -2 ? 'up':carbonation_depth_four == -1 ? 'down':val.carbonation_depth_four
|
||
break;
|
||
case 4.5:
|
||
result = val.carbonation_depth_four_point_five == -2 ? 'up':val.carbonation_depth_four_point_five == -1 ? 'down':val.carbonation_depth_four_point_five
|
||
break;
|
||
case 5:
|
||
result = val.carbonation_depth_five == -2 ? 'up': val.carbonation_depth_five == -1 ? 'down': val.carbonation_depth_five
|
||
break;
|
||
case 5.5:
|
||
result = val.carbonation_depth_five_point_five == -2 ? 'up':val.carbonation_depth_five_point_five == -1 ? 'down':val.carbonation_depth_five_point_five
|
||
break;
|
||
case 6:
|
||
result = val.carbonation_depth_six == -2 ? 'up':val.carbonation_depth_six == -1 ? 'down':val.carbonation_depth_six
|
||
break;
|
||
default:
|
||
if(carbonationDepthAvg > 6){
|
||
result = val.carbonation_depth_six == -2 ? 'up':val.carbonation_depth_six == -1 ? 'down':val.carbonation_depth_six
|
||
} else {
|
||
result = ''
|
||
}
|
||
break;
|
||
}
|
||
return result
|
||
},
|
||
// 计算角度差值
|
||
getReboundAvgValue(angle,val){
|
||
console.log(angle,val,this.angleJsonData.RECORDS)
|
||
let result = ''
|
||
let a = this.angleJsonData.RECORDS.filter(item=>item.rebound_avg_value == val || (item.rebound_avg_value < val && item.rebound_avg_value+1 > val) || (item.rebound_avg_value > val && item.rebound_avg_value-1 < val))
|
||
if(a && a.length>0 && a.length == 1){
|
||
console.log(this.getVal(angle,a[0]))
|
||
result = Number(val)+Number(this.getVal(angle,a[0]))
|
||
console.log(result)
|
||
} else if(a && a.length>0 && a.length == 2){
|
||
let x = this.getVal(angle,a[0])
|
||
let y = this.getVal(angle,a[1])
|
||
console.log((y-x)*(val-val-1))
|
||
let b = (y-x)*(val-a[0].rebound_avg_value)/(a[1].rebound_avg_value - a[0].rebound_avg_value)+x
|
||
result = val+b
|
||
}
|
||
console.log(a,result)
|
||
return result
|
||
},
|
||
// 从Json中获取角度差值
|
||
getVal(angle,val){
|
||
console.log(angle,val)
|
||
let result = ''
|
||
switch(angle) {
|
||
case 90:
|
||
result = val.up90
|
||
break;
|
||
case 60:
|
||
result = val.up60
|
||
break;
|
||
case 45:
|
||
result = val.up45
|
||
break;
|
||
case 30:
|
||
result = val.up30
|
||
break;
|
||
case -30:
|
||
result = val.down30
|
||
break;
|
||
case -45:
|
||
result = val.down45
|
||
break;
|
||
case -60:
|
||
return val.down60
|
||
break;
|
||
case -90:
|
||
result = val.down90
|
||
break;
|
||
default:
|
||
result = ''
|
||
break;
|
||
}
|
||
return result
|
||
},
|
||
showInfo(){
|
||
// this.$refs.dialogs2.showFn()
|
||
},
|
||
saveBtn(){
|
||
this.measureBtn()
|
||
},
|
||
//开启回弹采集
|
||
startSpringback(){
|
||
this.send('24535253F8230D0A')
|
||
//监听接收数据事件
|
||
uni.$on('recvEvent', this.reviceDevData)
|
||
},
|
||
//重新测量
|
||
measureAgainFn(){
|
||
this.table={
|
||
reboundValue1: '',
|
||
reboundValue2: '',
|
||
reboundValue3: '',
|
||
reboundValue4: '',
|
||
reboundValue5: '',
|
||
reboundValue6: '',
|
||
reboundValue7: '',
|
||
reboundValue8: '',
|
||
reboundValue9: '',
|
||
reboundValue10: '',
|
||
reboundValue11: '',
|
||
reboundValue12: '',
|
||
reboundValue13: '',
|
||
reboundValue14: '',
|
||
reboundValue15: '',
|
||
reboundValue16: '',
|
||
}
|
||
this.colorIndexArr=[]
|
||
this.form.coordinateX = ''
|
||
this.form.coordinateY = ''
|
||
this.isShowPoint = false
|
||
this.markerList = []
|
||
this.axisX = ''
|
||
this.axisY = ''
|
||
this.mapX=0
|
||
this.mapY= 0
|
||
this.dataIndex = 1
|
||
this.infoType = 0
|
||
this.tenTestArr = []
|
||
this.isShow10 = false
|
||
this.form.reboundAvgValue = 0;
|
||
this.resultType = 0
|
||
this.surveyStrength = ''
|
||
// if(this.detailId!=''){
|
||
// this.editId=this.detailId
|
||
// this.detailId=''
|
||
// }
|
||
this.stopGetData()
|
||
this.startSpringback()
|
||
},
|
||
getDetails(id){
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundSurveyArea/queryById',
|
||
method: 'post',
|
||
data: {
|
||
id: id
|
||
},
|
||
success: res => {
|
||
this.form=res.result
|
||
this.table=res.result
|
||
this.optionList2.forEach((element,index)=>{
|
||
if(this.form.designStrength==element.name){
|
||
this.strengthIndex=index;
|
||
}
|
||
})
|
||
this.optionList.forEach((element,index)=>{
|
||
if(this.form.angle==element.value){
|
||
this.angleIndex=index;
|
||
}
|
||
})
|
||
this.concreteType=this.form.surveyType-1
|
||
}
|
||
})
|
||
},
|
||
//停止回弹
|
||
stopGetData(){
|
||
console.log('停止回弹')
|
||
uni.$off('recvEvent');
|
||
this.send('24455253EA230D0A')
|
||
},
|
||
backToHome() {
|
||
uni.navigateBack({
|
||
delta: 3
|
||
})
|
||
},
|
||
// 4. 发送数据
|
||
async send(data) {
|
||
//格式检查
|
||
// if (!this.sendData) {
|
||
// uni.showToast({
|
||
// title: '数据不能为空'
|
||
// })
|
||
// return
|
||
// }
|
||
// uni.showLoading({
|
||
// title: '正在发送数据',
|
||
// icon: "loading",
|
||
// mask: true
|
||
// })
|
||
await writeBLE(data).then(res => {
|
||
console.log('发送数据成功')
|
||
// uni.hideLoading()
|
||
// uni.showToast({
|
||
// title: '发送成功:' + res
|
||
// })
|
||
}).catch(err => {
|
||
// uni.hideLoading()
|
||
uni.showToast({
|
||
title: '开启采集数据失败',
|
||
icon: 'none'
|
||
})
|
||
})
|
||
},
|
||
reviceDevData(e) {
|
||
console.log('设备返回的数据')
|
||
console.log(e)
|
||
var arr = e.split('"')
|
||
this.isChange = false
|
||
console.log(this.isChange)
|
||
if (arr[0] == '$RRD') {
|
||
console.log(this.table,this.dataIndex)
|
||
this.table['reboundValue' + this.dataIndex] = arr[1]
|
||
this.calculate()
|
||
this.dataIndex++
|
||
// if (this.dataIndex > 16) {
|
||
if (this.dataIndex == 17) {
|
||
this.isChange = true
|
||
this.stopGetData()
|
||
if(this.isShow10){
|
||
if(this.typeIndex == 2){
|
||
this.carbonation.carbonationDepth1 = 0
|
||
this.carbonation.carbonationDepth2 = 0
|
||
this.carbonation.carbonationDepth3 = 0
|
||
this.form.carbonationDepthAvg = 0
|
||
this.form.surveyType = 3
|
||
this.form.angle = 0
|
||
}
|
||
let data = Object.assign(this.form, this.carbonation, this.table);
|
||
this.getResult(data)
|
||
this.tenTestArr[this.activeTabIndex] = Object.assign(this.tenTestArr[this.activeTabIndex],this.table);
|
||
this.tenTestArr[this.activeTabIndex].surveyStrength = this.surveyStrength
|
||
this.tenTestArr[this.activeTabIndex].reboundAvgValue = this.form.reboundAvgValue
|
||
}
|
||
|
||
// this.measureBtn()
|
||
}
|
||
}
|
||
|
||
},
|
||
//新增
|
||
measureBtn() {
|
||
let state1 = true
|
||
let state2 = true
|
||
if(this.axisX == ''){
|
||
uni.showToast({
|
||
title:'请输入轴线X',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
if(this.axisY == ''){
|
||
uni.showToast({
|
||
title:'请输入轴线Y',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
Object.values(this.table).map((item, index) => {
|
||
if (item == "" || item == null) {
|
||
state2 = false
|
||
}
|
||
})
|
||
|
||
|
||
if(this.typeIndex != 2){
|
||
Object.values(this.carbonation).map((item,index)=>{
|
||
console.log(item)
|
||
if(item == "" || item == null){
|
||
state1 = false
|
||
}
|
||
})
|
||
console.log(this.carbonation,state1)
|
||
}
|
||
|
||
if(!this.typeIndex){
|
||
uni.showToast({
|
||
title:'请选择测量类型',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
if(!this.angleIndex && this.typeIndex != 2){
|
||
uni.showToast({
|
||
title:'请选择测量角度',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
if(!this.concreteType && this.typeIndex != 2){
|
||
uni.showToast({
|
||
title:'请选择混凝土类型',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
if(!this.strengthIndex){
|
||
uni.showToast({
|
||
title:'请选择设计强度',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
if(!state1){
|
||
uni.showToast({
|
||
title:'请输入碳化深度',
|
||
icon:"none"
|
||
})
|
||
return
|
||
}
|
||
if (!state2) {
|
||
uni.showToast({
|
||
title: '请采集混凝土强度',
|
||
icon: "none"
|
||
})
|
||
return
|
||
}
|
||
|
||
if(this.typeIndex == 2){
|
||
this.carbonation.carbonationDepth1 = 0
|
||
this.carbonation.carbonationDepth2 = 0
|
||
this.carbonation.carbonationDepth3 = 0
|
||
this.form.carbonationDepthAvg = 0
|
||
this.form.surveyType = 3
|
||
this.form.angle = 0
|
||
}
|
||
let data = Object.assign(this.form, this.carbonation, this.table); //合并对象
|
||
// console.log('保存的数据')
|
||
// console.log(JSON.stringify(data))
|
||
// console.log(JSON.stringify(this.table))
|
||
if(data.coordinateX == '' || data.coordinateY == ''){
|
||
uni.showToast({
|
||
title: '请选择测点',
|
||
icon: "none"
|
||
})
|
||
return
|
||
}
|
||
let url = 'xmgl/massReboundSurveyArea/add'
|
||
if(this.editId){
|
||
url='xmgl/massReboundSurveyArea/saveAnewSurvey'
|
||
data.id=this.editId
|
||
}
|
||
let that = this
|
||
// console.log(data)
|
||
if(this.isTest){
|
||
data.opType = 1
|
||
} else {
|
||
data.opType = 0
|
||
}
|
||
console.log(this.optionList4, this.typeIndex2)
|
||
data.memberType = this.optionList4[this.typeIndex2].value
|
||
data.pouringId = this.pouringId
|
||
if(!data.memberType){
|
||
uni.showToast({
|
||
title: '请选择构件类型',
|
||
icon: "none"
|
||
})
|
||
return
|
||
}
|
||
data.axisX = this.axisX
|
||
data.axisY = this.axisY
|
||
console.log(data)
|
||
|
||
this.sendRequest({
|
||
url: 'xmgl/massReboundMainMeasureRecord/add',
|
||
method: 'post',
|
||
data: data,
|
||
success: (res) => {
|
||
console.log(res)
|
||
that.surveyStrength = res.result.measureStrength
|
||
that.resultType = res.result.measureResult
|
||
if(res.result.measureResult == 2){
|
||
that.infoType = 2
|
||
} else {
|
||
that.infoType = 1
|
||
}
|
||
that.surveyAreaId = res.result.surveyAreaId
|
||
if(res.result.measureState == 1){
|
||
that.selectCount()
|
||
}
|
||
}
|
||
})
|
||
// uni.getNetworkType({
|
||
// success: function (res) {
|
||
// // console.log(res.networkType);
|
||
// if(res.networkType == 'none'){
|
||
// if(that.isTest){
|
||
// that.getResult(data)
|
||
// } else {
|
||
// let outLineData = []
|
||
// if(uni.getStorageSync('outLineData')){
|
||
// outLineData = JSON.parse(uni.getStorageSync('outLineData'))
|
||
// }
|
||
// outLineData.push(data)
|
||
// let obj = {
|
||
// typeIndex: that.typeIndex,
|
||
// angleIndex: that.angleIndex,
|
||
// concreteType: that.concreteType,
|
||
// strengthIndex: that.strengthIndex
|
||
// }
|
||
// // uni.setStorageSync('oldObj', obj);
|
||
// // uni.setStorageSync('outLineData', JSON.stringify(outLineData));
|
||
// console.log(outLineData)
|
||
// that.isoutline = true
|
||
// that.$refs.dialogs.showFn()
|
||
// }
|
||
// } else{
|
||
// that.isoutline = false
|
||
// that.sendRequest({
|
||
// url: url,
|
||
// method: 'post',
|
||
// data: data,
|
||
// success: (res) => {
|
||
// if (res.code == 200) {
|
||
// console.log('res.result', res.result)
|
||
// that.surveyStrength = res.result.surveyStrength
|
||
// that.resultType = res.result.resultType
|
||
// that.editId=res.result.id
|
||
// let obj = {
|
||
// typeIndex: that.typeIndex,
|
||
// angleIndex: that.angleIndex,
|
||
// concreteType: that.concreteType,
|
||
// strengthIndex: that.strengthIndex
|
||
// }
|
||
// uni.setStorageSync('oldObj', obj);
|
||
// uni.showToast({
|
||
// title: '保存成功'
|
||
// })
|
||
// that.$refs.dialogs.showFn()
|
||
// }
|
||
// }
|
||
// })
|
||
// }
|
||
// }
|
||
// });
|
||
|
||
|
||
},
|
||
backFn() {
|
||
uni.navigateBack({});
|
||
},
|
||
pickerChangeType2(e){
|
||
this.typeIndex2 = e.detail.value;
|
||
},
|
||
// 选择测量类型
|
||
pickerChangeType(e){
|
||
console.log(e)
|
||
this.typeIndex = e.detail.value;
|
||
this.form.measureDevType = this.optionList3[this.typeIndex].value;
|
||
if(this.typeIndex == 2){
|
||
this.strengthIndex = 0
|
||
this.form.designStrength = ''
|
||
this.optionList2 = [{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: 'C20',
|
||
value: 'C20'
|
||
},
|
||
{
|
||
name: 'C25',
|
||
value: 'C25'
|
||
},
|
||
{
|
||
name: 'C30',
|
||
value: 'C30'
|
||
},
|
||
{
|
||
name: 'C35',
|
||
value: 'C35'
|
||
},
|
||
{
|
||
name: 'C40',
|
||
value: 'C40'
|
||
},
|
||
{
|
||
name: 'C45',
|
||
value: 'C45'
|
||
}, {
|
||
name: 'C50',
|
||
value: 'C50'
|
||
}, {
|
||
name: 'C55',
|
||
value: 'C55'
|
||
}, {
|
||
name: 'C60',
|
||
value: 'C60'
|
||
},{
|
||
name: 'C65',
|
||
value: 'C65'
|
||
},{
|
||
name: 'C70',
|
||
value: 'C70'
|
||
},{
|
||
name: 'C75',
|
||
value: 'C75'
|
||
},{
|
||
name: 'C80',
|
||
value: 'C80'
|
||
},{
|
||
name: 'C85',
|
||
value: 'C85'
|
||
},{
|
||
name: 'C90',
|
||
value: 'C90'
|
||
},{
|
||
name: 'C95',
|
||
value: 'C95'
|
||
},{
|
||
name: 'C100',
|
||
value: 'C100'
|
||
}]
|
||
this.angleIndex = 0
|
||
this.concreteType = 0
|
||
} else {
|
||
this.angleIndex = 0
|
||
this.strengthIndex = 0
|
||
this.form.designStrength = ''
|
||
this.concreteType = 0
|
||
this.optionList2 = [{
|
||
name: '请选择',
|
||
value: ''
|
||
},{
|
||
name: 'C15',
|
||
value: 'C15'
|
||
},
|
||
{
|
||
name: 'C20',
|
||
value: 'C20'
|
||
},
|
||
{
|
||
name: 'C25',
|
||
value: 'C25'
|
||
},
|
||
{
|
||
name: 'C30',
|
||
value: 'C30'
|
||
},
|
||
{
|
||
name: 'C35',
|
||
value: 'C35'
|
||
},
|
||
{
|
||
name: 'C40',
|
||
value: 'C40'
|
||
},
|
||
{
|
||
name: 'C45',
|
||
value: 'C45'
|
||
}, {
|
||
name: 'C50',
|
||
value: 'C50'
|
||
}, {
|
||
name: 'C55',
|
||
value: 'C55'
|
||
}, {
|
||
name: 'C60',
|
||
value: 'C60'
|
||
},]
|
||
}
|
||
|
||
},
|
||
//选择测量角度
|
||
pickerChangeFloor(e) {
|
||
this.angleIndex = e.detail.value;
|
||
this.form.angle = this.optionList[this.angleIndex].value;
|
||
this.table = {
|
||
reboundValue1: '',
|
||
reboundValue2: '',
|
||
reboundValue3: '',
|
||
reboundValue4: '',
|
||
reboundValue5: '',
|
||
reboundValue6: '',
|
||
reboundValue7: '',
|
||
reboundValue8: '',
|
||
reboundValue9: '',
|
||
reboundValue10: '',
|
||
reboundValue11: '',
|
||
reboundValue12: '',
|
||
reboundValue13: '',
|
||
reboundValue14: '',
|
||
reboundValue15: '',
|
||
reboundValue16: '',
|
||
};
|
||
this.form.reboundAvgValue = 0;
|
||
this.dataIndex = 1
|
||
this.minData = 0
|
||
this.minDataLength = 0
|
||
this.maxData = 0
|
||
this.maxDataLength = 0
|
||
},
|
||
pickerChangeStrength(e) {
|
||
this.strengthIndex = e.detail.value;
|
||
this.form.designStrength = this.optionList2[this.strengthIndex].value
|
||
},
|
||
//混凝土类型
|
||
pickerChangeConcreteType(e) {
|
||
this.concreteType = e.detail.value;
|
||
this.form.surveyType = this.concreteTypeList[this.concreteType].value
|
||
},
|
||
|
||
//输入测量混凝土硬化
|
||
reboundValue(e, type) {
|
||
|
||
// let state = true;
|
||
// this.table['reboundValue' + type] = e.detail.value;
|
||
// Object.values(this.table).map((item, index) => {
|
||
// if (item == "" || item == null) {
|
||
// state = false
|
||
// }
|
||
// })
|
||
// if (state) {
|
||
// // console.log(e,type)
|
||
// this.calculate();
|
||
// }
|
||
},
|
||
//输入碳化深度
|
||
changeCarbonation(e, type) {
|
||
this.carbonation['carbonationDepth' + type] = e.detail.value;
|
||
let state = true;
|
||
Object.values(this.carbonation).map((item, index) => {
|
||
if (item == "" || item == null) {
|
||
state = false
|
||
}
|
||
})
|
||
if (state) {
|
||
this.carbonationFn();
|
||
}
|
||
},
|
||
compare(property) {
|
||
return function(a, b) {
|
||
var value1 = a[property];
|
||
var value2 = b[property];
|
||
return value1 - value2;
|
||
}
|
||
},
|
||
//计算混凝土强度 平均值
|
||
calculate() {
|
||
var noSortData = []; //未排序的
|
||
var hasSortData = []; //已排序的
|
||
this.colorIndexArr=[]
|
||
|
||
Object.values(this.table).map((value, index) => {
|
||
noSortData.push({
|
||
value: Number(value),
|
||
index: index + 1
|
||
})
|
||
})
|
||
console.log('noSortData', noSortData)
|
||
hasSortData = noSortData.sort(this.compare('value'))
|
||
|
||
console.log('hasSortData', hasSortData)
|
||
|
||
let arr = [];
|
||
hasSortData.forEach((item, index) => {
|
||
if (index > 2 && index < 13) {
|
||
arr.push(item.value)
|
||
} else {
|
||
this.colorIndexArr.push(item.index)
|
||
}
|
||
})
|
||
console.log('this.colorIndexArr', this.colorIndexArr)
|
||
var len = arr.length;
|
||
var sum = 0;
|
||
//利用for循环遍历数组的内容,利用sum累加求和
|
||
for (var i = 0; i < len; i++) {
|
||
sum += arr[i];
|
||
}
|
||
console.log(this.dataIndex)
|
||
// this.form.reboundAvgValue = (sum / len).toFixed(1);
|
||
// this.form.reboundAvgValue = (sum / this.dataIndex).toFixed(1);
|
||
if(this.table.reboundValue16){
|
||
|
||
this.form.reboundAvgValue = (sum / 10).toFixed(1);
|
||
console.log(this.table,sum,this.form.reboundAvgValue)
|
||
}
|
||
|
||
},
|
||
//碳化 计算平均值
|
||
carbonationFn() {
|
||
var newData = [];
|
||
Object.values(this.carbonation).sort().map(value => {
|
||
newData.push(Number(value))
|
||
})
|
||
console.log(newData)
|
||
var len = newData.length;
|
||
var sum = 0;
|
||
//利用for循环遍历数组的内容,利用sum累加求和
|
||
for (var i = 0; i < len; i++) {
|
||
sum += newData[i];
|
||
}
|
||
|
||
// 小于0.25修约为0,大于等于0.25小于0.75的修约为0.5,大于等于0.75的修约为1,是按数值修约标准来的。
|
||
let val = (sum / len).toFixed(2);
|
||
let newVal = Number(val.split('.')[0]);
|
||
let decimals = Number(val.split('.')[1]);
|
||
let num = 0;
|
||
if (decimals < 25) {
|
||
num = 0;
|
||
} else if (decimals >= 25 && decimals < 75) {
|
||
num = 50
|
||
} else if (decimals >= 75) {
|
||
num = 1
|
||
}
|
||
if (num == 1) {
|
||
this.form.carbonationDepthAvg = Number((newVal + num).toFixed(2));
|
||
} else {
|
||
this.form.carbonationDepthAvg = Number(newVal + '.' + num);
|
||
}
|
||
},
|
||
|
||
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.flex {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-around;
|
||
}
|
||
|
||
.flex2 {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.flex3 {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.flex4 {
|
||
display: flex;
|
||
}
|
||
|
||
.title {
|
||
text-align: center;
|
||
line-height: 42rpx;
|
||
font-size: 30rpx;
|
||
letter-spacing: 1.4px;
|
||
color: #2A2B5B;
|
||
opacity: 0.4;
|
||
}
|
||
|
||
.content {
|
||
padding: 20rpx 30rpx 40rpx;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
}
|
||
|
||
.top_wrap {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 20rpx 26rpx;
|
||
background-color: #FBFBFF;
|
||
box-shadow: 0 4rpx 20rpx 0 rgba(212, 220, 236, 0.65);
|
||
border-radius: 16rpx;
|
||
}
|
||
|
||
.storey_info {
|
||
padding: 20rpx 0;
|
||
font-family: PingFangSC-Regular, PingFang SC;
|
||
font-weight: 400;
|
||
color: #372D66;
|
||
font-size: 30rpx;
|
||
line-height: 42rpx;
|
||
letter-spacing: 6rpx;
|
||
/* border-bottom: 1px solid rgba(42,43,91,0.2); */
|
||
}
|
||
|
||
.soil_value {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
flex-wrap: wrap-reverse;
|
||
margin: 10rpx 0;
|
||
color: rgba(55, 45, 102, 0.6);
|
||
}
|
||
|
||
.soil_type {
|
||
font-size: 26rpx;
|
||
line-height: 28rpx;
|
||
}
|
||
|
||
.soil_type text {
|
||
color: #2A2B5B;
|
||
}
|
||
|
||
.measure_data {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 40rpx 30rpx 20rpx;
|
||
margin-top: 30rpx;
|
||
background-color: rgba(251, 251, 255, 1);
|
||
box-shadow: 0 4rpx 20rpx 0 rgba(212, 220, 236, 0.65);
|
||
border-radius: 16rpx;
|
||
}
|
||
|
||
.st_2{
|
||
margin-top: 0;
|
||
background: #fff;
|
||
}
|
||
.measure_content {
|
||
width: 100%;
|
||
margin: 25px 0;
|
||
}
|
||
|
||
.measure_title {
|
||
text-align: center;
|
||
margin: 20rpx 0 30rpx;
|
||
font-size: 30rpx;
|
||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||
font-weight: 500;
|
||
color: #2A2B5B;
|
||
letter-spacing: 1px;
|
||
}
|
||
|
||
|
||
.measure_right {
|
||
width: 38%;
|
||
text-align: center;
|
||
font-size: 32rpx;
|
||
font-family: PingFangSC-Regular, PingFang SC;
|
||
font-weight: 500;
|
||
color: #372D66;
|
||
}
|
||
|
||
.measure_btn {
|
||
padding: 8px 60rpx;
|
||
box-sizing: border-box;
|
||
border-radius: 60rpx;
|
||
color: #fff;
|
||
background-color: #4181FE;
|
||
}
|
||
|
||
.depth_wrap {
|
||
width: 100%;
|
||
border: 1px solid rgba(42, 43, 91, 0.2);
|
||
margin-bottom: 60rpx;
|
||
}
|
||
|
||
.depth {
|
||
width: 25%;
|
||
text-align: center;
|
||
line-height: 70rpx;
|
||
border-right: 1px solid rgba(42, 43, 91, 0.2);
|
||
}
|
||
|
||
.depth:last-child {
|
||
border-right: none;
|
||
font-size: 30rpx;
|
||
font-family: PingFangSC-Regular, PingFang SC;
|
||
font-weight: 400;
|
||
color: #372D66;
|
||
}
|
||
|
||
.table {
|
||
border: 1px solid rgba(42, 43, 91, 0.2);
|
||
box-sizing: border-box;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.table_box {
|
||
width: 85rpx;
|
||
list-style: none;
|
||
border-right: 1px solid rgba(42, 43, 91, 0.2);
|
||
padding: 0;
|
||
font-size: 30rpx;
|
||
color: #372D66;
|
||
font-family: PingFangSC-Regular, PingFang SC;
|
||
}
|
||
|
||
.table_box:last-child {
|
||
border-right: none
|
||
}
|
||
|
||
.table_box li {
|
||
width: 100%;
|
||
height: 73rpx;
|
||
text-align: center;
|
||
line-height: 73rpx;
|
||
border-bottom: solid 1px rgba(42, 43, 91, 0.2);
|
||
}
|
||
|
||
.table_box li:last-child {
|
||
border-bottom: none
|
||
}
|
||
|
||
.uni-input {
|
||
height: 100%;
|
||
padding: 0 10rpx;
|
||
}
|
||
|
||
.start_wrap {
|
||
margin: 60rpx 0 20rpx;
|
||
}
|
||
|
||
.start_btn {
|
||
text-align: center;
|
||
|
||
line-height: 70rpx;
|
||
width: 60%;
|
||
margin: 0 auto;
|
||
/* background-color: #4181FE; */
|
||
color: #4181FE;
|
||
border-radius: 70rpx;
|
||
border: 1px solid #4181FE;
|
||
|
||
}
|
||
|
||
.start_btn:active {
|
||
background-color: rgba(65, 129, 254, 0.2);
|
||
color: #fff;
|
||
}
|
||
|
||
.start_btn2 {
|
||
font-size: 26rpx;
|
||
line-height: 60rpx;
|
||
margin-top: 20rpx;
|
||
}
|
||
|
||
.picker {
|
||
border: 1px solid rgba(42, 43, 91, 0.3);
|
||
border-radius: 14rpx;
|
||
padding: 6px 30rpx;
|
||
font-size: 30rpx;
|
||
// border-radius: 60rpx;
|
||
width: 60%;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
margin-left: 20rpx;
|
||
}
|
||
|
||
.arrowdown {
|
||
position: absolute;
|
||
top: 20rpx;
|
||
right: 30rpx;
|
||
color: #262D47;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.closeBtn {
|
||
font-size: 30rpx;
|
||
color: rgba(42, 43, 91, 0.5);
|
||
padding: 20rpx 0;
|
||
text-align: center;
|
||
}
|
||
|
||
.yellow {
|
||
color: #ecd312;
|
||
}
|
||
|
||
.red {
|
||
color: #ec3c12;
|
||
}
|
||
|
||
.circleBox {
|
||
width: 100px;
|
||
height: 100px;
|
||
border-radius: 50%;
|
||
border: 4px solid #1dc349;
|
||
text-align: center;
|
||
margin: 0 auto;
|
||
color: #1dc349;
|
||
|
||
&.red {
|
||
border-color: #f95858;
|
||
color: #f95858;
|
||
}
|
||
|
||
.num {
|
||
font-size: 60rpx;
|
||
margin-top: 20rpx;
|
||
}
|
||
}
|
||
|
||
.dialogTitle {
|
||
padding: 20rpx 30rpx 0;
|
||
}
|
||
.info_detail{
|
||
position: absolute;
|
||
left: 0rpx;
|
||
top:-130rpx;
|
||
width: 570rpx;
|
||
padding: 20rpx;
|
||
padding-top: 30rpx;
|
||
word-break: break-all;
|
||
background: #fff;
|
||
background: #eee;
|
||
border: 1px solid #EEEEEE;
|
||
font-size: 24rpx;
|
||
border-radius: 6px;
|
||
.close_btn{
|
||
position: absolute;
|
||
right: 6rpx;
|
||
top: 6rpx;
|
||
}
|
||
}
|
||
|
||
.info_detail:after{
|
||
content: '';
|
||
width: 0;
|
||
height: 0;
|
||
border-left: 20rpx solid transparent;
|
||
border-right: 20rpx solid transparent;
|
||
border-top: 20rpx solid #eee;
|
||
position: absolute;
|
||
bottom: -20rpx;
|
||
left: 115rpx;
|
||
}
|
||
.num_input{
|
||
width: 100rpx;
|
||
height: 60rpx;
|
||
border: 1px solid rgba(42, 43, 91, 0.3);
|
||
border-radius: 14rpx;
|
||
text-align: center;
|
||
padding: 0 10rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
.bottom_btn{
|
||
margin-top: 0;
|
||
margin-bottom: 42rpx;
|
||
}
|
||
.qualitySpringback{
|
||
padding-bottom: 20rpx;
|
||
padding-top: 44px;
|
||
}
|
||
.fixedHeader{
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
z-index: 2;
|
||
}
|
||
.test_result{
|
||
text-align: center;
|
||
width: 90%;
|
||
margin: 0 auto;
|
||
margin-bottom: 42rpx;
|
||
// height: 80rpx;
|
||
line-height: 40rpx;
|
||
font-size: 28rpx;
|
||
padding: 22rpx 84rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
.status{
|
||
color: #44D7B5;
|
||
background: linear-gradient(to left,rgba(#44D7B5,0),rgba(#44D7B5,0.15),rgba(#44D7B5,0));
|
||
}
|
||
.status2{
|
||
color: #F65352;
|
||
background: linear-gradient(to left,rgba(#F65352,0),rgba(#F65352,0.15),rgba(#F65352,0));
|
||
}
|
||
:deep(.uni-scroll-view::-webkit-scrollbar ){
|
||
width: 0;
|
||
height: 0;
|
||
background-color: transparent;
|
||
display: none;
|
||
}
|
||
.scroll-view_H{
|
||
width: 100%;
|
||
padding: 0;
|
||
margin-bottom: 20rpx;
|
||
.scroll-view-item_H{
|
||
width: 24%;
|
||
font-size: 30rpx;
|
||
text-align: left;
|
||
padding: 10rpx 0;
|
||
}
|
||
.active{
|
||
.name{
|
||
border: 0;
|
||
font-weight: normal;
|
||
color: #488DEC;
|
||
}
|
||
}
|
||
}
|
||
|
||
.imgBox_wrap {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
// margin-top: 20rpx;
|
||
padding-top: 26rpx;
|
||
width: 75%;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.imgBox {
|
||
width: 80rpx;
|
||
height: 80rpx;
|
||
display: inline-flex;
|
||
position: relative;
|
||
margin-right: 30rpx;
|
||
margin-bottom: 32rpx;
|
||
|
||
.img {
|
||
width: 100%;
|
||
height: 100%;
|
||
// border-radius: 20rpx;
|
||
}
|
||
|
||
.deleteImg {
|
||
position: absolute;
|
||
right: -12rpx;
|
||
top: -16rpx;
|
||
}
|
||
|
||
}
|
||
|
||
.addImgBox {
|
||
// border: 1px dashed rgba(42, 43, 91, 0.1);
|
||
background-color: #D8D8D8;
|
||
width: 80rpx;
|
||
height: 80rpx;
|
||
border-radius: 6rpx;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
// border-radius: 20rpx;
|
||
font-size: 24rpx;
|
||
|
||
.icon-add {
|
||
width: 20rpx;
|
||
height: 20rpx;
|
||
color: #999;
|
||
}
|
||
}
|
||
.form_item{
|
||
margin-bottom: 52rpx;
|
||
justify-content: flex-start;
|
||
font-size: 28rpx;
|
||
.form_label{
|
||
width: 300rpx;
|
||
}
|
||
.radio_box{
|
||
display: flex;
|
||
.radio {
|
||
margin-right: 40rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
:deep(.uni-radio-input){
|
||
width: 28rpx;
|
||
height: 28rpx;
|
||
font-size: 28rpx;
|
||
}
|
||
:deep(.uni-radio-input-checked::before){
|
||
font-size: 28rpx;
|
||
}
|
||
}
|
||
}
|
||
.input_box{
|
||
width: 100%;
|
||
border: 1px solid rgba(42, 43, 91, 0.3);
|
||
border-radius: 14rpx;
|
||
padding: 12rpx 30rpx;
|
||
height: 60rpx;
|
||
font-size: 30rpx;
|
||
width: 60%;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
margin-left: 20rpx;
|
||
}
|
||
.img_box{
|
||
width: 266rpx;
|
||
height: 192rpx;
|
||
border: 1px solid rgba(42, 43, 91, 0.3);
|
||
border-radius: 6rpx;
|
||
position: relative;
|
||
.img_bg{
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
.point{
|
||
position: absolute;
|
||
uni-image{
|
||
width: 38rpx;
|
||
height: 46rpx;
|
||
}
|
||
}
|
||
}
|
||
.f-start{
|
||
align-items: flex-start;
|
||
}
|
||
.formDialog{
|
||
:deep(.dialogContent){
|
||
width: 90%;
|
||
top: auto;
|
||
left: 50%;
|
||
bottom: 30rpx;
|
||
transform: translate(-50%, 0);
|
||
border-radius: 30rpx;
|
||
}
|
||
.dialog-title{
|
||
padding: 0 40rpx ;
|
||
font-weight: 600;
|
||
padding-top: 40rpx;
|
||
margin-bottom: 16rpx;
|
||
font-size: 36rpx;
|
||
}
|
||
.dialog-content{
|
||
padding: 0 40rpx;
|
||
.form-label{
|
||
color: rgba(#30305F,0.8);
|
||
font-size: 28rpx;
|
||
margin-bottom: 16rpx;
|
||
}
|
||
.detail_info{
|
||
color: rgba(#30305F,0.8);
|
||
font-size: 28rpx;
|
||
// height: 200rpx;
|
||
}
|
||
.form-textarea{
|
||
flex: 1;
|
||
width: 100%;
|
||
height: 154rpx;
|
||
border: 1px solid #D6D6DF;
|
||
// overflow: auto;
|
||
background: rgba(#9EA3AF,0.05);
|
||
border-radius: 18rpx;
|
||
margin-bottom: 84rpx;
|
||
:deep(uni-textarea){
|
||
width: 100%;
|
||
height: 100%;
|
||
padding: 26rpx 28rpx;
|
||
box-sizing: border-box;
|
||
font-size: 28rpx;
|
||
.uni-textarea-compute{
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: auto;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.dialog-btn{
|
||
width: 100%;
|
||
height: 94rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding-bottom: 60rpx;
|
||
.cancle-btn{
|
||
height: 100rpx;
|
||
width: 236rpx;
|
||
text-align: center;
|
||
line-height: 100rpx;
|
||
background: #fff;
|
||
color: rgba(#30305F, 0.6);
|
||
border-radius: 50rpx;
|
||
border: 1rpx solid rgba(#30305F,0.3);
|
||
margin-right: 112rpx;
|
||
}
|
||
.primary-btn{
|
||
height: 100rpx;
|
||
width: 236rpx;
|
||
text-align: center;
|
||
line-height: 100rpx;
|
||
border-radius: 50rpx;
|
||
color: #fff;
|
||
background: #5181F6;
|
||
}
|
||
}
|
||
}
|
||
movable-view {
|
||
width: auto;
|
||
height: auto;
|
||
position: relative;
|
||
}
|
||
|
||
.movableBox {
|
||
height: 500rpx;
|
||
width: 100%;
|
||
/* position: fixed; */
|
||
overflow: hidden;
|
||
margin-bottom: 40rpx;
|
||
border-radius: 6rpx;
|
||
border: 0.10rpx solid rgba(42, 43, 91, 0.34);
|
||
}
|
||
.addrImg {
|
||
width: 36px;
|
||
height: 46px;
|
||
}
|
||
.drawing_wrap {
|
||
position: relative;
|
||
}
|
||
|
||
.drawing_bg {
|
||
/* width: 100%; */
|
||
background-repeat: no-repeat;
|
||
background-position: center;
|
||
background-size: 100% auto;
|
||
/* height: 0px; */
|
||
|
||
|
||
}
|
||
|
||
.drawing_bg2 {
|
||
padding-top: 65%;
|
||
}
|
||
|
||
.drawing_wrap .marker {
|
||
position: absolute;
|
||
/* background-color: red; */
|
||
width: 36rpx;
|
||
height: 40rpx;
|
||
z-index: 111;
|
||
}
|
||
</style>
|