qinxianzhangyao
2024-02-27 13a9015a85303de6e6dd4379f31621b0877672a3
src/views/hosp/project/index.vue
@@ -291,8 +291,9 @@
        label-width="100px"
        :inline="true"
      >
        <el-form-item label="主项名称" prop="proParentId">
        <el-form-item label="主项名称" prop="proParentId"  >
          <treeselect
          :disabled="proParent"
            v-model="form.proParentId"
            :options="projectOptions"
            :normalizer="normalizer"
@@ -300,6 +301,7 @@
            placeholder="选择主项名称"
            style="width: 260px"
            @select="obtain"
          />
        </el-form-item>
        <el-form-item label="明细项目" prop="proName" v-if="key == 'Y'">
@@ -391,15 +393,15 @@
          <el-select
            v-model="form.deptId"
            placeholder="请选择科室名称"
            @change="changeValue"
            @change="$forceUpdate()"
            filterable
            style="width: 260px"
          >
            <el-option
              v-for="dict in parentNameList"
              :key="dict.deptId"
              :label="dict.deptName"
              :value="dict.deptId"
              v-for="item in parentNameList"
              :key="item.deptId"
              :label="item.deptName"
              :value="item.deptId"
            />
          </el-select>
        </el-form-item>
@@ -817,6 +819,7 @@
  addProject,
  updateProject,
  ProjectTree,
  getlist,
  deptTree,
  deptTree111,
  getAllChildListById,
@@ -920,6 +923,7 @@
        children: "children",
        label: "label",
      },
      proParent:false,
      id: "",
      // 重新渲染表格状态
      refreshTable: true,
@@ -1071,7 +1075,8 @@
      this.form.proPrice = 0.0;
      this.form.proName = "";
      this.form.proId = null;
      ProjectTree().then((response) => {
      //  ProjectTree
      getlist().then((response) => {
        if (response.code == 200) {
          this.loading = false;
          this.projectOptions = [];
@@ -1087,8 +1092,13 @@
          }
        }
      });
      this.title = "体检项目信息维护";
      this.form.deptId = this.queryParams.deptId;
      if(this.queryParams.deptId){
        this.form.deptId = this.queryParams.deptId;
      }else{
        this.form.deptId = null
      }
      // this.form.proId = this.queryParams.proId;
      this.form.proCheckMethod = "N";
@@ -1233,7 +1243,7 @@
    },
    // 节点单击事件
    handleNodeClick(date) {
      if (date.$treeNodeId == 3) {
      if (date.qf == "0") {
        this.xiugais = true;
      } else {
        this.xiugais = false;
@@ -1459,6 +1469,21 @@
    handleUpdate1() {
      this.open = true;
      this.form = this.xiugaiList;
      // console.log( this.form )
      this.proParent = true
      // if(){
      //   this.proParent = true
      // }
      getlist().then((response) => {
        if (response.code == 200) {
          this.loading = false;
          this.projectOptions = [];
          const project = { proId: 0, proName: "主类目", children: [] };
          project.children = this.handleTree(response.data.list, "proId");
          this.key = response.data.key;
          this.projectOptions.push(project);
        }
      })
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
@@ -1466,6 +1491,7 @@
      this.getData();
      // this.form = row;
      const proId = row.proId || this.ids;
      this.proParent =false
      getProject(proId).then((response) => {
        this.form = response.data;
        if (this.form.proParentId === "0") {
@@ -1475,7 +1501,7 @@
          this.showPrise = false;
          this.showRentPrise = true;
        }
        this.form.deptId = Number(this.form.deptId);
        // this.form.deptId = Number(this.form.deptId);
        if (this.form.proStandard === 0) {
          this.showPrise = true;
          this.showRentPrise = false;
@@ -1518,7 +1544,16 @@
            }
          });
        }
        getlist().then((response) => {
        if (response.code == 200) {
          this.loading = false;
          this.projectOptions = [];
          const project = { proId: 0, proName: "主类目", children: [] };
          project.children = this.handleTree(response.data.list, "proId");
          this.key = response.data.key;
          this.projectOptions.push(project);
        }
      })
        this.open = true;
        this.title = "体检项目信息维护";
      });
@@ -1594,8 +1629,14 @@
              this.form.lisXmbm = this.form.lisXmbm;
              updateProject(this.form).then((response) => {
                this.$modal.msgSuccess("修改成功");
                this.cancel();
                if(this.proParent == true){
                  this.getDeptTree();
                  this.cancel();
                }else{
                  this.cancel();
                this.getList();
                }
              });
            } else {
              if (this.form.proParentId === 0) {
@@ -1658,8 +1699,14 @@
              this.form.lisXmbm = this.form.lisXmbm;
              updateProject(this.form).then((response) => {
                this.$modal.msgSuccess("修改成功");
                this.cancel();
                if(this.proParent == true){
                  this.getDeptTree();
                  this.cancel();
                }else{
                  this.cancel();
                this.getList();
                }
              });
            } else {
              if (this.form.proParentId === 0) {