| | |
| | | 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(""); |
| | |
| | | newproName: [], |
| | | // 所有体检项目· |
| | | allList: [], |
| | | treeList: [], |
| | | // 所有套餐数据 |
| | | // allpackage:[], |
| | | // 弹出层标题 |
| | |
| | | }); |
| | | }, |
| | | sel(val) { |
| | | console.log(val); |
| | | let id = val; |
| | | this.keys = ""; |
| | | id.forEach((item) => { |
| | |
| | | this.categoryList = response.rows; |
| | | }); |
| | | }, |
| | | shangpin(vals) { |
| | | console.log(vals); |
| | | }, |
| | | shangpin(vals) {}, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | |
| | | // }); |
| | | 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 = []; |
| | |
| | | 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 = []; |
| | |
| | | }, |
| | | // // 默认接受四个值 { 当前行的值, 当前列的值, 行的下标, 列的下标 } |
| | | 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)) { |
| | |
| | | }); |
| | | }, |
| | | handleCurrentChecked(data, checked, checkedNodes) { |
| | | console.log(data, checked); |
| | | this.dataObj = data; |
| | | this.checkedObj = checked; |
| | | if (checked == true) { |
| | |
| | | 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); |
| | |
| | | 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, |
| | |
| | | // } 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; |
| | |
| | | // } else { |
| | | // this.form.pacStatus = 1; |
| | | // } |
| | | // console.log(this.form.tjProjectList); |
| | | // return; |
| | | addPackage(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |