| | |
| | | // 表单校验 |
| | | rules: { |
| | | parentId: [ |
| | | { required: true, message: "上级科室不能为空", validator: checkPhoneNum, trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | deptName: [ |
| | | { required: true, message: "科室名称不能为空", validator: checkPhoneNum, trigger: "blur" }, |
| | |
| | | // this.form.parentId = this.form.parentId.toString() |
| | | if(this.form.parentId == 0){ |
| | | this.deptOption.push({ "id": 0, "label": "主类目", }); |
| | | console.log(this.deptOption); |
| | | } |
| | | this.open = true; |
| | | this.title = "科室信息维护 "; |
| | |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.deptId != undefined) { |
| | | // if(this.form.hospId && this.form.hospCode){ |
| | | if(this.form.hospId ){ |
| | | console.log(this.form); |
| | | updateDept(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | // }else{ |
| | | // this.$modal.msgError("请填写带星号"); |
| | | // } |
| | | }else{ |
| | | this.$modal.msgError("请填写带星号"); |
| | | } |
| | | |
| | | } else { |
| | | this.hospList.forEach((element) => { |