diff --git a/src/views/carManage/carList.vue b/src/views/carManage/carList.vue index b113ca5..76390db 100644 --- a/src/views/carManage/carList.vue +++ b/src/views/carManage/carList.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/carManage/carList.vue b/src/views/carManage/carList.vue index b113ca5..76390db 100644 --- a/src/views/carManage/carList.vue +++ b/src/views/carManage/carList.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/carManage/editCar.vue b/src/views/carManage/editCar.vue index 97ce703..473e020 100644 --- a/src/views/carManage/editCar.vue +++ b/src/views/carManage/editCar.vue @@ -196,50 +196,15 @@ this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) + this.canEdit = true } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = false } else { this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = true } @@ -338,8 +303,8 @@ }, // 修改数据 updateData: function() { - this.canEdit = false this.$refs['dataForm'].validate((valid) => { + this.canEdit = false if (valid) { updateCar(this.carForm).then(response => { if (response.code === 200) { @@ -351,6 +316,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/carManage/carList.vue b/src/views/carManage/carList.vue index b113ca5..76390db 100644 --- a/src/views/carManage/carList.vue +++ b/src/views/carManage/carList.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/carManage/editCar.vue b/src/views/carManage/editCar.vue index 97ce703..473e020 100644 --- a/src/views/carManage/editCar.vue +++ b/src/views/carManage/editCar.vue @@ -196,50 +196,15 @@ this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) + this.canEdit = true } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = false } else { this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = true } @@ -338,8 +303,8 @@ }, // 修改数据 updateData: function() { - this.canEdit = false this.$refs['dataForm'].validate((valid) => { + this.canEdit = false if (valid) { updateCar(this.carForm).then(response => { if (response.code === 200) { @@ -351,6 +316,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/staffManage/editStaff.vue b/src/views/staffManage/editStaff.vue index fb0fc84..fd5ae2f 100644 --- a/src/views/staffManage/editStaff.vue +++ b/src/views/staffManage/editStaff.vue @@ -354,6 +354,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/carManage/carList.vue b/src/views/carManage/carList.vue index b113ca5..76390db 100644 --- a/src/views/carManage/carList.vue +++ b/src/views/carManage/carList.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/carManage/editCar.vue b/src/views/carManage/editCar.vue index 97ce703..473e020 100644 --- a/src/views/carManage/editCar.vue +++ b/src/views/carManage/editCar.vue @@ -196,50 +196,15 @@ this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) + this.canEdit = true } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = false } else { this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = true } @@ -338,8 +303,8 @@ }, // 修改数据 updateData: function() { - this.canEdit = false this.$refs['dataForm'].validate((valid) => { + this.canEdit = false if (valid) { updateCar(this.carForm).then(response => { if (response.code === 200) { @@ -351,6 +316,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/staffManage/editStaff.vue b/src/views/staffManage/editStaff.vue index fb0fc84..fd5ae2f 100644 --- a/src/views/staffManage/editStaff.vue +++ b/src/views/staffManage/editStaff.vue @@ -354,6 +354,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/toiletManage/editToilet.vue b/src/views/toiletManage/editToilet.vue index 4aa25f2..87ca20c 100644 --- a/src/views/toiletManage/editToilet.vue +++ b/src/views/toiletManage/editToilet.vue @@ -248,8 +248,10 @@ responsiblePerson: '', // 责任人 responsiblePersonTel: '', // 责任人电话 ts: '', // 启用时间 - notes: '' // 备注 + notes: '', // 备注 + photo: '' } + this.photo = '' }, // 保存数据 saveData: function() { @@ -316,6 +318,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/carManage/carList.vue b/src/views/carManage/carList.vue index b113ca5..76390db 100644 --- a/src/views/carManage/carList.vue +++ b/src/views/carManage/carList.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/carManage/editCar.vue b/src/views/carManage/editCar.vue index 97ce703..473e020 100644 --- a/src/views/carManage/editCar.vue +++ b/src/views/carManage/editCar.vue @@ -196,50 +196,15 @@ this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) + this.canEdit = true } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = false } else { this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = true } @@ -338,8 +303,8 @@ }, // 修改数据 updateData: function() { - this.canEdit = false this.$refs['dataForm'].validate((valid) => { + this.canEdit = false if (valid) { updateCar(this.carForm).then(response => { if (response.code === 200) { @@ -351,6 +316,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/staffManage/editStaff.vue b/src/views/staffManage/editStaff.vue index fb0fc84..fd5ae2f 100644 --- a/src/views/staffManage/editStaff.vue +++ b/src/views/staffManage/editStaff.vue @@ -354,6 +354,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/toiletManage/editToilet.vue b/src/views/toiletManage/editToilet.vue index 4aa25f2..87ca20c 100644 --- a/src/views/toiletManage/editToilet.vue +++ b/src/views/toiletManage/editToilet.vue @@ -248,8 +248,10 @@ responsiblePerson: '', // 责任人 responsiblePersonTel: '', // 责任人电话 ts: '', // 启用时间 - notes: '' // 备注 + notes: '', // 备注 + photo: '' } + this.photo = '' }, // 保存数据 saveData: function() { @@ -316,6 +318,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/transferstationManage/editTransferstation.vue b/src/views/transferstationManage/editTransferstation.vue index 752b18d..a0f287d 100644 --- a/src/views/transferstationManage/editTransferstation.vue +++ b/src/views/transferstationManage/editTransferstation.vue @@ -248,6 +248,7 @@ ts: '', // 启用时间 notes: '' // 备注 } + this.photo = '' }, // 保存数据 saveData: function() { diff --git a/src/views/carManage/carList.vue b/src/views/carManage/carList.vue index b113ca5..76390db 100644 --- a/src/views/carManage/carList.vue +++ b/src/views/carManage/carList.vue @@ -3,7 +3,7 @@ - + diff --git a/src/views/carManage/editCar.vue b/src/views/carManage/editCar.vue index 97ce703..473e020 100644 --- a/src/views/carManage/editCar.vue +++ b/src/views/carManage/editCar.vue @@ -196,50 +196,15 @@ this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) + this.canEdit = true } else if (dialogStatus === 'update') { // 如果是修改,将row中数据填写到输入框中 this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = false } else { this.fetchDetail(row.id) - // this.carForm = { - // sys: '1', - // id: row.id, // id - // carCode: row.carCode, // 车牌号 - // description: row.description, // 车辆描述 - // carType: row.carType, // 车辆类型 - // brandModel: row.brandModel, // 位置:社区/道路 - // peopleNumber: row.peopleNumber, // 准乘人数 - // deptId: row.deptId, // 使用单位 - // userPerson: row.userPerson, // 使用人 - // userPhone: row.userPhone, // 使用人电话 - // chargePerson: row.chargePerson, // 责任人 - // chargePhone: row.chargePhone, // 责任人电话 - // remarks: row.remarks, // 备注 - // engine: row.engine, // 发动机号 - // purchaseDate: row.purchaseDate, // 购入日期 - // registerDate: row.registerDate, // 登记日期 - // deviceId: row.deviceId // 关联模块id - // } + this.canEdit = true this.isEditMode = true this.isDetailMode = true } @@ -338,8 +303,8 @@ }, // 修改数据 updateData: function() { - this.canEdit = false this.$refs['dataForm'].validate((valid) => { + this.canEdit = false if (valid) { updateCar(this.carForm).then(response => { if (response.code === 200) { @@ -351,6 +316,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/staffManage/editStaff.vue b/src/views/staffManage/editStaff.vue index fb0fc84..fd5ae2f 100644 --- a/src/views/staffManage/editStaff.vue +++ b/src/views/staffManage/editStaff.vue @@ -354,6 +354,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/toiletManage/editToilet.vue b/src/views/toiletManage/editToilet.vue index 4aa25f2..87ca20c 100644 --- a/src/views/toiletManage/editToilet.vue +++ b/src/views/toiletManage/editToilet.vue @@ -248,8 +248,10 @@ responsiblePerson: '', // 责任人 responsiblePersonTel: '', // 责任人电话 ts: '', // 启用时间 - notes: '' // 备注 + notes: '', // 备注 + photo: '' } + this.photo = '' }, // 保存数据 saveData: function() { @@ -316,6 +318,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) }, diff --git a/src/views/transferstationManage/editTransferstation.vue b/src/views/transferstationManage/editTransferstation.vue index 752b18d..a0f287d 100644 --- a/src/views/transferstationManage/editTransferstation.vue +++ b/src/views/transferstationManage/editTransferstation.vue @@ -248,6 +248,7 @@ ts: '', // 启用时间 notes: '' // 备注 } + this.photo = '' }, // 保存数据 saveData: function() { diff --git a/src/views/wastebinManage/editWastebin.vue b/src/views/wastebinManage/editWastebin.vue index 24b2bd5..a97b50f 100644 --- a/src/views/wastebinManage/editWastebin.vue +++ b/src/views/wastebinManage/editWastebin.vue @@ -264,6 +264,8 @@ }).catch((e) => { this.canEdit = true }) + } else { + this.canEdit = true } }) },