|
@@ -28,13 +28,18 @@
|
|
|
</view>
|
|
|
<!-- 识别列表 -->
|
|
|
<view class="sb-list" v-if="indexList.length != 0">
|
|
|
- <u-list>
|
|
|
+ <u-list :preLoadScreen="0.5">
|
|
|
<u-list-item v-for="(item, index) in indexList" :key="index">
|
|
|
- <u-cell :title="item['检查地点']">
|
|
|
+ <u-cell :title="item['检查地点']" center>
|
|
|
<view slot="value" class="u-slot-title">
|
|
|
<u-tag text="选择" plain size="mini" type="warning" @click="choiceSb(item)">
|
|
|
</u-tag>
|
|
|
</view>
|
|
|
+ <view slot="label" style="font-size: 12px;" class="u-slot-contents">
|
|
|
+ <text>班次:{{ item['班次'] }}</text>
|
|
|
+ <text style="margin:0px 10px">日期:{{ item['日期'] }}</text>
|
|
|
+ <text>检查时间:{{ item['检查时间'] }}</text>
|
|
|
+ </view>
|
|
|
</u-cell>
|
|
|
</u-list-item>
|
|
|
</u-list>
|
|
@@ -285,10 +290,10 @@ export default {
|
|
|
//获取图片识别数据
|
|
|
getGasIdentify() {
|
|
|
let that = this
|
|
|
- let apiUrl = configService.apiUrl;
|
|
|
console.log(that.imageSrcList[0])
|
|
|
+ let apiUrlImg = `${configService.apiUrl.substring(0, configService.apiUrl.lastIndexOf(':'))}:6006`
|
|
|
uni.uploadFile({
|
|
|
- url: `${apiUrl}/gasIdentify`,
|
|
|
+ url: `${apiUrlImg}/gasIdentify`,
|
|
|
filePath: that.imageSrcList[0].path,
|
|
|
name: 'img',
|
|
|
formData: {
|
|
@@ -296,7 +301,8 @@ export default {
|
|
|
},
|
|
|
success: (res) => {
|
|
|
if (res) {
|
|
|
- that.indexList = res.data.dara
|
|
|
+ console.log(JSON.parse(res.data), '识别数据------')
|
|
|
+ that.indexList = JSON.parse(res.data).data || []
|
|
|
uni.showToast({
|
|
|
title: '识别成功!',
|
|
|
icon: 'none' // 可选图标,'success', 'loading', 'none'
|
|
@@ -1578,26 +1584,29 @@ export default {
|
|
|
//瓦斯新增
|
|
|
getAdd() {
|
|
|
let that = this
|
|
|
- that.isStatus = 'add'
|
|
|
- that.isShowAdd = true
|
|
|
- that.formState = {
|
|
|
- id: '',
|
|
|
- bc: that.indexParam['班次'],
|
|
|
- count: '',
|
|
|
- jcdd: '',
|
|
|
- jcy: that.indexParam['检查人'],
|
|
|
- time: '',
|
|
|
- ch4: that.indexParam['CH4%'],
|
|
|
- co2: that.indexParam['CO2% '],
|
|
|
- co: that.indexParam['CO(ppm)'],
|
|
|
- o2: that.indexParam['O2%'],
|
|
|
- jw: '',
|
|
|
- gw: '',
|
|
|
- bxy: '',
|
|
|
- tbrq: '',
|
|
|
- temp: that.indexParam['温度(℃)'],
|
|
|
- mcgzm: '',
|
|
|
+ if (JSON.stringify(that.indexParam) != '{}') {
|
|
|
+ that.isStatus = 'add'
|
|
|
+ that.isShowAdd = true
|
|
|
+ that.formState = {
|
|
|
+ id: '',
|
|
|
+ bc: that.indexParam['班次'],
|
|
|
+ count: '',
|
|
|
+ jcdd: '',
|
|
|
+ jcy: that.indexParam['检查人'],
|
|
|
+ time: '',
|
|
|
+ ch4: that.indexParam['CH4%'],
|
|
|
+ co2: that.indexParam['CO2%'],
|
|
|
+ co: that.indexParam['CO(ppm)'],
|
|
|
+ o2: that.indexParam['O2%'],
|
|
|
+ jw: '',
|
|
|
+ gw: '',
|
|
|
+ bxy: '',
|
|
|
+ tbrq: '',
|
|
|
+ temp: that.indexParam['温度(℃)'],
|
|
|
+ mcgzm: '',
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
getAddSave() {
|
|
|
let that = this
|
|
@@ -2228,6 +2237,8 @@ export default {
|
|
|
this.isShowAdd = false
|
|
|
this.isDisabled = false
|
|
|
this.saveShowList = {}
|
|
|
+ this.indexList = []
|
|
|
+ this.indexParam = {}
|
|
|
this.clearData()
|
|
|
},
|
|
|
|