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

去掉查看样表

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