| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm" :disabled="disabled">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </Dialog> |
| | |
| | | <Dialog :title="title" :visible.sync="uploadFlag" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="附件"> |
| | | <fileUpload v-model="form.filePath" limit="1"/> |
| | | <fileUpload v-model="form.filePath" :limit="1"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getManufacturerList(); |
| | | |
| | | }, |
| | | methods: { |
| | | getManufacturerList() { |
| | | listManufacturer().then(res => { |
| | | this.manufacturerList = res.data |
| | | this.manufacturerList = res.data; |
| | | }) |
| | | }, |
| | | /** 查询外设单元列表 */ |
| | |
| | | this.peripheralUnitList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | this.getManufacturerList(); |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | |
| | | this.loading = false; |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改外设单元"; |
| | | this.title = "查看外设单元"; |
| | | }); |
| | | }, |
| | | /** 修改按钮操作 */ |
| | |
| | | this.loading = true; |
| | | this.disabled = false |
| | | this.reset(); |
| | | this.getManufacturerList(); |
| | | //this.getManufacturerList(); |
| | | const id = row.id || this.ids |
| | | getPeripheralUnit(id).then(response => { |
| | | this.loading = false; |
| | | this.form = response.data; |
| | | this.form.manufacturer = parseInt(this.form.manufacturer); |
| | | this.open = true; |
| | | this.title = "修改外设单元"; |
| | | }); |
| | |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if(this.uploadFlag){ |
| | | if(!this.form.filePath){ |
| | | this.$modal.msgWarning("请选择上传附件"); |
| | | return; |
| | | } |
| | | } |
| | | this.buttonLoading = true; |
| | | if (this.form.id != null) { |
| | | updatePeripheralUnit(this.form).then(response => { |