From 2b734db2f2d63744aa81510d6904a7952c19829f Mon Sep 17 00:00:00 2001 From: xiaobai <857694115@qq.com> Date: Mon, 30 Aug 2021 11:41:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=AA=E5=99=A8=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TreeSelect/index.vue | 2 +- .../device_management/components/Move.vue | 18 ++++++++++-------- src/views/device_management/index.vue | 2 +- src/views/ysjl/2000/2100/zbg/dj/edit.vue | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/components/TreeSelect/index.vue b/src/components/TreeSelect/index.vue index b3d61b9..eacac26 100644 --- a/src/components/TreeSelect/index.vue +++ b/src/components/TreeSelect/index.vue @@ -33,7 +33,7 @@ export default { default: () => { return { value: 'id', // ID字段名 - label: 'title', // 显示名称 + label: 'name', // 显示名称 children: 'children' // 子级字段名 } } diff --git a/src/views/device_management/components/Move.vue b/src/views/device_management/components/Move.vue index ccb9b3a..f21b1a8 100644 --- a/src/views/device_management/components/Move.vue +++ b/src/views/device_management/components/Move.vue @@ -166,9 +166,9 @@ import TreeSelect from '@/components/TreeSelect' // crud交由presenter持有 const defaultCrud = presenter(CRUD({ title: '领用、借用管理', - url: '/move', + url: '/move/list', orderBy: ['id desc'], - crudMethod: { ...InstrumentMove } + crudMethod: { ...InstrumentMove }, })) // 设置初始form @@ -180,7 +180,8 @@ const defaultForm = form({ applyDate: '', currentUserId: '', currentDepartmentId: null, - remark: '' + remark: '', + instrumentId: null }) // 自定义模板内容 @@ -210,21 +211,21 @@ export default { data() { return { dialogVisible: false, - userList: this.$store.getters.allUserList, + userList: this.$store.getters.allUser, treeSelectProps: { children: 'children', - label: 'departmentName', + label: 'name', value: 'id' }, colConfigs: [ - { prop: 'currentUserId', label: '当前使用人', align: 'center', formatter: this.formatter.formatterNickName }, + { prop: 'currentUserId', label: '当前使用人', align: 'center', formatter: this.formatter.getChineseName }, { prop: 'currentDepartmentId', label: '当前使用科室', align: 'center', formatter: this.formatter.formatterDepartmentName }, - { prop: 'applicantId', label: '申请人', align: 'center', formatter: this.formatter.formatterNickName }, + { prop: 'applicantId', label: '申请人', align: 'center', formatter: this.formatter.getChineseName }, { prop: 'applyDepartmentId', label: '申请科室', @@ -272,12 +273,13 @@ export default { methods: { // 刷新前做的操作 [CRUD.HOOK.beforeRefresh](crud) { - crud.query.instrumentId = this.instrumentId + crud.query.id = this.instrumentId }, // 新增前做的操作 [CRUD.HOOK.beforeToAdd](crud, form) { this.applyDepartmentId = 0 this.currentDepartmentId = 0 + form.id = this.instrumentId form.instrumentId = this.instrumentId }, // 编辑框打开后做的操作 diff --git a/src/views/device_management/index.vue b/src/views/device_management/index.vue index d52c016..906291f 100644 --- a/src/views/device_management/index.vue +++ b/src/views/device_management/index.vue @@ -52,7 +52,7 @@ - +