diff --git a/src/views/nbDevice/editNbDevice.vue b/src/views/nbDevice/editNbDevice.vue index de7d53e..ed414d7 100644 --- a/src/views/nbDevice/editNbDevice.vue +++ b/src/views/nbDevice/editNbDevice.vue @@ -70,7 +70,7 @@
@@ -110,6 +110,7 @@ showDeviceType: true, // 是否显示设备类型选项 showModelType: true, // 是否显示型号选项 isEditMode: false, + saveBtnDisable: false, rules: { name: [{ required: true, message: '设备名称不能为空', trigger: ['blur', 'change'] }], devcode: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], @@ -179,6 +180,7 @@ this.$refs['dataForm'].validate((valid) => { this.deviceForm.verifyCode = this.deviceForm.nodeid if (valid) { + this.saveBtnDisable = true addDevice(this.deviceForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -187,14 +189,18 @@ type: 'info' }).then(() => { this.resetForm() + this.saveBtnDisable = false this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) }).catch(() => { this.$emit('watchChild') this.dialogFormVisible = false + this.saveBtnDisable = false }) } + }).catch(_ => { + this.saveBtnDisable = false }) } }) diff --git a/src/views/nbDevice/editNbDevice.vue b/src/views/nbDevice/editNbDevice.vue index de7d53e..ed414d7 100644 --- a/src/views/nbDevice/editNbDevice.vue +++ b/src/views/nbDevice/editNbDevice.vue @@ -70,7 +70,7 @@ @@ -110,6 +110,7 @@ showDeviceType: true, // 是否显示设备类型选项 showModelType: true, // 是否显示型号选项 isEditMode: false, + saveBtnDisable: false, rules: { name: [{ required: true, message: '设备名称不能为空', trigger: ['blur', 'change'] }], devcode: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], @@ -179,6 +180,7 @@ this.$refs['dataForm'].validate((valid) => { this.deviceForm.verifyCode = this.deviceForm.nodeid if (valid) { + this.saveBtnDisable = true addDevice(this.deviceForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -187,14 +189,18 @@ type: 'info' }).then(() => { this.resetForm() + this.saveBtnDisable = false this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) }).catch(() => { this.$emit('watchChild') this.dialogFormVisible = false + this.saveBtnDisable = false }) } + }).catch(_ => { + this.saveBtnDisable = false }) } }) diff --git a/src/views/wellManage/addWell.vue b/src/views/wellManage/addWell.vue index d2780e6..c211b7d 100644 --- a/src/views/wellManage/addWell.vue +++ b/src/views/wellManage/addWell.vue @@ -374,7 +374,10 @@ }, // 保存数据 saveData: function() { - for (const image of this.fileList) { + this.wellForm.photos = '' + const count = this.fileList.length < 4 ? this.fileList.length : 4 + for (let i = 0; i < count; i++) { + const image = this.fileList[i] this.wellForm.photos += image.url + ';' } // 如果责任部门不选,则用权属作为责任部门 diff --git a/src/views/nbDevice/editNbDevice.vue b/src/views/nbDevice/editNbDevice.vue index de7d53e..ed414d7 100644 --- a/src/views/nbDevice/editNbDevice.vue +++ b/src/views/nbDevice/editNbDevice.vue @@ -70,7 +70,7 @@ @@ -110,6 +110,7 @@ showDeviceType: true, // 是否显示设备类型选项 showModelType: true, // 是否显示型号选项 isEditMode: false, + saveBtnDisable: false, rules: { name: [{ required: true, message: '设备名称不能为空', trigger: ['blur', 'change'] }], devcode: [{ required: true, message: '设备编号不能为空', trigger: ['blur', 'change'] }], @@ -179,6 +180,7 @@ this.$refs['dataForm'].validate((valid) => { this.deviceForm.verifyCode = this.deviceForm.nodeid if (valid) { + this.saveBtnDisable = true addDevice(this.deviceForm).then(response => { if (response.code === 200) { this.$confirm('新增成功,是否继续新增?', '提示', { @@ -187,14 +189,18 @@ type: 'info' }).then(() => { this.resetForm() + this.saveBtnDisable = false this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) }).catch(() => { this.$emit('watchChild') this.dialogFormVisible = false + this.saveBtnDisable = false }) } + }).catch(_ => { + this.saveBtnDisable = false }) } }) diff --git a/src/views/wellManage/addWell.vue b/src/views/wellManage/addWell.vue index d2780e6..c211b7d 100644 --- a/src/views/wellManage/addWell.vue +++ b/src/views/wellManage/addWell.vue @@ -374,7 +374,10 @@ }, // 保存数据 saveData: function() { - for (const image of this.fileList) { + this.wellForm.photos = '' + const count = this.fileList.length < 4 ? this.fileList.length : 4 + for (let i = 0; i < count; i++) { + const image = this.fileList[i] this.wellForm.photos += image.url + ';' } // 如果责任部门不选,则用权属作为责任部门 diff --git a/src/views/wellManage/listWell.vue b/src/views/wellManage/listWell.vue index 374190d..ffe7b2b 100644 --- a/src/views/wellManage/listWell.vue +++ b/src/views/wellManage/listWell.vue @@ -133,7 +133,7 @@ align: 'center' }, { - text: '位置', + text: '详细地址', value: 'position', align: 'center' }, @@ -149,7 +149,7 @@ align: 'center' }, { - text: '井下设备数', + text: '设备数量', value: 'deviceCount', width: 100, align: 'center',