qinxianzhangyao
2024-05-30 f4e73f262cd8fe054b84d5e99f083fba913e7c94
src/views/system/comp/index.vue
@@ -913,7 +913,6 @@
  ],
  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("");
@@ -940,6 +939,7 @@
      pacList: [],
      dataList: [],
      groupList: [],
      dataLists: [],
      // 非单个禁用
      single: true,
      singleg: true,
@@ -1339,6 +1339,7 @@
    // 单项选定按钮
    resetright() {
      this.queryParams.price = 0;
      // this.dataLists=JSON.parse(JSON.stringify(this.dataList));
      this.dataList.forEach((item) => {
        this.$refs.tre.toggleRowSelection(item, false);
        this.OnenewpacName.push(item);
@@ -1372,23 +1373,25 @@
    // 套餐单项获取
    handleChangeOne(selection) {
      this.pacList = selection;
      this.OnenewpacName = [];
      this.OnenewpacName.forEach((item,index) => {
        this.dataLists.forEach(item1 => {
          if(item.proId == item1.proId){
            this.OnenewpacName.splice(index,1)
          }
        })
      })
      this.dataLists = [];
      this.queryParams.price = 0;
      this.pacList.forEach((item) => {
        item.tjProjectList.forEach(item2 => {
          this.OnenewpacName.push(item2)
        })
        this.dataLists = item.tjProjectList;
      });
      this.dataLists.forEach((item2) => {
        this.OnenewpacName.push(item2);
      });
        this.OnenewpacName.forEach((item) => {
          this.queryParams.price += item.proPrice;
        });
      });
      if(this.dataList.length >= 1){
        console.log(11111)
          this.dataList.forEach(item1 => {
            this.OnenewpacName.push(item1)
          })
          
        }
      if (selection.length > 1) {
        let del_row = selection.shift();
        this.$refs.tbone.toggleRowSelection(del_row, false); //设置这一行取消选中