opt:提交用户页面 部门和角色未回显,提交任务查询优化

This commit is contained in:
DESKTOP-5DIJMF9\admin
2025-02-27 19:40:52 +08:00
parent b614ed0792
commit 0796ca073d
4 changed files with 113 additions and 112 deletions

View File

@@ -88,7 +88,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
@input="onInput()"
@change="mytoQuery"
/>
</el-form-item>
</el-col>
@@ -209,7 +210,6 @@ import crudTask from '@/views/wms/sch/task/task'
import CRUD, { crud, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@@ -219,7 +219,7 @@ export default {
name: 'Task',
dicts: ['acs_task_type', 'vehicle_type'],
components: {
pagination, crudOperation, rrOperation, Treeselect, udOperation
pagination, crudOperation, rrOperation, Treeselect
},
mixins: [presenter(), header(), crud()],
cruds() {
@@ -255,6 +255,7 @@ export default {
permission: {
},
query_flag: true,
rules: {},
classes1: []
}
@@ -267,13 +268,16 @@ export default {
crudTask.getFinishType().then(data => {
this.finishTypeList = data
})
// this.crud.query.task_status = ['-1']
// this.crud.toQuery()
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
if (this.query_flag) {
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
this.query_flag = false
}
},
initClass1() {
const param = {
@@ -285,6 +289,19 @@ export default {
this.classes1 = data
})
},
onInput() {
this.$forceUpdate()
},
mytoQuery(array1) {
if (array1 === null) {
this.crud.query.begin_time = ''
this.crud.query.end_time = ''
} else {
this.crud.query.begin_time = array1[0]
this.crud.query.end_time = array1[1]
}
this.crud.toQuery()
},
buildTree(classes) {
classes.forEach(data => {
if (data.children) {