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

123

parent 73570bae
...@@ -9158,6 +9158,11 @@ ...@@ -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": { "move-concurrently": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", "resolved": "http://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz",
......
...@@ -582,10 +582,21 @@ export default { ...@@ -582,10 +582,21 @@ export default {
}); });
}), }),
//保存房间名称 //保存房间名称
saveRoomName() { async saveRoomName() {
if (this.copyRoom.isCopy) { if (this.copyRoom.isCopy) {
// return; if (
this.saveCopy(); !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 == "") { if (this.roomName == "") {
Toast.fail({ Toast.fail({
...@@ -626,7 +637,7 @@ export default { ...@@ -626,7 +637,7 @@ export default {
w: 2, w: 2,
h: 3, h: 3,
i: i, i: i,
id: i, id: this.copyRoom.isCopy ? this.copyRoom.id : i,
name: this.roomName, name: this.roomName,
c: "#e6e5e5", c: "#e6e5e5",
type: this.isRoom type: this.isRoom
...@@ -650,6 +661,7 @@ export default { ...@@ -650,6 +661,7 @@ export default {
: "9999", : "9999",
}; };
this.layoutData.push(data); this.layoutData.push(data);
this.resetCopy();
// postFun("/ledger/room/save", data) // postFun("/ledger/room/save", data)
// .then(res => { // .then(res => {
// if (res.code == 200) { // if (res.code == 200) {
...@@ -662,23 +674,32 @@ export default { ...@@ -662,23 +674,32 @@ export default {
// .catch(err => { // .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
saveCopy() { saveCopy() {
const planId = sessionStorage.getItem("planId"); const planId = sessionStorage.getItem("planId");
postFun(`/risk/plan/copy/room/${planId}`, { return postFun(`/risk/plan/copy/room/${planId}`, {
id: this.copyRoom.room.id, id: this.copyRoom.room.id,
floorId: this.$route.params.floorId, floorId: this.$route.params.floorId,
name: this.roomName, name: this.roomName,
roomType: this.copyRoom.type.dictType, roomType: this.copyRoom.type.dictType,
}).then((res) => { }).then((res) => {
// this.copyRoom.isCopy = false; this.copyRoom.id = res.data;
this.copyRoom = {
isCopy: false,
floor: {},
room: {},
type: {},
copyArr: [],
};
}); });
}, },
cancelDialog() { cancelDialog() {
......
...@@ -145,10 +145,9 @@ export default { ...@@ -145,10 +145,9 @@ export default {
formData.append("remark", this.form.remark); formData.append("remark", this.form.remark);
postFun("/risk/plan/sign", formData).then((res) => { postFun("/risk/plan/sign", formData).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$toast.success(type ? "签到成功" : "签退成功");
message: "签到成功", this.form.file = [];
type: "success", this.form.remark = "";
});
} }
}); });
}); });
......
...@@ -2,15 +2,32 @@ ...@@ -2,15 +2,32 @@
<div> <div>
<LHeader text="签到记录"> </LHeader> <LHeader text="签到记录"> </LHeader>
<div> <div>
<van-cell <van-cell v-for="item in list" :key="item.id">
v-for="item in list"
:key="item.id"
:title="item.type ? '签到' : '签退'"
:value="item.createTime"
>
<template #label> <template #label>
<div>备注:{{ item.remark }}</div> <div class="tips">
<div>照片:<img src="" alt="" /></div> <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> </template>
</van-cell> </van-cell>
</div> </div>
...@@ -20,11 +37,13 @@ ...@@ -20,11 +37,13 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun } from "@/service/table.js"; import { getFun } from "@/service/table.js";
import moment from "moment";
export default { export default {
components: { LHeader }, components: { LHeader },
data() { data() {
return { return {
list: [], list: [],
moment: moment,
}; };
}, },
mounted() { mounted() {
...@@ -42,4 +61,28 @@ export default { ...@@ -42,4 +61,28 @@ export default {
}; };
</script> </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 = { ...@@ -9,10 +9,10 @@ module.exports = {
proxy: { proxy: {
//配置跨域 //配置跨域
"/app-api": { "/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.10.137:8080/", //这里是后台的地址
// target: 'http://192.168.15.124: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://192.168.15.230:8080/", //这里是晓静的地址
// target: 'http://localhost:8081/', //这里是后台的地址 // target: 'http://localhost:8081/', //这里是后台的地址
ws: true, 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