From bbca4d7afc2c581c21599fc17a0c7eaf8f3bc62b Mon Sep 17 00:00:00 2001 From: liushuai Date: Sat, 24 Nov 2018 10:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/curd.js | 9 +-- .../MaintenanceEquipmentPerson/index.vue | 5 +- .../SystemRrolemaintenance/index.vue | 1 - .../WorkshopPersonnelRoleMana/index.vue | 58 ++++++++++++------- 4 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/utils/curd.js b/src/utils/curd.js index 3cca2d30..1436c6b3 100644 --- a/src/utils/curd.js +++ b/src/utils/curd.js @@ -79,9 +79,6 @@ export default { }) } } - if (this[carrier].length !== 0) { - this[carrier] = response.data[0][select[0]] - } }) } else { requestData(param).then(response => { // 这个方法没什么难度,不注释了 @@ -139,7 +136,7 @@ export default { // 3)接受值,数组,一般是['table','total','loading']顺序不能变 Vue.prototype.getTable = function(requestData, param, e) { requestData(...param).then(response => { - const data = response.data.rows ? response.data.rows : response.data + const data = response.data.rows this[e[0]] = [] this[e[1]] = 0 if (data && data.length > 0) { @@ -159,9 +156,7 @@ export default { // console.log('暂无数据') } }).then(() => { - if (this[e[2]]) { - this[e[2]] = false - } + this[e[2]] = false }) } // 添加表格数据 diff --git a/src/views/BasicData/MaintenanceEquipmentPerson/index.vue b/src/views/BasicData/MaintenanceEquipmentPerson/index.vue index 3b86d47d..bf91fc18 100644 --- a/src/views/BasicData/MaintenanceEquipmentPerson/index.vue +++ b/src/views/BasicData/MaintenanceEquipmentPerson/index.vue @@ -135,7 +135,7 @@ export default { equipmentNameCheck: null, equipmentName: [], operator: '', - operatorNum: null, + operatorNum: '', operatorCheck: null, dialogFormVisible: false, tablePeople: [], @@ -200,10 +200,11 @@ export default { } }, getTableData() { + console.log(typeof (this.equipmentName)) this.equipmentNameValue ? this.equipmentNameCheck = 1 : this.equipmentNameCheck = 0 this.operator ? this.operatorCheck = 1 : this.operatorCheck = 0 this.loading = true - this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operator, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading']) + this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operatorNum, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading']) }, handleAdd() { this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加']) diff --git a/src/views/BasicData/SystemRrolemaintenance/index.vue b/src/views/BasicData/SystemRrolemaintenance/index.vue index c7cfe2bd..d43cd398 100644 --- a/src/views/BasicData/SystemRrolemaintenance/index.vue +++ b/src/views/BasicData/SystemRrolemaintenance/index.vue @@ -10,7 +10,6 @@ diff --git a/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue b/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue index 739da3b8..627dcda8 100644 --- a/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue +++ b/src/views/BasicData/WorkshopPersonnelRoleMana/index.vue @@ -4,7 +4,7 @@ 员工姓名: - + 角色名称: - +