2
lkk
2025-04-09 7db11f1ecbe7df37eb1a8adfdfadc8b654d46522
src/components/proposal/index.vue
@@ -38,6 +38,38 @@
      </el-form>
      <el-table
        v-if="tjproposal == '0'"
        :data="advicerulesList"
        ref="elTable"
        v-loading="loading"
        @selection-change="handleSelectionChange"
        border
        height="500px"
      >
        <el-table-column type="selection" width="40" align="center" />
        <el-table-column label="科室" width="70" align="center" prop="ks" />
        <el-table-column
          label="建议名称"
          width="120"
          align="center"
          prop="jymc"
        />
        <el-table-column label="建议内容" align="left" prop="jynr" />
      </el-table>
      <div class="pag" v-if="tjproposal == '0'">
        <div class="pag1">
          <pagination
            v-show="total1 > 0"
            :total="total1"
            :page.sync="queryParams1.pageNum"
            :limit.sync="queryParams1.pageSize"
            @pagination="radiotjproposalChange"
          />
        </div>
      </div>
      <el-table
        v-if="tjproposal == '1'"
        :data="dataList"
        ref="elTable"
        v-loading="loading"
@@ -62,7 +94,7 @@
          prop="createTime"
        /> -->
      </el-table>
      <div class="pag">
      <div class="pag"  v-if="tjproposal == '1'">
        <div class="pag1">
          <pagination
            v-show="total > 0"
@@ -86,7 +118,9 @@
  getKjTjAdviceKjbqBySex,
  getCyTjAdviceKjbqBySex,
} from "@/api/hosp/project";
import { listAdvicerules } from "@/api/hosp/advicerules";
import { getInfo } from "@/api/login";
import { get } from "sortablejs";
export default {
  name: "Packagese",
  props: {
@@ -100,7 +134,9 @@
      // 弹出层标题
      title: "",
      total: 0,
      total1:0,
      dataList: [],
      advicerulesList: [],
      // 遮罩层
      loading: false,
@@ -111,8 +147,14 @@
        userId: "",
        page: 1,
        pageSize: 10,
        jynr: "",
        jybt:""
      },
      queryParams1: {
        pageNum: 1,
        pageSize: 10,
        jymc: "",
        sex: "",
        isZj: "",
        userId: "",
      },
      list: [],
      fList: {},
@@ -128,31 +170,35 @@
      this.getList();
    },
  },
  mounted() {
    // this.getList()
  },
  created() {
    // if( this.queryParams){
    //     this.getList()
    // }
  },
  methods: {
    getAllList() {
      this.loading = true;
      this.openone = true;
      getTjHyBgList(this.queryParams).then((res) => {
      console.log(res,6666);
        this.dataList = res.data.records;
        this.loading = false;
      });
    },
    getList() {
      this.loading = true;
      getKjTjAdviceKjbqBySex(this.queryParams).then((res) => {
      /* getKjTjAdviceKjbqBySex(this.queryParams).then((res) => {
        this.dataList = res.data.records;
        this.total = res.data.total;
        this.loading = false;
      });
      }); */
      listAdvicerules(this.queryParams1)
        .then((response) => {
          this.advicerulesList = response.rows;
          this.total1 = response.total;
          this.loading = false;
        })
        .catch((error) => {
          console.error("筛选快捷建议失败:", error);
          this.$message.error("筛选快捷建议失败");
        });
    },
    handleQuery() {
      this.getAllList();
@@ -166,31 +212,35 @@
      console.log(this.list);
    },
    search() {
      this.queryParams.jybt = this.searchAdv;
      this.queryParams.page = 1;
      this.queryParams1.jymc = this.searchAdv;
      this.queryParams1.pageNum = 1;
      this.loading = true;
      getKjTjAdviceKjbqBySex(this.queryParams).then((res) => {
        this.dataList = res.data.records;
        this.total = res.data.total;
      listAdvicerules(this.queryParams1).then((res) => {
        this.advicerulesList = res.rows;
        this.total1 = res.total;
        this.loading = false;
      });
    },
    radiotjproposalChange() {
      if (this.tjproposal == "0") {
        this.searchAdv = "";
        this.queryParams.isZj = this.fList.isZj;
        this.queryParams.userId = null;
        this.queryParams1.isZj = this.fList.isZj;
        this.queryParams1.userId = null;
        this.getList();
      } else {
        this.loading = true;
        getInfo().then((res) => {
          this.queryParams.userId = res.user.userId;
          this.queryParams.isZj = null;
          getCyTjAdviceKjbqBySex(this.queryParams).then((res) => {
          this.queryParams1.userId = res.user.userId;
          this.queryParams1.isZj = null;
          getCyTjAdviceKjbqBySex(this.queryParams1).then((res) => {
            if (res.data) {
              this.advicerulesList = res.data.records;
              this.total1 = res.data.total;
              this.dataList = res.data.records;
              this.total = res.data.total;
            } else {
              this.advicerulesList = [];
              this.total1 = 0;
              this.dataList = [];
              this.total = 0;
              this.$modal.msgError(res.msg);
@@ -220,7 +270,7 @@
.pag1 {
  width: 30%;
}
::v-deep .el-dialog__body{
::v-deep .el-dialog__body {
  padding: 7px 20px;
}
</style>