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

fix:优化

上级 82aa36b7
差异被折叠。
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
> >
</view> </view>
</view> </view>
<view v-if="inspectionNumber >1" class="profile-right"> <view v-if="inspectionNumber > 1" class="profile-right">
<button v-if="!isSign" class="record-button" @click="toSign"> <button v-if="!isSign" class="record-button" @click="toSign">
巡检人签字 巡检人签字
</button> </button>
...@@ -97,6 +97,12 @@ ...@@ -97,6 +97,12 @@
<script> <script>
import moment from "moment"; import moment from "moment";
import { pad_all_inspection_position } from "@/utils/dict.js"; import { pad_all_inspection_position } from "@/utils/dict.js";
import {
writeInspectionData,
addLog,
getLogContent,
LOG_TYPE_ENUM,
} from "@/utils/IoReadingAndWriting.js";
import { getInspectionDetails } from "@/request/index.js"; import { getInspectionDetails } from "@/request/index.js";
import signDialog from "@/components/signDialog.vue"; import signDialog from "@/components/signDialog.vue";
export default { export default {
...@@ -116,6 +122,7 @@ export default { ...@@ -116,6 +122,7 @@ export default {
uid: "", uid: "",
options: {}, //存储数据 options: {}, //存储数据
backValue: "", backValue: "",
all_data: [], //所有数据
}; };
}, },
computed: { computed: {
...@@ -136,6 +143,7 @@ export default { ...@@ -136,6 +143,7 @@ export default {
} else { } else {
this.init(); this.init();
} }
this.all_data = this.$store.state.all_data;
}, },
methods: { methods: {
init() { init() {
...@@ -223,7 +231,7 @@ export default { ...@@ -223,7 +231,7 @@ export default {
}, },
// 提交 // 提交
submit(type = "sign", value = "") { submit(type = "sign", value = "") {
const all_data = this.$store.state.all_data; //获取全部数据 const all_data = this.all_data; //获取全部数据
let params = this.detailsInfo; let params = this.detailsInfo;
params.signImg = value; params.signImg = value;
console.log("all_data", all_data); console.log("all_data", all_data);
...@@ -234,7 +242,9 @@ export default { ...@@ -234,7 +242,9 @@ export default {
const logContent = getLogContent(LOG_TYPE_ENUM.sys, "数据同步", "同步"); const logContent = getLogContent(LOG_TYPE_ENUM.sys, "数据同步", "同步");
// 更新巡检list // 更新巡检list
console.log("all_data存储", all_data); console.log("all_data存储", all_data);
console.log("all_data一个", all_data[index]);
this.$store.commit("SET_ALL_DATA", all_data); this.$store.commit("SET_ALL_DATA", all_data);
const userInfo = this.userInfo;
const inspectList = all_data.filter( const inspectList = all_data.filter(
(item) => item.createByName == userInfo.user (item) => item.createByName == userInfo.user
); );
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</block> </block>
<block slot="right" class="nav-right"> <block slot="right" class="nav-right">
<view class="header-buttons"> <view class="header-buttons">
<button class="button">机房</button> <button class="button">操作说明</button>
</view> </view>
</block> </block>
</uni-nav-bar> </uni-nav-bar>
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
<text <text
class="inner-circle" class="inner-circle"
v-if="filteredData(selectedPhotos, group, date)" v-if="filteredData(selectedPhotos, group, date)"
></text> ></text
>
</view> </view>
<text class="date">{{ date }}</text> <text class="date">{{ date }}</text>
</view> </view>
...@@ -49,9 +50,13 @@ ...@@ -49,9 +50,13 @@
class="card" class="card"
@click="previewPhoto(photo)" @click="previewPhoto(photo)"
> >
<image :src="photo.url" mode="scaleToFill" class="photo"></image> <image :src="photo.url" mode="center" class="photo"></image>
<view class="check-icon" @click.stop="toggleSelect(photo)"> <view
<text v-if="photo.selected"></text> class="check-icon"
:class="{ active: photo.selected }"
@click.stop="toggleSelect(photo)"
>
<text v-if="photo.selected"></text>
</view> </view>
<view class="delete-icon" @click.stop="deletePhoto(photo)" <view class="delete-icon" @click.stop="deletePhoto(photo)"
>×</view >×</view
...@@ -325,21 +330,21 @@ export default { ...@@ -325,21 +330,21 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.uni-nav-bar-text { .uni-nav-bar-text {
height: 28.8px; height: 28.8px;
width: 28.8px; width: 28.8px;
background: #ffffff; background: #ffffff;
border: 0.32px solid rgba(224, 224, 224, 1); border: 0.32px solid rgba(224, 224, 224, 1);
border-radius: 14.4px; border-radius: 14.4px;
color: #333; color: #333;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
.iconfont { .iconfont {
font-size: 16px; font-size: 16px;
line-height: 28.8px; line-height: 28.8px;
} }
} }
.nav-right { .nav-right {
...@@ -401,10 +406,15 @@ export default { ...@@ -401,10 +406,15 @@ export default {
} }
.selected-count { .selected-count {
background-color: #f0f0f0; background-color: #fff;
padding: 6.4px; padding: 6.4px;
font-size: 14.4px;
color: #000000;
line-height: 20.8px;
font-weight: 500;
border-radius: 6.4px; border-radius: 6.4px;
margin-bottom: 12.8px; margin-bottom: 12.8px;
padding-left: 25.6px;
} }
.photo-box { .photo-box {
...@@ -425,13 +435,13 @@ export default { ...@@ -425,13 +435,13 @@ export default {
align-items: center; align-items: center;
margin-bottom: 6.4px; margin-bottom: 6.4px;
padding: 0 25.6px; padding: 0 25.6px;
.date { .date {
font-size: 20.8px; font-size: 20.8px;
color: #000000; color: #000000;
line-height: 14.4px; line-height: 14.4px;
font-weight: 500; font-weight: 500;
margin-left: 6.4px; margin-left: 6.4px;
margin-bottom: 6.4px;
} }
} }
...@@ -455,18 +465,25 @@ export default { ...@@ -455,18 +465,25 @@ export default {
position: absolute; position: absolute;
top: 6.4px; top: 6.4px;
left: 6.4px; left: 6.4px;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 50%; border-radius: 50%;
width: 19.2px; width: 19.2px;
height: 19.2px; height: 19.2px;
border: 1px solid rgba(255, 255, 255, 0.2);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
line-height: 19.2px;
font-size: 9.6px;
&.active {
background: #3774f6;
color: #fff;
border: 1px solid #fff;
}
} }
.delete-icon { .delete-icon {
position: absolute; position: absolute;
bottom: 6.4px; bottom: 26.4px;
left: 6.4px; left: 6.4px;
background-color: rgba(255, 0, 0, 0.8); background-color: rgba(255, 0, 0, 0.8);
border-radius: 50%; border-radius: 50%;
...@@ -542,10 +559,13 @@ export default { ...@@ -542,10 +559,13 @@ export default {
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: all 0.3s ease;
margin-bottom: 2px;
font-size: 8px;
text-align: center;
&.active { &.active {
border-color: #007aff; background: #3774f6;
background-color: #3774f6; color: #fff;
border: 1px solid #fff;
} }
.inner-circle { .inner-circle {
...@@ -555,4 +575,4 @@ export default { ...@@ -555,4 +575,4 @@ export default {
margin-right: 6.4px; margin-right: 6.4px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -151,6 +151,7 @@ export default { ...@@ -151,6 +151,7 @@ export default {
uid: "", uid: "",
options: {}, //存储数据 options: {}, //存储数据
backValue: "", backValue: "",
all_data: [], //所有数据
}; };
}, },
computed: { computed: {
...@@ -176,6 +177,7 @@ export default { ...@@ -176,6 +177,7 @@ export default {
} else { } else {
this.init(); this.init();
} }
this.all_data = this.$store.state.all_data
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -280,7 +282,7 @@ export default { ...@@ -280,7 +282,7 @@ export default {
// 提交 // 提交
submit(type = "sign", value = "") { submit(type = "sign", value = "") {
const all_data = this.$store.state.all_data; //获取全部数据 const all_data = this.all_data; //获取全部数据
let params = this.detailsInfo; let params = this.detailsInfo;
params.signImg = value; params.signImg = value;
console.log("all_data", all_data); console.log("all_data", all_data);
...@@ -292,6 +294,7 @@ export default { ...@@ -292,6 +294,7 @@ export default {
console.log("all_data存储", all_data); console.log("all_data存储", all_data);
console.log("all_data一个", all_data[index]); console.log("all_data一个", all_data[index]);
this.$store.commit("SET_ALL_DATA", all_data); this.$store.commit("SET_ALL_DATA", all_data);
const userInfo = this.userInfo;
const inspectList = all_data.filter( const inspectList = all_data.filter(
(item) => item.createByName == userInfo.user (item) => item.createByName == userInfo.user
); );
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论