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

fix:巡检管理

上级 9b32c3a6
...@@ -45,7 +45,7 @@ uni-page-head .uni-btn-icon { ...@@ -45,7 +45,7 @@ uni-page-head .uni-btn-icon {
} }
.uni-navbar__header { .uni-navbar__header {
padding: 0 24px !important; padding: 0 32px !important;
/* padding-right: 18px !important; */ /* padding-right: 18px !important; */
} }
......
<template> <template>
<view class="inspect-item" @click="toPage"> <view class="inspect-item" @click="toPage">
<view <view class="content" :class="details.synchronization == 1 ? 'synchronization' : ''">
class="content" <view class="name">{{
:class="details.synchronization == 1 ? 'synchronization' : ''" details.synchronization == 0 ? "待同步" : "已同步"
> }}</view>
<view class="name">{{ getLabel(details.inspectionType) }}</view> <view class="info">
<view class="info"> <view class="info-row">
<view class="info-row"> <text class="title">{{ getLabel(details.inspectionType) }}</text>
<text class="title">{{ details.recordName }}</text> <text class="status">{{
<text class="status">{{
details.synchronization == 0 ? "待同步" : "已同步" details.synchronization == 0 ? "待同步" : "已同步"
}}</text> }}</text>
<view v-if="details.isException == 1" class="status alarm"> <view v-if="details.isException == 1" class="status alarm">
<text class="iconfont icon-yichang1"></text> <text class="iconfont icon-yichang1"></text>
<text>有异常</text></view <text>有异常</text>
> </view>
</view> </view>
<view class="info-row info-row-code"> <view class="info-row info-row-code">
<text>编号:</text> <text>巡检人:</text>
<text class="code-num">{{ details.inspectionCode }}</text> <text class="code-num">admin</text>
</view> <text>编号:</text>
</view> <text class="code-num">{{ details.inspectionCode }}</text>
<view class="img"> <text>巡检日期:</text>
<image <text class="code-num">2025-01-29</text>
v-if="details.synchronization == 1" </view>
class="bg-img" </view>
src="../../static/img/add-img/default.png" <view class="img">
></image> <image v-if="details.synchronization == 1" class="bg-img" src="../../static/img/add-img/default.png"></image>
<image <!-- <image v-else class="bg-img" src="../../static/img/add-img/active.png"></image> -->
v-else </view>
class="bg-img" </view>
src="../../static/img/add-img/active.png" </view>
></image>
</view>
</view>
</view>
</template> </template>
<script> <script>
import { pad_inspection_type } from "@/utils/dict.js"; import {
pad_inspection_type
export default { } from "@/utils/dict.js";
props: {
details: { export default {
type: Object, props: {
}, details: {
isDisable: { type: Object,
type: Boolean, },
}, isDisable: {
}, type: Boolean,
methods: { },
getLabel(val) { },
const temp = methods: {
( getLabel(val) {
pad_inspection_type.rows.filter((item) => item.dictValue == val)[0] || const temp =
{} (
).dictLabel || ""; pad_inspection_type.rows.filter((item) => item.dictValue == val)[0] || {}
return temp.length ? temp.slice(0, 2) : ""; ).dictLabel || "";
}, return temp.length ? temp : "";
toPage() { },
const url = toPage() {
this.details.inspectionType == 1 const url =
? `/pages/inspectionContent/inspectionContent?isDisable=${ this.details.inspectionType == 1 ?
`/pages/inspectionContent/inspectionContent?isDisable=${
this.isDisable ? 1 : 0 this.isDisable ? 1 : 0
}` }` :
: `/pages/shaftInspection/shaftInspectionNew?isDisable=${ `/pages/shaftInspection/shaftInspectionNew?isDisable=${
this.isDisable ? 1 : 0 this.isDisable ? 1 : 0
}`; }`;
uni.navigateTo({ uni.navigateTo({
url: `${url}&uid=${this.details.uid}`, url: `${url}&uid=${this.details.uid}`,
}); });
}, },
}, },
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.inspect-item { .inspect-item {
width: 50%; width: calc(50% - 8px);
padding-right: 16px; margin-bottom: 16px;
margin-bottom: 16px;
.content { .content {
background: #fff; background: #fff;
border: 0.4px solid rgba(224, 224, 224, 1); border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px; border-radius: 12px;
padding: 18px 16px 14px 10px; padding: 12px;
display: flex; display: flex;
align-items: center; align-items: center;
height: 84px; height: 78px;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background-image: linear-gradient(-67deg, #ffab2423, #ffab2411 50%);
.name { .name {
background: #ffab2423; background: #ffab2423;
border-radius: 12px; border-radius: 12px;
width: 54px; width: 54px;
height: 54px; height: 54px;
margin-right: 10px; margin-right: 10px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #f39800; color: #f39800;
} }
.info {
.info-row { .info {
display: flex; .info-row {
align-items: center; display: flex;
margin-bottom: 8px; align-items: center;
&:last-of-type { margin-bottom: 8px;
margin: 0;
} &:last-of-type {
.title { margin: 0;
font-size: 12px; }
color: #000000;
font-weight: bold; .title {
margin-right: 8px; font-size: 12px;
} color: #000000;
.status { font-weight: bold;
padding: 2px 4px; margin-right: 8px;
font-size: 12px; }
color: #ffffff;
text-align: center; .status {
line-height: 20px; padding: 2px 4px;
font-weight: 400; font-size: 12px;
background: #ffab24; color: #ffffff;
border-radius: 3px; text-align: center;
} line-height: 20px;
.alarm { font-weight: 400;
margin-left: 8px; background: #ffab24;
background: rgba(255, 105, 82, 0.1); border-radius: 3px;
font-size: 12px; }
color: #ff6952;
text-align: center; .alarm {
line-height: 20px; margin-left: 8px;
font-weight: 400; background: rgba(255, 105, 82, 0.1);
} font-size: 12px;
} color: #ff6952;
.info-row-code { text-align: center;
font-size: 14px; line-height: 20px;
color: #7c7c7c; font-weight: 400;
font-weight: 400; }
.code-num { }
font-size: 14px;
color: #000000; .info-row-code {
font-weight: 400; font-size: 12px;
} color: #7c7c7c;
} font-weight: 400;
}
.code-num {
.img { font-size: 12px;
position: absolute; color: #000000;
right: 0; font-weight: 400;
top: 50%; margin-right: 10px;
transform: translateY(-50%); &:last-child{
.bg-img { margin-right: 0;
width: 80px; }
height: 80px; }
} }
} }
}
.img {
.synchronization { position: absolute;
background-image: linear-gradient(-67deg, #9c9c9c16, #9c9c9c09 50%); right: 0;
.name { top: 50%;
background: #9c9c9c16; transform: translateY(-50%);
border-radius: 12px;
color: #4a4a4a; .bg-img {
} width: 80px;
.status { height: 80px;
background: #9c9c9c16 !important; }
color: #4a4a4a !important; }
} }
}
} .synchronization {
</style> background-image: linear-gradient(-67deg, #9c9c9c16, #9c9c9c09 50%);
.name {
background: #9c9c9c16;
border-radius: 12px;
color: #4a4a4a;
}
.status {
background: #9c9c9c16 !important;
color: #4a4a4a !important;
}
}
}
</style>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
v-model="searchFrom.inspectionType" v-model="searchFrom.inspectionType"
:localdata="inspectArr" :localdata="inspectArr"
@change="(e) => change(e, 'inspectionType')" @change="(e) => change(e, 'inspectionType')"
placeholder="巡检类型:全部" placeholder="类型"
:clear="true" :clear="true"
:key="new Date().getTime()" :key="new Date().getTime()"
></uni-data-select> ></uni-data-select>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
class="uni-search-item" class="uni-search-item"
v-model="searchFrom.synchronization" v-model="searchFrom.synchronization"
:localdata="synchronization" :localdata="synchronization"
placeholder="是否同步:全部" placeholder="状态"
@change="(e) => change(e, 'synchronization')" @change="(e) => change(e, 'synchronization')"
:clear="true" :clear="true"
:key="new Date().getTime()" :key="new Date().getTime()"
...@@ -29,14 +29,24 @@ ...@@ -29,14 +29,24 @@
class="uni-search-item" class="uni-search-item"
v-model="searchFrom.isException" v-model="searchFrom.isException"
:localdata="exceptionArr" :localdata="exceptionArr"
placeholder="有无异常:全部" placeholder="异常"
@change="(e) => change(e, 'isException')" @change="(e) => change(e, 'isException')"
:clear="true" :clear="true"
:key="new Date().getTime()" :key="new Date().getTime()"
></uni-data-select> ></uni-data-select>
<uni-data-select
v-if="!hiddenSearch.includes('inspectionTime')"
class="uni-search-item"
v-model="searchFrom.inspectionTime"
:localdata="dateArr"
placeholder="选择时间"
@change="(e) => change(e, 'inspectionTime')"
:clear="true"
:key="new Date().getTime()"
></uni-data-select>
</view> </view>
<view <!-- <view
class="search-com-right" class="search-com-right"
v-if="!hiddenSearch.includes('inspectionTime')" v-if="!hiddenSearch.includes('inspectionTime')"
> >
...@@ -47,7 +57,7 @@ ...@@ -47,7 +57,7 @@
:border="false" :border="false"
@change="(e) => change(e, 'inspectionTime')" @change="(e) => change(e, 'inspectionTime')"
/> />
</view> </view> -->
</view> </view>
</template> </template>
<script> <script>
...@@ -82,8 +92,14 @@ export default { ...@@ -82,8 +92,14 @@ export default {
], ],
exceptionArr: [ exceptionArr: [
{ value: "all", text: "全部" }, { value: "all", text: "全部" },
{ value: "1", text: "有异常" }, { value: "1", text: "有" },
{ value: "0", text: "无异常" }, { value: "0", text: "无" },
],
dateArr: [
{ value: "0", text: "本月" },
{ value: "1", text: "本季" },
{ value: "2", text: "本年" },
{ value: "3", text: "自定义" },
], ],
}; };
}, },
...@@ -101,13 +117,13 @@ export default { ...@@ -101,13 +117,13 @@ export default {
.search-com { .search-com {
display: flex; display: flex;
align-items: center; align-items: center;
width: 50%;
.search-com-left { .search-com-left {
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
.uni-search-item { .uni-search-item {
margin-right: 12px; margin-right: 12px;
width: 130px;
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
border: none !important; border: none !important;
......
...@@ -48,6 +48,12 @@ ...@@ -48,6 +48,12 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
// 新增配置---------
// 巡检管理
{
"path": "pages/inspectionManagement/index"
},
// 井道巡检新页面 // 井道巡检新页面
{ {
"path": "pages/shaftInspection/shaftInspectionNew", "path": "pages/shaftInspection/shaftInspectionNew",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<view class="username">{{ userName }}</view> <view class="username">{{ userName }}</view>
</view> </view>
<view class="profile-right"> <view class="profile-right">
<button class="inspection-button">巡检管理</button> <button class="inspection-button" @click="toInspectionManagement">巡检管理</button>
<button class="record-button">上架记录</button> <button class="record-button">上架记录</button>
</view> </view>
</view> </view>
...@@ -87,6 +87,13 @@ ...@@ -87,6 +87,13 @@
url: "/pages/index/operLog", url: "/pages/index/operLog",
}); });
}, },
// 巡检管理
toInspectionManagement() {
console.log(1111)
uni.navigateTo({
url: "/pages/inspectionManagement/index",
});
},
// 井道巡检 // 井道巡检
toShaftInspection() { toShaftInspection() {
uni.navigateTo({ uni.navigateTo({
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
/* #endif */ /* #endif */
flex-wrap: nowrap; flex-wrap: nowrap;
flex-direction: row; flex-direction: row;
width: 120rpx; width: auto;
// padding: 0 6px; // padding: 0 6px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论