temp
This commit is contained in:
parent
9dbfdc6c71
commit
3afffc67ec
@ -2,15 +2,7 @@
|
||||
<view class="warp">
|
||||
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="天然气计算工具集" />
|
||||
|
||||
<view class="content">
|
||||
<ad-rewarded-video adpid="1507000689" :loadnext="true" v-slot:default="{loading, error}" @load="onadload"
|
||||
@close="onadclose" @error="onaderror">
|
||||
<button :disabled="loading" :loading="loading">显示广告</button>
|
||||
<view v-if="error">{{error}}</view>
|
||||
</ad-rewarded-video>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 流量计算 -->
|
||||
<view class="section-box">
|
||||
|
@ -3,12 +3,12 @@
|
||||
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar left-icon="left" left-text="返回"
|
||||
title="差压式流量计算" @clickLeft="back" />
|
||||
<uni-card>
|
||||
<!-- test -->
|
||||
<!-- test -->
|
||||
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
|
||||
activeColor="#4cd964"></uni-segmented-control>
|
||||
</uni-card>
|
||||
|
||||
<view class="content">
|
||||
|
||||
<view class="content">
|
||||
<view v-show="current === 0">
|
||||
<yjly-ngtools-meterPar :meter-type="0" v-model="meterPar"
|
||||
@calEnable="meterEnable"></yjly-ngtools-meterPar>
|
||||
@ -20,6 +20,7 @@
|
||||
<yjly-ngtools-meterResult :formData="meterResult"></yjly-ngtools-meterResult>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -31,8 +32,8 @@
|
||||
current: 0,
|
||||
strNG: "",
|
||||
meterPar: [],
|
||||
|
||||
</view>meterResult: {
|
||||
|
||||
meterResult: {
|
||||
"dCd": "",
|
||||
"dCdCalMethod": "",
|
||||
"dMeterFactor": "",
|
||||
@ -67,7 +68,7 @@
|
||||
|
||||
},
|
||||
NGFlag: false,
|
||||
meterFlag: false,
|
||||
meterFlag: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -135,14 +136,14 @@
|
||||
|
||||
|
||||
onClickItem(e) {
|
||||
this.ssss="";
|
||||
this.ssss = "";
|
||||
if (this.current != e.currentIndex) {
|
||||
this.current = e.currentIndex;
|
||||
this.$nextTick(()=>{
|
||||
if (this.current==2) {
|
||||
this.$nextTick(() => {
|
||||
if (this.current == 2) {
|
||||
this.cal();
|
||||
}
|
||||
},500)
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
back() {
|
||||
@ -219,15 +220,15 @@
|
||||
|
||||
console.log(NG_par);
|
||||
var that = this;
|
||||
var url="";
|
||||
// #ifdef MP-WEIXIN
|
||||
url="https://ngtools.cn:8443";
|
||||
// #endif
|
||||
var url = "";
|
||||
// #ifdef MP-WEIXIN
|
||||
url = "https://ngtools.cn:8443";
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
url = "/api"
|
||||
// #endif
|
||||
console.log(url)
|
||||
|
||||
|
||||
uni.request({
|
||||
url: url + "/KBFlowcal",
|
||||
type: 'GET',
|
||||
@ -240,9 +241,10 @@
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
timeout: 1000, //10秒超时
|
||||
success: function(res) {
|
||||
console.log(res)
|
||||
var data = JSON.stringify(res.data.message).toString().replace('[', '').replace(']','').split(',');
|
||||
success: function(res) {
|
||||
console.log(res)
|
||||
var data = JSON.stringify(res.data.message).toString().replace('[', '').replace(']',
|
||||
'').split(',');
|
||||
that.meterResult.dCd = data[45].substring(0, data[45].indexOf(".") + 6);
|
||||
that.meterResult.dE = data[46].substring(0, data[46].indexOf(".") + 6);
|
||||
that.meterResult.dFG = data[47].substring(0, data[47].indexOf(".") + 6);
|
||||
@ -266,7 +268,7 @@
|
||||
that.current = 2;
|
||||
console.log(that.meterResult)
|
||||
},
|
||||
fail: function(res) {
|
||||
fail: function(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user