| | |
| | | this.isAdd = true; |
| | | var obj = Object.assign({},this.searchDataList[index],{isEdit: true}); |
| | | this.searchDataList.splice(index,1,obj); |
| | | console.log(obj,this.searchDataList[index]) |
| | | }, |
| | | deleteTable(index) { |
| | | this.searchDataList.splice(index,1); |
| | |
| | | this.tableForm.refObjectTypeId = ""; |
| | | }, |
| | | saveBtn() { |
| | | var obj = Object.assign(this.detailobj,this.metaForm); |
| | | console.log(this.searchDataList,'okla'); |
| | | var obj = Object.assign(this.detailobj,this.metaForm); //detailobj物理数据,metaForm基础数据 |
| | | obj.fields = this.searchDataList; |
| | | this.$HTTP.post("/api/blade-system/meta-object-type/submit",obj).then(res=> { |
| | | if(res.code == 200) { |
| | | this.$message.success("保存成功"); |
| | | } |
| | | }) |
| | | }, |
| | | comfirmTable() { |
| | | this.cancelTable(); |
| | | this.tableForm.refObjectTypeIdZn = this.tableForm.dictKey; |
| | | this.tableForm.elementTypeName = this.elementTypeValue; |
| | | this.tableForm.enumType = this.tableForm.enumTypeZn; |
| | | this.tableForm.id = null; |
| | | this.tableForm.objectId = this.detailobj.objectId; |
| | | this.searchDataList.unshift(this.tableForm); |
| | |
| | | gettableName() { |
| | | this.$HTTP.get(`/api/blade-system/meta-object-type/detail?fId=${this.dictKey}`).then(res=> { //物理表数据 |
| | | if(res.code == 200) { |
| | | console.log(this.tableNameList,res.data.tableName,'gi') |
| | | this.tableNameList.forEach(item=> { |
| | | if(res.data.tableName == item.tableName) { |
| | | this.refCodeList = item.tableColumns; |
| | |
| | | this.metaForm.code = res.data.code; |
| | | this.detailobj = res.data; |
| | | this.detailobj.objectId = res.data.fid; |
| | | console.log(this.detailobj,888) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | handleNodeClick1(data) { |
| | | if(this.firstChild.includes(data.id)) return; //一级菜单返回 |
| | | if(this.firstChild.includes(data.id)) { //一级菜单返回 |
| | | this.$nextTick(()=> { |
| | | this.tableForm.refObjectTypeId = ""; |
| | | }) |
| | | return; |
| | | }; |
| | | this.tableForm.refObjectTypeIdZn = data.dictValue; |
| | | this.tableForm.dictKey = data.dictKey; |
| | | }, |
| | | handleNodeClick(data) { |
| | | if(!this.firstChild.includes(data.id)) { |