数据推送

This commit is contained in:
binbin_pan 2024-07-09 17:06:32 +08:00
parent 8eea5b7ad4
commit aa9aac7459
3 changed files with 11 additions and 8 deletions

View File

@ -3,6 +3,7 @@
<!-- 弹框: 内容是transfer -->
<el-dialog title="请选择接收人员" :visible.sync="open" width="40%" @close="handleClose" append-to-body>
<el-transfer
v-if="open"
class="centered-transfer"
:titles="titles"
:button-texts="['移除', '添加']"
@ -52,6 +53,7 @@ export default {
disabled: false,
},
],
leftDefault: [], //
}
},
methods: {
@ -64,6 +66,8 @@ export default {
//
handleClose() {
this.open = false
//
this.value = []
this.$emit('getList')
},
//
@ -81,6 +85,11 @@ export default {
dataChange() {
console.log('🚀 ~ dataChange ~ dataChange:', this.value)
},
clearQuery(left, right) {
console.log('🚀 ~ clearQuery ~ 清空搜索:', )
// 'left' / 'right'
},
submit() {
console.log('🚀 ~ submit ~ submit:', this.value)

View File

@ -274,7 +274,7 @@ export default {
//
accept() {
console.log('🚀 ~ accept ~ 接收:')
this.loading = true
// this.loading = true
// ().then(res => {
// this.getList()
// }).catch(err => {

View File

@ -127,7 +127,7 @@ export default {
methods: {
//
handleQuery() {
console.log('🚀 ~ handleQuery ~ 搜索:', params)
console.log('🚀 ~ handleQuery ~ 搜索:',)
this.getList()
},
//
@ -159,31 +159,25 @@ export default {
},
// 10 30,
warning() {
console.log('🚀 ~ warning ~ 预警:')
//
const nowDate = new Date()
console.log('🚀 ~ warning ~ nowDate:', nowDate)
//
this.tableData.forEach((item) => {
//
const rentalDate = new Date(item.rentalDate)
console.log('🚀 ~ this.tableData.forEach ~ rentalDate:', rentalDate)
//
const nextInspectionDate = new Date(item.nextInspectionDate)
// : - <= 10
const leaseTime = (rentalDate - nowDate) / (1000 * 60 * 60 * 24)
console.log('🚀 ~ this.tableData.forEach ~ leaseTime:', leaseTime)
if (leaseTime <= 10) {
item.activeLease = true
}
// : - <= 30
const checkTime = (nextInspectionDate - nowDate) / (1000 * 60 * 60 * 24)
console.log('🚀 ~ this.tableData.forEach ~ checkTime:', checkTime)
if (checkTime <= 30) {
item.activeCheck = true
}
})
console.log('🚀 ~ this.tableData.forEach ~ 添加预警值:', this.tableData)
},
},
}