qinxianzhangyao
2024-06-11 e19defd15577e70c8e55593d7fe44bab1cbe1a66
src/views/system/package/index.vue
@@ -640,7 +640,6 @@
  components: { Packages },
  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("");
@@ -696,6 +695,7 @@
      newproName: [],
      // 所有体检项目·
      allList: [],
      treeList: [],
      // 所有套餐数据
      // allpackage:[],
      // 弹出层标题
@@ -794,7 +794,6 @@
      });
    },
    sel(val) {
      console.log(val);
      let id = val;
      this.keys = "";
      id.forEach((item) => {
@@ -808,9 +807,7 @@
        this.categoryList = response.rows;
      });
    },
    shangpin(vals) {
      console.log(vals);
    },
    shangpin(vals) {},
    // 取消按钮
    cancel() {
      this.open = false;
@@ -928,7 +925,7 @@
      // });
      getPacInFo(this.forms.pacId).then((response) => {
        this.form = response.data;
        this.form.keywords=this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.split(",");
        this.DataList = [];
        this.checkedkey = [];
@@ -942,7 +939,7 @@
      this.open = true;
      getPacInFo(row.pacId).then((response) => {
        this.form = response.data;
        this.form.keywords=this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.slice(0, -1);
        this.form.keywords = this.form.keywords.split(",");
        this.DataList = [];
        this.checkedkey = [];
@@ -1031,7 +1028,6 @@
    },
    //  // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 }
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      // console.log(row, column, rowIndex, columnIndex);
      let fields = ["propinName"];
      let cellValue = row[column.property];
      if (cellValue && fields.includes(column.property)) {
@@ -1100,7 +1096,6 @@
      });
    },
    handleCurrentChecked(data, checked, checkedNodes) {
      console.log(data, checked);
      this.dataObj = data;
      this.checkedObj = checked;
      if (checked == true) {
@@ -1136,7 +1131,6 @@
            item.disabled = true;
          });
          this.checkedListkey = [];
          console.log(this.TreedataList.length);
          this.DataList.forEach((item, index) => {
            if (item.proParentId == this.dataObj.proId) {
              this.DataList.splice(index, this.TreedataList.length);
@@ -1207,7 +1201,16 @@
      if (this.form.pacName) {
        this.form.tjProjectList = [];
        if (this.DataList.length != 0) {
          this.DataList.forEach((item) => {
          this.treeList = JSON.parse(JSON.stringify(this.DataList));
          for (var i = 0; i < this.treeList.length; i++) {
            for (var j = i + 1; j < this.treeList.length; j++) {
              if (this.treeList[i].proParentId == this.treeList[j].proParentId) {
                this.treeList.splice(j, 1);
                j--;
              }
            }
          }
           this.treeList.forEach((item) => {
            this.form.tjProjectList.push({
              // id: 0,
              proName: item.propinName,
@@ -1226,12 +1229,12 @@
              // } else {
              //   this.form.pacStatus = 1;
              // }
              if(this.keys){
              if (this.keys) {
                this.form.keywords = this.keys;
              }else{
              } else {
                this.form.keywords = this.form.keywords.toString();
              }
              updatePackage(this.form).then((response) => {
                this.$modal.msgSuccess("修改成功");
                this.open = false;
@@ -1244,7 +1247,6 @@
              // } else {
              //   this.form.pacStatus = 1;
              // }
              // console.log(this.form.tjProjectList);
              // return;
              addPackage(this.form).then((response) => {
                this.$modal.msgSuccess("新增成功");