qx
2025-04-09 93a6f70b8eb631c6c1faab8f9e8a734669e49e6e
src/views/advice/advice/index.vue
@@ -78,18 +78,20 @@
    <el-row :gutter="20">
      <el-col :span="3" :xs="24">
        <div class="head-container">
          <el-tree
            :data="deptOptions"
            :props="defaultProps"
            :expand-on-click-node="false"
            :filter-node-method="filterNode"
            ref="tree"
            node-key="id"
            default-expand-all
            :default-expanded-keys="treeId"
            highlight-current
            @node-click="handleNodeClick"
          />
          <div class="content">
            <el-tree
              :data="deptOptions"
              :props="defaultProps"
              :expand-on-click-node="false"
              :filter-node-method="filterNode"
              ref="tree"
              node-key="id"
              default-expand-all
              :default-expanded-keys="treeId"
              highlight-current
              @node-click="handleNodeClick"
            />
          </div>
        </div>
      </el-col>
@@ -163,20 +165,18 @@
          </el-table-column>
        </el-table>
        <div class="pag">
      <div class="pag1">
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.page"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </div>
    </div>
          <div class="pag1">
            <pagination
              v-show="total > 0"
              :total="total"
              :page.sync="queryParams.page"
              :limit.sync="queryParams.pageSize"
              @pagination="getList"
            />
          </div>
        </div>
      </el-col>
    </el-row>
    <!-- 添加或修改advice对话框 -->
    <el-dialog
@@ -187,24 +187,24 @@
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="归属科室" prop="deptId">
            <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属科室"
          <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属科室"
              style="width: 200px" /> -->
            <el-select
            v-if="DepartmentList.length > 0"
              v-model="form.deptId"
              placeholder="请选择归属科室"
              clearable
              style="width: 200px"
              filterable
            >
              <el-option
                v-for="dict in DepartmentList"
                :key="dict.deptId"
                :label="dict.deptName || ''"
                :value="dict.deptId"
              />
            </el-select>
          </el-form-item>
          <el-select
            v-if="DepartmentList.length > 0"
            v-model="form.deptId"
            placeholder="请选择归属科室"
            clearable
            style="width: 200px"
            filterable
          >
            <el-option
              v-for="dict in DepartmentList"
              :key="dict.deptId"
              :label="dict.deptName || ''"
              :value="dict.deptId"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="检查项目" prop="proName">
          <el-select
            v-model="form.proId"
@@ -221,7 +221,7 @@
            />
          </el-select>
        </el-form-item>
        <el-form-item label="建议标题" prop="title">
          <el-input v-model="form.title" placeholder="请输入名称标题" />
        </el-form-item>
@@ -276,7 +276,7 @@
</template>
<script>
import { deptTreeSelect ,getDeptListByDictHospId} from "@/api/system/user";
import { deptTreeSelect, getDeptListByDictHospId } from "@/api/system/user";
import {
  listAdvice,
  getAdvice,
@@ -353,7 +353,7 @@
    };
  },
  created() {
    this.sendhospName()
    this.sendhospName();
    this.getDeptTree();
  },
  watch: {
@@ -371,9 +371,8 @@
  },
  methods: {
    sendhospName() {
      getDeptListByDictHospId({
        id: 2000
        id: 2000,
      }).then((res) => {
        this.DepartmentList = res.data;
        this.form.deptId = String(this.form.deptId);
@@ -381,7 +380,8 @@
    },
    // 节点单击事件
    handleNodeClick(data) {
      this.queryParams.deptId = data.id;
      // this.queryParams.deptId = data.id;
      this.queryParams.deptId = null;;
      this.handleQuery();
    },
@@ -392,7 +392,6 @@
    },
    getDeptTree() {
      deptTreeSelect().then((response) => {
        this.deptOptions = response.data;
        this.treeId.push(this.deptOptions[0].id);
        this.queryParams.deptId = this.deptOptions[0].id;
@@ -474,7 +473,7 @@
      this.reset();
      this.title = "体检建议信息维护";
      this.getlistProject();
      this.form.deptId = this.queryParams.deptId
      this.form.deptId = this.queryParams.deptId;
      this.open = true;
    },
    /** 修改按钮操作 */
@@ -489,7 +488,7 @@
        }
        this.getlistProject();
        this.open = true;
        this.form.deptId = this.queryParams.deptId
        this.form.deptId = this.queryParams.deptId;
        this.title = "体检建议信息维护";
      });
    },
@@ -575,4 +574,16 @@
.pag1 {
  width: 30%;
}
.content {
  width: 1000px;
  height: 1000px;
}
.head-container {
  width: 200px;
  height: 629px;
  overflow: auto;
  border: 1px solid #ccc;
  position: relative;
}
</style>