提交 554a10da authored 作者: caodi\cd's avatar caodi\cd

fix:机房详情

上级 e69ada18
...@@ -108,36 +108,45 @@ export default { ...@@ -108,36 +108,45 @@ export default {
inspectionItem: "", //巡检事项 inspectionItem: "", //巡检事项
detail: [ detail: [
{ {
label: "实际电池电压", label: "电池电压",
sjLabel: "实际电池电压",
sjLabelShow: "实际电压",
inspectionResult: 0, inspectionResult: 0,
inspectionResultLable: "正常", inspectionResultLable: "正常",
lableArr: ["正常", "正常"], lableArr: ["正常", "正常"],
conclusion: "", conclusion: "",
settingLabel: "设定电池电压", settingLabel: "设定电池电压",
settingLabelShow: "设定电压",
setting: this.jfType === "3" ? "10V-15V" : "2V-3V", //设定温度值 setting: this.jfType === "3" ? "10V-15V" : "2V-3V", //设定温度值
value: "", //输入温度 value: "", //输入温度
unit: "V", //单位 unit: "V", //单位
photos: [], photos: [],
}, },
{ {
label: "实际电池温度", label: "电池温度",
sjLabel: "实际电池温度",
sjLabelShow: "实际温度",
inspectionResult: 0, inspectionResult: 0,
inspectionResultLable: "正常", inspectionResultLable: "正常",
lableArr: ["正常", "正常"], lableArr: ["正常", "正常"],
conclusion: "", conclusion: "",
settingLabel: "设定电池温度", settingLabel: "设定电池温度",
settingLabelShow: "设定温度",
setting: "15℃-30℃", //设定湿度值 setting: "15℃-30℃", //设定湿度值
value: "", //输入湿度 value: "", //输入湿度
unit: "℃", //单位 unit: "℃", //单位
photos: [], photos: [],
}, },
{ {
label: "实际电池内阻", label: "电池内阻",
sjLabel: "实际电池内阻",
sjLabelShow: "实际内阻",
inspectionResult: 0, inspectionResult: 0,
inspectionResultLable: "正常", inspectionResultLable: "正常",
lableArr: ["正常", "正常"], lableArr: ["正常", "正常"],
conclusion: "", conclusion: "",
settingLabel: "设定电池内阻", settingLabel: "设定电池内阻",
settingLabelShow: "设定内阻",
setting: this.jfType === "3" ? "<10mΩ" : "<0.5mΩ", //设定湿度值 setting: this.jfType === "3" ? "<10mΩ" : "<0.5mΩ", //设定湿度值
value: "", //输入湿度 value: "", //输入湿度
unit: "mΩ", //单位 unit: "mΩ", //单位
......
...@@ -29,8 +29,148 @@ ...@@ -29,8 +29,148 @@
{{ item.conclusion }} {{ item.conclusion }}
</view> </view>
</view> </view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content">
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 安防系统 -->
<view v-if="detailsItem.afxt" class="container-item">
<view class="title">安防系统</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.afxt.detail"
:key="index"
class="cards-item"
>
<view class="name"
>{{ item.label
}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view class="list"> <view class="list">
<view class="label">情况描述:</view> <view class="label">情况描述:</view>
<view class="content">
{{ item.conclusion }}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view
v-if="item.photos && item.photos.length === 0"
class="content"
>
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 电池状态 -->
<view v-if="detailsItem.dczt" class="container-item">
<view class="title">电池状态</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.dczt.detail"
:key="index"
class="cards-item"
>
<view class="name"
>{{ item.label
}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view class="list">
<view class="label">{{item.settingLabelShow}}</view>
<view class="content">
{{ item.setting }}
</view>
</view>
<view class="list">
<view class="label">{{item.sjLabelShow}}</view>
<view class="content">
{{ item.value }}{{item.unit}}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content">
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 设备告警 -->
<view v-if="detailsItem.sbgj" class="container-item">
<view class="title">设备告警</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.sbgj.detail"
:key="index"
class="cards-item sbgj"
>
<view class="name"
>{{ item.label
}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view v-if="item.inspectionResult === 1" class="list">
<view class="label">故障设备:</view>
<view class="content">
{{ item.deviceId }}机柜,{{ item.UpositonS }}~{{
item.UpositonE
}}U】
</view>
</view>
<view class="list">
<view class="label">情况描述:</view>
<view class="content">
{{ item.conclusion }}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content"> <view v-if="item.photos.length === 0" class="content">
未拍摄照片 未拍摄照片
</view> </view>
...@@ -40,7 +180,177 @@ ...@@ -40,7 +180,177 @@
:key="urlIndex" :key="urlIndex"
class="image-item" class="image-item"
:src="url" :src="url"
mode="aspectFit" mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 机房温湿度 -->
<view v-if="detailsItem.jfwsd" class="container-item">
<view class="title">机房温湿度</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.jfwsd.detail"
:key="index"
class="cards-item"
>
<view class="name"
>{{ item.label
}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view class="list">
<view class="label">{{item.settingLabel}}</view>
<view class="content">
{{ item.setting }}{{item.unit}}
</view>
</view>
<view class="list">
<view class="label">{{item.sjLabel}}</view>
<view class="content">
{{ item.value }}{{item.unit}}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content">
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 电力系统 -->
<view v-if="detailsItem.dlxt" class="container-item">
<view class="title">电力系统</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.dlxt.detail"
:key="index"
class="cards-item"
>
<view class="name"
>{{ item.label
}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view class="list">
<view class="label">情况描述:</view>
<view class="content">
{{ item.conclusion }}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content">
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 消防系统 -->
<view v-if="detailsItem.xfxt" class="container-item">
<view class="title">消防系统</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.xfxt.detail"
:key="index"
class="cards-item"
>
<view class="name"
>{{ item.label
}}{{index ===0 ? `(${item.setting})`:''}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view class="list">
<view class="label">情况描述:</view>
<view class="content">
{{ item.conclusion }}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content">
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image>
</view>
</view>
</view>
</view>
</view>
<!-- 线路情况 -->
<view v-if="detailsItem.xlqk" class="container-item">
<view class="title">线路情况</view>
<view class="cards">
<view
v-for="(item, index) in detailsItem.xlqk.detail"
:key="index"
class="cards-item"
>
<view class="name"
>{{ item.label
}}<text
class="status"
:class="{ warning: item.inspectionResult === 1 }"
>{{ item.inspectionResultLable }}</text
></view
>
<view class="list">
<view class="label">情况描述:</view>
<view class="content">
{{ item.conclusion }}
</view>
</view>
<view class="list">
<view class="label">现场照片:</view>
<view v-if="item.photos.length === 0" class="content">
未拍摄照片
</view>
<view v-else class="content">
<image
v-for="(url, urlIndex) in item.photos"
:key="urlIndex"
class="image-item"
:src="url"
mode="center"
></image> ></image>
</view> </view>
</view> </view>
...@@ -100,7 +410,10 @@ export default { ...@@ -100,7 +410,10 @@ export default {
margin-bottom: 16px; margin-bottom: 16px;
background: #f9f9f9; background: #f9f9f9;
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 8px;
&.sbgj {
width: 100%;
}
.name { .name {
font-size: 16px; font-size: 16px;
color: #000000; color: #000000;
...@@ -143,16 +456,14 @@ export default { ...@@ -143,16 +456,14 @@ export default {
color: #000000; color: #000000;
line-height: 22px; line-height: 22px;
font-weight: 400; font-weight: 400;
&.img { display: flex;
display: flex; flex-wrap: nowrap;
flex-wrap: nowrap; justify-content: space-between;
justify-content: space-between; .image-item {
.image-item { width: 72px;
width: 72px; height: 72px;
height: 72px; margin-right: 8px;
margin-right: 8px; border-radius: 4px;
border-radius: 4px;
}
} }
} }
} }
......
...@@ -102,7 +102,8 @@ export default { ...@@ -102,7 +102,8 @@ export default {
inspectionItem: "", //巡检事项 inspectionItem: "", //巡检事项
detail: [ detail: [
{ {
label: "实际温度", label: "机房温度",
sjLabel: "实际温度",
inspectionResult: 0, inspectionResult: 0,
inspectionResultLable: "正常", inspectionResultLable: "正常",
lableArr: ["正常", "正常"], lableArr: ["正常", "正常"],
...@@ -114,7 +115,8 @@ export default { ...@@ -114,7 +115,8 @@ export default {
photos: [], photos: [],
}, },
{ {
label: "实际湿度", label: "机房湿度",
sjLabel: "实际湿度",
inspectionResult: 0, inspectionResult: 0,
inspectionResultLable: "正常", inspectionResultLable: "正常",
lableArr: ["正常", "正常"], lableArr: ["正常", "正常"],
......
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
// 处理】数据 // 处理】数据
getFromData() { getFromData() {
console.log(111, this.itemData); console.log(111, this.itemData);
const isValid = this.areAllObjectsValid(this.itemData.detail, 2); //false不通过 true通过 const isValid = this.areAllObjectsValid(this.itemData.detail, 0); //false不通过 true通过
// const isAllOne = this.areAllInspectionResultsOne(this.itemData.detail); // const isAllOne = this.areAllInspectionResultsOne(this.itemData.detail);
this.itemData.isValid = isValid; this.itemData.isValid = isValid;
this.itemData.inspectionItem = this.inspectionItem; this.itemData.inspectionItem = this.inspectionItem;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
> >
</view> </view>
</view> </view>
<view class="card-box"> <view class="card-box">
<view <view
class="card-row" class="card-row"
:class="{ right: rowIndex % 2 !== 0 }" :class="{ right: rowIndex % 2 !== 0 }"
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</view> </view>
</view></view </view></view
> >
<view class="card-box"> <view class="card-box">
<view <view
class="card-row" class="card-row"
:class="{ right: rowIndex % 2 !== 0 }" :class="{ right: rowIndex % 2 !== 0 }"
...@@ -127,9 +127,9 @@ ...@@ -127,9 +127,9 @@
</view> </view>
</view> </view>
</view> </view>
</view></view </view>
> <detail ref="detail" :jfType="jfType" :detailsItem="detailsItem"></detail
<detail ref="detail" :detailsItem="detailsItem"></detail> ></view>
<signDialog ref="signDialog" @confirm="handlePopupConfirm"></signDialog> <signDialog ref="signDialog" @confirm="handlePopupConfirm"></signDialog>
</view> </view>
</template> </template>
...@@ -148,7 +148,7 @@ import detail from "./components/detail.vue"; ...@@ -148,7 +148,7 @@ import detail from "./components/detail.vue";
export default { export default {
components: { components: {
signDialog, signDialog,
detail detail,
}, },
data() { data() {
return { return {
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
baseInfo: {}, // 基础信息 baseInfo: {}, // 基础信息
inspectionNumber: 0, // 已巡检的井道数量 inspectionNumber: 0, // 已巡检的井道数量
detailsInfo: {}, // 详情 detailsInfo: {}, // 详情
detailsItem:{}, detailsItem: {},
isDisable: false, // 禁用 isDisable: false, // 禁用
isSign: false, //签名状态 isSign: false, //签名状态
isSubmit: 0, //提交状态 isSubmit: 0, //提交状态
...@@ -165,6 +165,7 @@ export default { ...@@ -165,6 +165,7 @@ export default {
options: {}, //存储数据 options: {}, //存储数据
backValue: "", backValue: "",
all_data: [], //所有数据 all_data: [], //所有数据
jfType:"0",//机房类型
}; };
}, },
computed: { computed: {
...@@ -186,7 +187,7 @@ export default { ...@@ -186,7 +187,7 @@ export default {
this.init(); this.init();
} }
this.all_data = this.$store.state.all_data; this.all_data = this.$store.state.all_data;
console.log("onShow",this.all_data) console.log("onShow", this.all_data);
}, },
methods: { methods: {
init() { init() {
...@@ -238,8 +239,13 @@ export default { ...@@ -238,8 +239,13 @@ export default {
this.cardsInfo = detailsInfo.originData; this.cardsInfo = detailsInfo.originData;
this.isSubmit = this.detailsInfo.isSubmit; this.isSubmit = this.detailsInfo.isSubmit;
this.isSign = this.detailsInfo.isSign; this.isSign = this.detailsInfo.isSign;
this.detailsItem = detailsInfo.originData[0].details; this.detailsItem = detailsInfo.originData[0].details;
if (this.detailsItem.afxt.detail[2].inspectionResult === 1) {
this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(
0,
3
);
}
const group1 = this.cardsInfo.slice(0, 5); const group1 = this.cardsInfo.slice(0, 5);
const group2 = this.cardsInfo.slice(5, 10); const group2 = this.cardsInfo.slice(5, 10);
const group3 = this.cardsInfo.slice(10); const group3 = this.cardsInfo.slice(10);
...@@ -259,9 +265,13 @@ export default { ...@@ -259,9 +265,13 @@ export default {
}); });
}, },
// 获取机房详情 // 获取机房详情
getDetailsItem(location, jfType, value){ getDetailsItem(location, jfType, value) {
this.detailsItem = this.detailsInfo.originData[value - 1].details; this.detailsItem = this.detailsInfo.originData[value - 1].details;
console.log("this.detailsItem",this.detailsItem) this.jfType = this.detailsInfo.originData[value - 1].jfType
if (this.detailsItem.afxt.detail[2].inspectionResult === 1) {
this.detailsItem.afxt.detail = this.detailsItem.afxt.detail.slice(0, 3);
}
console.log("this.detailsItem", this.detailsItem);
}, },
// 跳转到具体的机房 // 跳转到具体的机房
toShaftInspection(location, jfType, value) { toShaftInspection(location, jfType, value) {
...@@ -506,6 +516,7 @@ export default { ...@@ -506,6 +516,7 @@ export default {
border-radius: 0 0 9.6px 9.6px; border-radius: 0 0 9.6px 9.6px;
padding: 12.8px 19.2px; padding: 12.8px 19.2px;
height: calc(100vh - 225px); height: calc(100vh - 225px);
// overflow: auto;
} }
.card-row { .card-row {
display: flex; display: flex;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论