Commit 8c8ac4f7 authored by p-wanping.song's avatar p-wanping.song

123

parent 73570bae
......@@ -9158,6 +9158,11 @@
}
}
},
"moment": {
"version": "2.29.4",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "http://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz",
......
......@@ -582,10 +582,21 @@ export default {
});
}),
//保存房间名称
saveRoomName() {
async saveRoomName() {
if (this.copyRoom.isCopy) {
// return;
this.saveCopy();
if (
!this.copyRoom.room.id ||
!this.copyRoom.floor.id ||
!this.copyRoom.type.dictCode
) {
Toast.fail({
title: "提示",
forbidClick: true,
message: "请填写完整!",
});
return false;
}
await this.saveCopy();
}
if (this.roomName == "") {
Toast.fail({
......@@ -626,7 +637,7 @@ export default {
w: 2,
h: 3,
i: i,
id: i,
id: this.copyRoom.isCopy ? this.copyRoom.id : i,
name: this.roomName,
c: "#e6e5e5",
type: this.isRoom
......@@ -650,6 +661,7 @@ export default {
: "9999",
};
this.layoutData.push(data);
this.resetCopy();
// postFun("/ledger/room/save", data)
// .then(res => {
// if (res.code == 200) {
......@@ -662,23 +674,32 @@ export default {
// .catch(err => {
// });
},
resetCopy() {
const copyRoom = {
isCopy: false,
floor: {},
room: {},
type: {},
copyArr: [],
id: "",
};
this.copyRoom = { ...this.copyRoom, ...copyRoom };
// this.copyRoom.isCopy = false;
// this.copyRoom.floor = {};
// this.copyRoom.room = {};
// this.copyRoom.type = {};
// this.copyRoom.copyArr = [];
},
// saveCopy
saveCopy() {
const planId = sessionStorage.getItem("planId");
postFun(`/risk/plan/copy/room/${planId}`, {
return postFun(`/risk/plan/copy/room/${planId}`, {
id: this.copyRoom.room.id,
floorId: this.$route.params.floorId,
name: this.roomName,
roomType: this.copyRoom.type.dictType,
}).then((res) => {
// this.copyRoom.isCopy = false;
this.copyRoom = {
isCopy: false,
floor: {},
room: {},
type: {},
copyArr: [],
};
this.copyRoom.id = res.data;
});
},
cancelDialog() {
......
......@@ -145,10 +145,9 @@ export default {
formData.append("remark", this.form.remark);
postFun("/risk/plan/sign", formData).then((res) => {
if (res.code == 200) {
this.$message({
message: "签到成功",
type: "success",
});
this.$toast.success(type ? "签到成功" : "签退成功");
this.form.file = [];
this.form.remark = "";
}
});
});
......
......@@ -2,15 +2,32 @@
<div>
<LHeader text="签到记录"> </LHeader>
<div>
<van-cell
v-for="item in list"
:key="item.id"
:title="item.type ? '签到' : '签退'"
:value="item.createTime"
>
<van-cell v-for="item in list" :key="item.id">
<template #label>
<div>备注:{{ item.remark }}</div>
<div>照片:<img src="" alt="" /></div>
<div class="tips">
<div>用户:{{ item.userName }}</div>
<div>备注:{{ item.remark }}</div>
<div>
照片:
<div class="imgs">
<div
v-for="file in item.files"
:key="file.fileId"
class="img-item"
>
<img :src="file.filePath" alt="" />
</div>
</div>
</div>
</div>
</template>
<template #title>
<div class="title">
<div>{{ item.type ? "签到" : "签退" }}</div>
<div>
{{ moment(item.createTime).format("YYYY-MM-DD HH:mm:ss") }}
</div>
</div>
</template>
</van-cell>
</div>
......@@ -20,11 +37,13 @@
<script>
import LHeader from "@/components/header.vue";
import { getFun } from "@/service/table.js";
import moment from "moment";
export default {
components: { LHeader },
data() {
return {
list: [],
moment: moment,
};
},
mounted() {
......@@ -42,4 +61,28 @@ export default {
};
</script>
<style lang="scss" scoped></style>
<style lang="less" scoped>
.title {
display: flex;
justify-content: space-between;
}
.tips {
line-height: 22px;
.imgs {
display: flex;
flex-wrap: wrap;
.img-item {
width: 100px;
height: 100px;
margin-right: 10px;
margin-top: 10px;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
}
</style>
......@@ -9,10 +9,10 @@ module.exports = {
proxy: {
//配置跨域
"/app-api": {
target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://192.168.10.137:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: "http://192.168.10.137:8080/", //这里是昊哥的地址
target: "http://192.168.10.137:8080/", //这里是昊哥的地址
// target: "http://192.168.15.230:8080/", //这里是晓静的地址
// target: 'http://localhost:8081/', //这里是后台的地址
ws: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment