|
@@ -41,11 +41,11 @@
|
|
|
</uni-grid-item>
|
|
|
<!-- </view> -->
|
|
|
<uni-grid-item>
|
|
|
- <view class="grid-item-box" @click="photoUpload(item)">
|
|
|
+ <view class="grid-item-box" @click="photoUpload(item,index)">
|
|
|
<image :src="photograph" class="tupian"></image>
|
|
|
-
|
|
|
+
|
|
|
<!-- -->
|
|
|
- <uni-load-more v-if="loading" status="loading" :content-text="contentText"/>
|
|
|
+ <uni-load-more v-if="item.loading" status="loading" :content-text="contentText" />
|
|
|
<text v-else class="text">拍照上传</text>
|
|
|
</view>
|
|
|
</uni-grid-item>
|
|
@@ -169,7 +169,7 @@
|
|
|
<u-modal :show="show3" :title="title" content='未完成有问题检查项拍照' @confirm="show3= false"></u-modal>
|
|
|
<u-modal :show="show4" :title="title" content='未对消防设备进行扫码检查' @confirm="show4= false"></u-modal>
|
|
|
<!-- 弹出层 -->
|
|
|
- <u-popup :show="maShow" :round="10" @close="maShow=false">
|
|
|
+ <u-popup :show="maShow" :round="10">
|
|
|
<view v-if="insTypeData!=''">
|
|
|
<view class="springFarm" v-for="(item,index) in insTypeData" :key="index">
|
|
|
<view class="show-title">设备名称:{{item.fpdName}}</view>
|
|
@@ -246,7 +246,18 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- 暂无数据
|
|
|
+ <view class="" style="text-align: center;margin-top: 30px;">
|
|
|
+ 暂无数据
|
|
|
+ </view>
|
|
|
+ <view style="width: 60%;position: absolute;left:150rpx;;bottom:60rpx;z-index: 9999;">
|
|
|
+ <div class="btnList" v-if="tableData.length!=0">
|
|
|
+ <u-button shape="circle" type="primary" color="#4CB2B6" text="保存"
|
|
|
+ customStyle="margin-right:20%" @click="checkPopupConfirm(item.id)">
|
|
|
+ </u-button>
|
|
|
+ <u-button shape="circle" type="primary" color="#4CB2B6" text="取消" @click="checkPopupCancel">
|
|
|
+ </u-button>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
<!-- <u-modal :show="show5" title="隐患描述" @confirm="descriptFpd" @cancel="show5 = false">
|
|
@@ -412,6 +423,9 @@
|
|
|
// ----隐患
|
|
|
checkboxConfirm2(index) {
|
|
|
this.tableData[index].description = this.checkedListDanger.toString()
|
|
|
+ if (this.tableData[index].description.startsWith(',')) {
|
|
|
+ this.tableData[index].description = this.tableData[index].description.slice(1);
|
|
|
+ }
|
|
|
this.tableData[index].showDanger = false
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
@@ -467,6 +481,9 @@
|
|
|
},
|
|
|
checkboxConfirm3(index) {
|
|
|
this.description2 = this.checkedPopupDanger.toString()
|
|
|
+ if (this.description2.startsWith(',')) {
|
|
|
+ this.description2=this.description2.slice(1);
|
|
|
+ }
|
|
|
this.showPopupDanger = false
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
@@ -576,7 +593,7 @@
|
|
|
closeImage(item, val, k) { //删除图片
|
|
|
if (item.inspType == 'fpd') {
|
|
|
this.insTypeData[k].attUrl.splice(val, 1)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.tableData[k].attUrl.splice(val, 1)
|
|
|
}
|
|
|
|
|
@@ -733,6 +750,7 @@
|
|
|
this.tableData = response.data.records
|
|
|
this.tableData.map(i => {
|
|
|
i.inspId = i.id
|
|
|
+ i.loading=false
|
|
|
// i.inspName = i.insp_name
|
|
|
// i.inspCode = i.insp_code
|
|
|
i.isreport = 0
|
|
@@ -928,6 +946,7 @@
|
|
|
k['broadId'] = that.formData.broadId
|
|
|
if (k.id == fpdId) {
|
|
|
k['dangerDescribe'] = this.description2
|
|
|
+ this.description2 = ''
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -976,7 +995,7 @@
|
|
|
},
|
|
|
|
|
|
//拍照上传
|
|
|
- photoUpload(val) {
|
|
|
+ photoUpload(val,index) {
|
|
|
let pictures = [];
|
|
|
var that = this;
|
|
|
uni.chooseImage({
|
|
@@ -985,7 +1004,8 @@
|
|
|
sizeType: ['original', 'compressed'],
|
|
|
// sourceType: ['album','camera'], //打开系统相册
|
|
|
success(res) {
|
|
|
- that.loading = true
|
|
|
+ that.tableData[index].loading=true
|
|
|
+ // that.loading = true
|
|
|
if (Array.isArray(res.tempFilePaths)) { //从相册选择有三张的情况
|
|
|
// if (res.tempFilePaths.length === 3) {
|
|
|
// pictures.length = 0
|
|
@@ -1018,12 +1038,12 @@
|
|
|
getAccessToken(),
|
|
|
}, //请求token
|
|
|
success: (res) => {
|
|
|
- that.loading = false
|
|
|
+ // that.loading = false
|
|
|
+ that.tableData[index].loading=false
|
|
|
let imgUrl = JSON.parse(res
|
|
|
.data)
|
|
|
// that.imageList.push(imgUrl.data)
|
|
|
- if (val
|
|
|
- .inspType != 'fpd') {
|
|
|
+ if (val.inspType != 'fpd') {
|
|
|
that.tableData.map((i,
|
|
|
index) => {
|
|
|
if (val.id == i
|
|
@@ -1053,7 +1073,8 @@
|
|
|
// // 返回的url
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
- that.loading = false
|
|
|
+ // that.loading = false
|
|
|
+ that.tableData[index].loading=false
|
|
|
this.$modal.msg(err.msg)
|
|
|
}
|
|
|
})
|
|
@@ -1202,7 +1223,7 @@
|
|
|
.uni-grid-wraps {
|
|
|
margin-left: 60rpx;
|
|
|
// margin-bottom: 40rpx;
|
|
|
- margin-bottom: 480rpx !important;
|
|
|
+ margin-bottom: 480rpx !important;
|
|
|
}
|
|
|
|
|
|
/deep/.u-slide-up-enter-active[data-v-39e33bf2],
|