| | |
| | | style="width: 200px" |
| | | clearable |
| | | filterable |
| | | @change="$forceUpdate()" |
| | | > |
| | | <el-option |
| | | v-for="dict in deptOption" |
| | | :key="dict.label" |
| | | :key="dict.id" |
| | | :label="dict.label" |
| | | :value="dict.id" |
| | | ></el-option> |
| | |
| | | v-for="dict in hospList" |
| | | :key="dict.hospAreaName" |
| | | :label="dict.hospAreaName" |
| | | :value="dict.hospAreaName" |
| | | :value="dict.hospAreaId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | placeholder="请输入标准科室" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="科室类型" prop="deptTypeCode"> |
| | | <el-form-item label="科室类型" prop="parentOrgType"> |
| | | <el-select |
| | | v-model="form.parentOrgType" |
| | | placeholder="请选择科室类型" |
| | |
| | | components: { Treeselect }, |
| | | data() { |
| | | let checkPhoneNum = (rule, value, callback) => { |
| | | console.log(value); |
| | | let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); |
| | | if (value == "" && value == undefined && !value) { |
| | | return callback(""); |
| | |
| | | // 表单校验 |
| | | rules: { |
| | | parentId: [ |
| | | { required: true, message: "上级科室不能为空", validator: checkPhoneNum, trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | deptName: [ |
| | | { required: true, message: "科室名称不能为空", validator: checkPhoneNum, trigger: "blur" }, |
| | |
| | | // console.log(11111) |
| | | // this.reset(); |
| | | this.form = row; |
| | | console.log(this.form ) |
| | | // this.form.parentId = this.form.parentId.toString() |
| | | this.form.parentId = this.form.parentId.toString() |
| | | if(this.form.parentId == 0){ |
| | | this.deptOption.push({ "id": 0, "label": "主类目", }); |
| | | } |
| | |
| | | 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) => { |