提交 51fecdec authored 作者: 何宗全's avatar 何宗全

去掉查看样表

上级 3aadda37
...@@ -247,8 +247,8 @@ export default { ...@@ -247,8 +247,8 @@ export default {
// 遍历每一项进行检查 // 遍历每一项进行检查
for (const item of details) { for (const item of details) {
if (item.inspectionResult === 0) { if (item.inspectionResult === 0) {
if (!item.value) { if (!item.value) {
return false; return false;
} }
} else if (item.inspectionResult === 1) { } else if (item.inspectionResult === 1) {
// 如果 inspectionResult 为 1,检查 conclusion 和 photos // 如果 inspectionResult 为 1,检查 conclusion 和 photos
...@@ -270,7 +270,10 @@ export default { ...@@ -270,7 +270,10 @@ export default {
let hasOne = false; let hasOne = false;
for (const item of details) { for (const item of details) {
if (item.inspectionResult === "") { if(!item.value){
hasEmpty = true;
break;
} else if (item.inspectionResult === "") {
hasEmpty = true; hasEmpty = true;
break; break;
} else if (item.inspectionResult === 1) { } else if (item.inspectionResult === 1) {
......
<template> <template>
<!-- 机房巡检操作 --> <!-- 机房巡检操作 -->
<view> <view>
<view v-for="(item, index) in itemData.detail" :key="index"> <template v-for="(item, index) in itemData.detail">
<view class="form-item"> <view :key="index" v-if="item.label != '配电箱外观'">
<text class="form-label" <view class="form-item">
><text class="required">*</text>{{ item.label }}</text <text class="form-label">
> <text class="required">*</text>{{ item.label }}
<view class="switch-container"> </text>
<view <view class="switch-container">
:class="['status-btn', { active: item.inspectionResult === 0 }]" <view
@click="setInspectionResult(index, 0, item.lableArr[0])" :class="['status-btn', { active: item.inspectionResult === 0 }]"
> @click="setInspectionResult(index, 0, item.lableArr[0])"
{{ item.lableArr[0] }} >
</view> {{ item.lableArr[0] }}
<view </view>
:class="['status-btn', { active: item.inspectionResult === 1 }]" <view
@click="setInspectionResult(index, 1, item.lableArr[1])" :class="['status-btn', { active: item.inspectionResult === 1 }]"
> @click="setInspectionResult(index, 1, item.lableArr[1])"
{{ item.lableArr[1] }} >
{{ item.lableArr[1] }}
</view>
</view> </view>
</view> </view>
<template v-if="item.inspectionResult === 1">
<view class="form-item">
<text class="form-label">
<text class="required">*</text>情况摘要
</text>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}
</text>
</view>
<view class="form-item">
<text class="form-label">
<text class="required">*</text>现场照片
</text>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
</view>
</template>
</view> </view>
<template v-if="item.inspectionResult === 1"> </template>
<view class="form-item"> <custom-popup
<text class="form-label"
><text class="required">*</text>情况摘要</text
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
</view>
<view class="form-item">
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5">
</CommonUpload> </view
></template> </view
><custom-popup
ref="customPopup" ref="customPopup"
:inspectionItem="inspectionItem" :inspectionItem="inspectionItem"
@confirm="handlePopupConfirm" @confirm="handlePopupConfirm"
...@@ -95,6 +98,7 @@ export default { ...@@ -95,6 +98,7 @@ export default {
conclusion: "", conclusion: "",
photos: [], photos: [],
}, },
// 配电箱外观 山南独有
], ],
}, },
}; };
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<view class="look-from" @click="lookTable"> <view class="look-from" @click="lookTable">
<text class="iconfont icon-see-s"></text> <text class="iconfont icon-see-s"></text>
查看样表</view 查看样表
></view </view>
> </view>
</block> </block>
</uni-nav-bar> </uni-nav-bar>
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
</view> </view>
</block> </block>
<block slot="right" class="nav-right"> <block slot="right" class="nav-right">
<view class="header-buttons"> <!-- <view class="header-buttons">
<view class="button" @click="lookTable">查看样表</view> <view class="button" @click="lookTable">查看样表</view>
</view> </view> -->
</block> </block>
</uni-nav-bar> </uni-nav-bar>
<view class="profile-section"> <view class="profile-section">
......
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
<text class="iconfont icon-delete"></text <text class="iconfont icon-delete"></text
></view> ></view>
<view class="look-from" @click="lookTable"> <view class="look-from" @click="lookTable">
<text class="iconfont icon-see-s"></text> <text class="iconfont icon-see-s"></text>
查看样表</view 查看样表
></view </view>
> </view>
</block> </block>
</uni-nav-bar> </uni-nav-bar>
......
别名:__uni__a11bfd5
密码:zI7Z5z3b
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论