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

fix:优化

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