提交 f0f46db5 authored 作者: 刘守彩's avatar 刘守彩

fix: bugs

上级 f1457a26
......@@ -71,8 +71,9 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
......@@ -31,7 +31,7 @@
type="text"
placeholder="请输入"
maxlength="3"
/>{{ item.inspectionResult === 1?item.unit:"" }}
/>{{ item.inspectionResult === 1 ? item.unit : "" }}
</view>
<template v-if="item.inspectionResult === 1">
<view v-if="'conclusion' in item" class="form-item">
......@@ -79,8 +79,9 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
......@@ -69,7 +69,9 @@
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
......@@ -79,8 +79,9 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
export default {
methods: {
setNormal() {
this.itemData.detail.forEach((item) => {
item.inspectionResult = 0;
});
console.log("this.isQt", this.isQt);
if (!this.isQt) {
this.itemData.status = 1;
}
},
},
};
......@@ -43,7 +43,9 @@
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......@@ -66,6 +68,7 @@ export default {
},
data() {
return {
isQt: true,
currentIndex: 0, // 当前操作的索引
photos: [],
// 父组件传递的数据
......
......@@ -100,8 +100,9 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
......@@ -67,11 +67,13 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
components: {
customPopup,
},
mixins: [mixin],
props: {
// 父组件传递的巡检状态
status: {
......@@ -302,6 +304,11 @@ export default {
return { statusLabel: "未巡检", status: 0 };
}
},
setNormal() {
this.itemData.detail.forEach((item) => {
item.inspectionResult = 0;
});
},
},
};
</script>
......
......@@ -31,36 +31,43 @@
type="text"
placeholder="请输入"
maxlength="3"
/>{{ item.inspectionResult === 1?item.unit:"" }}
/>{{ item.inspectionResult === 1 ? item.unit : "" }}
</view>
<template v-if="item.inspectionResult === 1">
<view v-if="'conclusion' in item" class="form-item">
<text class="form-label"><text class="required">*</text>情况摘要</text>
<text class="conclusion" @click="showPopup(index)">{{
item.conclusion || "请输入情况摘要"
}}</text>
</view>
<view class="form-item" v-if="'photos' in item">
<text class="form-label"><text class="required">*</text>现场照片</text>
<view class="photo-box">
<view class="photo-container">
<view
v-for="(photo, itemIndex) in item && item.photos"
:key="itemIndex"
class="photo-item"
>
<image :src="photo" class="photo"></image>
<text class="delete-photo" @click="deletePhoto(index, itemIndex)"
>×</text
<view v-if="'conclusion' in item" class="form-item">
<text class="form-label"
><text class="required">*</text>情况摘要</text
>
<text class="conclusion" @click="showPopup(index)">{{
item.conclusion || "请输入情况摘要"
}}</text>
</view>
<view class="form-item" v-if="'photos' in item">
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<view class="photo-box">
<view class="photo-container">
<view
v-for="(photo, itemIndex) in item && item.photos"
:key="itemIndex"
class="photo-item"
>
<image :src="photo" class="photo"></image>
<text
class="delete-photo"
@click="deletePhoto(index, itemIndex)"
>×</text
>
</view>
<view @click="takePhoto(index)" class="photo-btn"> + </view>
</view>
<view @click="takePhoto(index)" class="photo-btn"> + </view>
<view class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view>
<view class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view>
</view></template></view
</view></template
></view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -72,8 +79,9 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
......@@ -68,8 +68,9 @@
<script>
import customPopup from "./customPopup.vue";
import _ from "lodash";
import mixin from "./mixin";
export default {
mixins: [mixin],
components: {
customPopup,
},
......
......@@ -37,9 +37,13 @@
<button v-if="!isSign" class="record-button" @click="toSign">
巡检人签字
</button>
<button v-if="!isSign" class="record-button" @click="toSign">
重签
</button>
<div v-else>
<image
style="border: 1px solid red"
:src="detailsInfo.signImg"
></image>
<button class="record-button" @click="toSign">重签</button>
</div>
</view>
</view>
</view>
......@@ -324,8 +328,12 @@ export default {
this.isSubmit = this.detailsInfo.isSubmit;
this.isSign = this.detailsInfo.isSign;
this.detailsItem = detailsInfo.originData[0].details;
console.log(12121)
if (this.detailsItem.afxt && this.detailsItem.afxt.detail && this.detailsItem.afxt.detail[2].inspectionResult === 1) {
console.log(12121);
if (
this.detailsItem.afxt &&
this.detailsItem.afxt.detail &&
this.detailsItem.afxt.detail[2].inspectionResult === 1
) {
this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(
0,
3
......@@ -404,7 +412,7 @@ export default {
},
// 跳转到具体的机房
toShaftInspection(name, jfType, value) {
console.log("name, 跳转到具体的机房, value",name, jfType, value)
console.log("name, 跳转到具体的机房, value", name, jfType, value);
uni.navigateTo({
url: `/pages/inspectionContent/inspectionContentNew?value=${value}&inspectionCode=${this.inspectionCode}&jfType=${jfType}&location=${name}&uid=${this.uid}&backValue=${this.backValue}`,
});
......@@ -455,6 +463,7 @@ export default {
handlePopupConfirm(summary) {
this.detailsInfo.isSign = this.isSign = true; // 回显到文字显示区域
this.detailsInfo.signImg = summary; // 回显到文字显示区域
console.log("summary", summary);
this.submit("sign", this.detailsInfo.signImg);
},
// 提交
......
......@@ -44,11 +44,7 @@
</view>
<view class="tab-content">
<view class="jfImg">
<image
class="weitu"
:src="imgSrc"
mode=""
></image
<image class="weitu" :src="imgSrc" mode=""></image
></view>
<view class="kong"></view>
<!-- 操作区域 -->
......@@ -135,6 +131,7 @@
>
下一项
</view>
<view class="action-btn" @click="normal"> 一键正常 </view>
</view>
<startDialog
ref="startDialog"
......@@ -218,7 +215,7 @@ export default {
value: "1",
paramsObjFirst: {},
all_data: [],
imgSrc:""
imgSrc: "",
};
},
computed: {
......@@ -243,7 +240,7 @@ export default {
this.dictValue = options.dictValue;
this.inspectionCode = options.inspectionCode;
this.backValue = options.backValue || "";
this.imgSrc = `../../static/img/jf/jf${this.value}.png`
this.imgSrc = `../../static/img/jf/jf${this.value}.png`;
this.tabs =
this.jfType === "2" || this.jfType === "3"
? this.deepClone(tabsInfo2)
......@@ -490,7 +487,9 @@ export default {
let logContent = "";
console.log("all_data", this.all_data);
if (this.uid) {
const index = this.all_data.findIndex((element) => element.uid == this.uid);
const index = this.all_data.findIndex(
(element) => element.uid == this.uid
);
params.uid = this.uid;
this.all_data[index] = params;
......@@ -659,6 +658,23 @@ export default {
const isValid = validateData(data);
return isValid;
},
normal() {
this.tabs.forEach((item) => {
console.log("item.value", item.value);
let refName = item.value;
// 通过 this.$refs[refName] 获取子组件实例
const childComponent = this.$refs[refName];
if (childComponent && childComponent.setNormal) {
childComponent.setNormal();
}
});
this.tabs.forEach((tab, index) => {
if (index !== this.tabs.length - 1) {
tab.status = 1;
}
});
},
// 下一项
nextTab() {
// if (!this.isCurrentTabValid()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论