su
su1124
2023-12-27 c88e4e1bd87b909fdcc927223762a3f7d752fd6c
su
1个文件已修改
12 ■■■■■ 已修改文件
src/views/system/dept/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dept/index.vue
@@ -467,7 +467,7 @@
      // 表单校验
      rules: {
        parentId: [
          { required: true, message: "上级科室不能为空", validator: checkPhoneNum, trigger: "blur" },
          { required: true,  validator: checkPhoneNum, trigger: "blur" },
        ],
        deptName: [
          { required: true, message: "科室名称不能为空", validator: checkPhoneNum, trigger: "blur" },
@@ -663,6 +663,7 @@
      // 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 = "科室信息维护  ";
@@ -688,15 +689,16 @@
      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) => {