提交 a9d0cb00 authored 作者: JaxBBLL's avatar JaxBBLL

fix: popue text display

上级 8e12b252
......@@ -31,7 +31,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -40,30 +40,9 @@
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view></template
></template
> </view
<CommonUpload v-model="item.photos" :max-count="5">
</CommonUpload> </view></template
></template> </view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -228,11 +207,6 @@ export default {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
this.itemData.detail[index].inspectionResultLable = label;
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -45,6 +45,30 @@
</template>
<script>
const wordMap = {
"地板、墙壁破损": [
"已检查",
"无破损",
"地板有破损",
"墙壁有破损",
"需处理",
"已处理",
],
机房清洁: ["已检查", "已打扫", "未打扫"],
机房通风: ["已检查", "正常", "异常", "需处理", "已处理"],
机房照明: ["已检查", "正常", "异常", "需处理", "已处理"],
漏水检测: ["已检查", "正常", "异常", "需处理", "已处理"],
漏水检测: ["已检查", "正常", "异常", "需处理", "已处理"],
门禁功能: ["已检查", "正常", "异常", "需处理", "已处理"],
门禁外观破损: ["已检查", "有破损", "需处理", "已处理", "无破损"],
监控外观破损: ["已检查", "有破损", "需处理", "已处理", "无破损"],
监控画面清晰: ["已检查", "正常", "异常", "需处理", "已处理"],
监控存储连续: ["已检查", "正常", "异常", "需处理", "已处理"],
实际电池电压: ["已检查", "正常", "异常", "需处理", "已处理"],
实际电池温度: ["已检查", "正常", "异常", "需处理", "已处理"],
实际电池内阻: ["已检查", "正常", "异常", "需处理", "已处理"],
故障设备机柜: ["已检查", "无告警", "有告警", "需处理", "已处理"],
};
export default {
props: {
// 父组件传递的巡检事项
......@@ -52,11 +76,6 @@ export default {
type: String,
default: "",
},
// 父组件传递的固定词
fixedWords: {
type: Array,
default: () => ["已检查", "正常", "异常", "需处理"],
},
},
data() {
return {
......@@ -66,7 +85,9 @@ export default {
},
methods: {
// 打开弹窗
open() {
open(item) {
this.setDisplay(item);
console.log("open", item);
this.isOpen = true;
},
// 关闭弹窗
......@@ -87,6 +108,15 @@ export default {
this.summary = ""; // 清空输入框
this.close();
},
setDisplay(item) {
this.selectWord(item.conclusion || "");
this.fixedWords = wordMap[item.label] || [
"已检查",
"正常",
"异常",
"需处理",
];
},
},
};
</script>
......
......@@ -71,7 +71,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -81,28 +81,7 @@
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view>
</template></view
</view> </template></view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -273,11 +252,6 @@ export default {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
this.itemData.detail[index].inspectionResultLable = label;
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -29,7 +29,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -39,28 +39,7 @@
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view>
</template></view
</view> </template></view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -203,11 +182,6 @@ export default {
setInspectionResult(index, value) {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -64,7 +64,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -73,29 +73,8 @@
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view></template
></view
<CommonUpload v-model="item.photos" :max-count="5">
</CommonUpload> </view></template></view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -242,11 +221,6 @@ export default {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
this.itemData.detail[index].inspectionResultLable = label;
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
export default {
methods: {
showPopup(item, index) {
console.log("showPopup", item);
this.currentIndex = index;
this.$refs.customPopup.open(item);
},
setNormal() {
this.itemData.detail.forEach((item) => {
item.inspectionResult = 0;
......
......@@ -8,7 +8,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -20,6 +20,7 @@
:max-count="9999"
@input="onPhotoChange"
>
<template #tip><div></div></template>
</CommonUpload>
</view>
</view>
......@@ -104,11 +105,6 @@ export default {
setInspectionResult(index, value) {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -100,7 +100,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -109,29 +109,9 @@
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view></template
>
<CommonUpload v-model="item.photos" :max-count="5">
</CommonUpload> </view
></template>
</template> </view
><custom-popup
ref="customPopup"
......@@ -274,11 +254,6 @@ export default {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
this.itemData.detail[index].inspectionResultLable = label;
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -28,7 +28,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -37,29 +37,9 @@
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view></template
> </view
<CommonUpload v-model="item.photos" :max-count="5">
</CommonUpload> </view
></template> </view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -229,11 +209,6 @@ export default {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
this.itemData.detail[index].inspectionResultLable = label;
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -51,7 +51,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -231,11 +231,6 @@ export default {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
this.itemData.detail[index].inspectionResultLable = label;
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......@@ -251,7 +246,6 @@ export default {
this.itemData.status = isAllOne.status; //1表示已经巡检过没有异常
this.itemData.statusLabel = isAllOne.statusLabel;
// console.log(this.itemData);
return this.itemData;
},
......
......@@ -29,7 +29,7 @@
>
<text
:class="['conclusion', { 'no-text': !item.conclusion }]"
@click="showPopup(index)"
@click="showPopup(item, index)"
>
{{ item.conclusion || "请输入情况摘要" }}</text
>
......@@ -38,29 +38,9 @@
<text class="form-label"
><text class="required">*</text>现场照片</text
>
<CommonUpload v-model="item.photos" :max-count="5"> </CommonUpload>
<!-- <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 class="photo-limit"
>请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。</view
>
</view> -->
</view></template
> </view
<CommonUpload v-model="item.photos" :max-count="5">
</CommonUpload> </view
></template> </view
><custom-popup
ref="customPopup"
:inspectionItem="inspectionItem"
......@@ -203,11 +183,6 @@ export default {
setInspectionResult(index, value) {
this.itemData.detail[index].inspectionResult = value; // 0正常 1异常
},
// 显示弹窗
showPopup(index) {
this.currentIndex = index;
this.$refs.customPopup.open();
},
// 处理弹窗确认
handlePopupConfirm(summary) {
this.itemData.detail[this.currentIndex].conclusion = summary; // 回显到文字显示区域
......
......@@ -1085,7 +1085,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1105,7 +1105,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1125,7 +1125,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1145,7 +1145,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1165,7 +1165,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [], //数据
isSubmit: '', //提交状态
isSubmit: "", //提交状态
},
{
createBy: "admin",
......@@ -1185,7 +1185,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1205,7 +1205,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1225,7 +1225,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1245,7 +1245,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1265,7 +1265,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1285,7 +1285,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1305,7 +1305,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
{
createBy: "admin",
......@@ -1325,7 +1325,7 @@ export const pad_2_1_floor = {
default: false,
statusLable: "未巡检",
details: [],
isSubmit: '',
isSubmit: "",
},
],
};
......@@ -1748,7 +1748,7 @@ export const tabsInfo1 = [
value: "qt",
status: 0,
text: [
"检查地面、墙壁、天花板、是否有裂痕、水渍,机房内是否有鼠患、蚁患、蟑螂活动的痕迹。",
"其它问题包括不限于:检查地面、墙壁、天花板、是否有裂痕、水渍,机房内是否有鼠患、蚁患、蟑螂活动的痕迹。",
],
},
];
......@@ -1836,4 +1836,4 @@ export const tabsInfo2 = [
"检查地面、墙壁、天花板、是否有裂痕、水渍,机房内是否有鼠患、蚁患、蟑螂活动的痕迹。",
],
},
];
\ No newline at end of file
];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论