1
wwl
2025-04-03 7101e7b6b22ebdf30168442e49f6470a454261de
src/views/system/comp/index.vue
@@ -1,35 +1,17 @@
<template>
  <div class="app-container">
    <el-dialog title="选择套餐" :visible.sync="taocan" width="70%" height="700px" :close-on-click-modal="false">
  <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" label-width="auto">
      <!-- <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" label-width="auto">
    <el-form-item label="套餐名称" prop="pacName">
      <el-input
        v-model="queryParam.pacName"
        placeholder="请输入套餐名称"
        clearable
        @keyup.enter.native="handle"
        style="width: 200px"
      />
          <el-input v-model="queryParam.pacName" placeholder="请输入套餐名称" clearable @keyup.enter.native="handle"
            style="width: 200px" />
    </el-form-item>
    <el-form-item>
      <el-button
        type="primary"
        icon="el-icon-search"
        size="mini"
        @click="handle"
      >搜索</el-button>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handle">搜索</el-button>
    </el-form-item>
  </el-form>
  <el-table
    v-loading="loading"
    element-loading-text="正在加载中..."
    element-loading-spinner="el-icon-loading"
    border
    :data="newpacName1"
    @selection-change="handleSelectionChange1"
    height="450px"
    ref="tb"
  >
      </el-form> -->
      <el-table v-loading="loading" element-loading-text="正在加载中..." element-loading-spinner="el-icon-loading" border
        :data="newpacName1" @selection-change="handleSelectionChange1" height="450px" ref="tb">
    <el-table-column type="selection" width="40px" align="center" label="选择" />
    <el-table-column label="套餐名称" align="center" prop="pacName" width="120px" />
    <el-table-column label="套餐价格" align="center" prop="price" width="120px" />
@@ -803,6 +785,22 @@
    this.getList();
  },
  methods: {
    handle() {
      this.loading = true;
      deptTreeSelect(this.forms.sex, this.queryParam).then((res) => {
        if (res.rows) {
          this.newpacName1 = res.rows; // 更新套餐列表
        } else {
          this.newpacName1 = [];
        }
        this.loading = false;
      }).catch(() => {
        this.loading = false;
        this.$modal.msgError("搜索失败,请稍后重试");
      });
    },
    handleSelectionChange1(selection) {
  // 实现单选逻辑
  if (selection.length > 1) {