This commit is contained in:
花有清香月有阴
2022-01-12 09:44:05 +08:00
parent cb5ea3bbb3
commit 806e5e91b1

View File

@@ -23,9 +23,12 @@
<div class="title">异常情况记录</div>
<div class="error-list">
<div v-if="data.length">
<div class="item" v-for="(item, i) in data" :key="i">
<div class="itemes" v-for="(item, i) in data" :key="i">
<p>{{ item.content }}</p>
<div>{{ item.checkTime }}<span>网格员: 李依云</span></div>
<div>
<span>{{ item.createTime }}</span>
<span class="names">网格员: 李依云</span>
</div>
</div>
<!-- <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty> -->
@@ -103,7 +106,7 @@ export default {
getRecord() {
this.$loading()
this.$http
.post(`/app/appepidemichealthreport/list?recordId=${this.id}`)
.post(`/app/appepidemicunusuallog/list?recordId=${this.id}`)
.then((res) => {
if (res?.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
@@ -117,6 +120,29 @@ export default {
})
},
// 新增记录
confirm() {
if (!this.value) {
return this.$u.toast('请输入异常情况')
}
var params = {
content: this.value,
createUserId: this.user.id,
createUserName: this.user.name,
recordId: this.id,
}
this.$http.post('/app/appepidemicunusuallog/addOrUpdate', params).then((res) => {
if (res.code == 0) {
this.$u.toast('新增成功!')
this.show = false
this.value = ''
this.getUser()
this.getRecord()
}
})
},
cancel() {
this.$confirm(`是否解除该条异常信息?`).then(() => {
this.$http.post('/app/appepidemicreportmember/release', { id: this.id }).then((res) => {
@@ -130,44 +156,6 @@ export default {
})
})
},
confirm() {
if (!this.value) {
return this.$u.toast('请输入异常情况')
}
var params = {
content: this.value,
createUserId: this.user.id,
createUserName: this.user.name,
recordId: this.id,
}
this.$http.post('/app/appepidemicbackhomerecord/release', params).then((res) => {
if (res.code == 0) {
this.$u.toast('新增成功!')
this.show = false
this.value = ''
this.getUser()
this.getRecord()
}
})
},
// getRecord() {
// this.$loading()
// this.$http
// .post(`/app/appepidemicunusuallog/list`)
// .then((res) => {
// if (res?.code == 0) {
// this.$hideLoading()
// } else {
// this.$hideLoading()
// }
// })
// .catch(() => {
// this.$hideLoading()
// })
// },
},
}
</script>
@@ -223,7 +211,7 @@ export default {
line-height: 116px;
}
.error-list {
.item {
.itemes {
width: 100%;
background: #f4f7fe;
border-radius: 8px;
@@ -243,7 +231,7 @@ export default {
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 34px;
span {
span:last-child {
display: inline-block;
margin-left: 32px;
}