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

fix:优化

上级 82aa36b7
......@@ -7,7 +7,11 @@
<view class="header-buttons">
<button class="log-button" @click="lookLog">操作日志</button>
<div class="exit-button" @click="logOut">
<image class="logout" src="@/static/img/logout.svg" mode="aspectFit"></image>
<image
class="logout"
src="@/static/img/logout.svg"
mode="aspectFit"
></image>
</div>
</view>
</view>
......@@ -17,14 +21,23 @@
<view class="profile-box">
<view class="profile-left">
<view class="avatar">
<image src="@/static/img/add-img/home1.png" mode="aspectFit"></image>
<view class="change-password" @click="updatePassword">修改密码</view>
<image
src="@/static/img/add-img/home1.png"
mode="aspectFit"
></image>
<view class="change-password" @click="updatePassword"
>修改密码</view
>
</view>
<view class="username">{{ userName }}</view>
</view>
<view class="profile-right">
<button class="inspection-button" @click="toInspectionManagement">巡检管理</button>
<button class="record-button" @click="toListingManagement">设备上架管理</button>
<button class="inspection-button" @click="toInspectionManagement">
巡检管理
</button>
<button class="record-button" @click="toListingManagement">
设备上架管理
</button>
</view>
</view>
</view>
......@@ -32,22 +45,32 @@
<!-- 第三个模块 -->
<view class="card-section">
<view class="card-container">
<view class="card" v-for="(card, index) in cards" :key="index"
:style="{ backgroundImage: `url(${card.image})` }" @click="toList(card.url)">
<view
class="card"
v-for="(card, index) in cards"
:key="index"
:style="{ backgroundImage: `url(${card.image})` }"
@click="toList(card.url)"
>
<view class="card-text">{{ card.text }}</view>
</view>
</view>
</view>
<!-- 退出账号弹出 -->
<uni-popup ref="inputDialog2" type="dialog">
<uni-popup-dialog ref="inputClose2" mode="base" title="确定退出该账号?" @confirm="dialogInputConfirm2">
<uni-popup-dialog
ref="inputClose2"
mode="base"
title="确定退出该账号?"
@confirm="dialogInputConfirm2"
>
</uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
export default {
export default {
data() {
return {
cards: [{
......@@ -62,7 +85,8 @@
},
{
image: '../../static/img/sj.png',
text: '设备上架'
text: '设备上架',
url: "/pages/listingManagement/index?backValue=home"
}
],
userName: this.$store.state.now_user.user,
......@@ -130,21 +154,21 @@
},
}
};
};
</script>
<style scoped lang="less">
.container {
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
height: 100vh;
background-image: linear-gradient(115deg, #E8F0FB 0%, #E1EBFA 100%);
background-image: linear-gradient(115deg, #e8f0fb 0%, #e1ebfa 100%);
z-index: 1;
}
}
.header {
.header {
width: 100%;
display: flex;
justify-content: space-between;
......@@ -174,7 +198,7 @@
.log-button {
width: 112px;
height: 36px;
background: #FFFFFF;
background: #ffffff;
border-radius: 18px;
margin-right: 10px;
font-family: PingFangSC-Regular;
......@@ -187,7 +211,7 @@
.exit-button {
width: 36px;
height: 36px;
background: #FFFFFF;
background: #ffffff;
border: 0.5px solid rgba(224, 224, 224, 1);
border-radius: 18px;
display: flex;
......@@ -200,9 +224,9 @@
}
}
}
}
}
.profile-section {
.profile-section {
width: 720px;
.profile-box {
......@@ -239,7 +263,7 @@
height: 22px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
color: #ffffff;
line-height: 20px;
font-weight: 400;
}
......@@ -261,11 +285,11 @@
.inspection-button {
width: 112px;
height: 36px;
background-image: linear-gradient(105deg, #68ACFB 0%, #3774F6 100%);
background-image: linear-gradient(105deg, #68acfb 0%, #3774f6 100%);
border-radius: 18px;
font-family: PingFangSC-Regular;
font-size: 16px;
color: #FFFFFF;
color: #ffffff;
line-height: 36px;
font-weight: 400;
margin-right: 16px;
......@@ -274,20 +298,20 @@
.record-button {
width: 144px;
height: 36px;
background: #FFFFFF;
background: #ffffff;
border: 1px solid rgba(55, 116, 246, 1);
border-radius: 18px;
font-family: PingFangSC-Regular;
font-size: 16px;
color: #3774F6;
color: #3774f6;
line-height: 36px;
font-weight: 400;
}
}
}
}
}
.card-section {
.card-section {
width: 720px;
margin-top: 20px;
......@@ -317,5 +341,5 @@
}
}
}
}
}
</style>
......@@ -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
......@@ -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 {
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论