fix:子卷下线加上事务;一键设置加上dtl_id筛选;任务取消按钮加上权限设置
This commit is contained in:
@@ -170,6 +170,7 @@
|
||||
@click="doOperate(scope.row, 'a')"
|
||||
>完成</el-button>
|
||||
<el-button
|
||||
v-permission="['instruction:del']"
|
||||
type="text"
|
||||
icon="el-icon-error"
|
||||
@click="doOperate(scope.row, 'b')"
|
||||
@@ -270,26 +271,33 @@ export default {
|
||||
this.finishTypeList = data
|
||||
})
|
||||
const today = new Date()
|
||||
const threeDaysAgo = new Date(today)
|
||||
threeDaysAgo.setDate(today.getDate() - 3)
|
||||
const year = today.getFullYear()
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0')
|
||||
const beforeDay = String(threeDaysAgo.getDate()).padStart(2, '0')
|
||||
const day = String(today.getDate()).padStart(2, '0')
|
||||
|
||||
// 2. 构造固定时分秒的时间字符串(符合datetime-local格式)
|
||||
const startTime = `${year}-${month}-${day - 3} 00:00:00`
|
||||
const startTime = `${year}-${month}-${beforeDay} 00:00:00`
|
||||
const endTime = `${year}-${month}-${day} 23:59:59`
|
||||
this.crud.query.createTime = [startTime, endTime]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
debugger
|
||||
if (this.query_flag) {
|
||||
const today = new Date()
|
||||
const threeDaysAgo = new Date(today) // 复制今天日期,避免修改原对象
|
||||
threeDaysAgo.setDate(today.getDate() - 3) // 正确减去3天
|
||||
const year = today.getFullYear()
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(today.getDate()).padStart(2, '0')
|
||||
const beforeDay = String(threeDaysAgo.getDate()).padStart(2, '0')
|
||||
|
||||
// 2. 构造固定时分秒的时间字符串(符合datetime-local格式)
|
||||
const startTime = `${year}-${month}-${day - 3} 00:00:00`
|
||||
const startTime = `${year}-${month}-${beforeDay} 00:00:00`
|
||||
const endTime = `${year}-${month}-${day} 23:59:59`
|
||||
this.crud.query.createTime = [startTime, endTime]
|
||||
this.crud.query.begin_time = startTime
|
||||
|
||||
Reference in New Issue
Block a user