url = {
createIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents",
getIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents",
- deleteIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents",
+ deleteIntentManagement: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents/",
+ updateIntentManagementData: this.baseUrl + "/api/usecaseui-intent-analysis/v1/intents/"
};
// intentManagement
return this.http.post<any>(this.url["createIntentManagement"], requestBody);
}
deleteIntentManagementData(intentId) {
- let params = new HttpParams({ fromObject: { "intentId": intentId } });
- return this.http.delete<any>(this.url.deleteIntentManagement, { params });
-}
+ return this.http.delete<any>(this.url.deleteIntentManagement + intentId);
+ }
+ updateIntentManagementData(id, requestBody) {//更新接口未完成
+ return this.http.put<any>(this.url.updateIntentManagementData + id, requestBody);
+ }
}
this.modalOpreation.emit({ "cancel": true });
}
handleOk(): void {
- this.showModel = false;
if(JSON.stringify(this.editIntentTableData)==='{}'){
this.defaultParams['intentId']=this.Util.getUuid()
+ this.createIntentInstance()
+ }else{
+ this.editIntentInstanceData()
}
- this.createIntentInstance()
- this.modalOpreation.emit({ "cancel": false, "param": this.defaultParams });
this.clearIntentData()
}
clearIntentData(): void{
...this.defaultParams
}).subscribe(
(response) => {
+ this.showModel = false;
this.modalOpreation.emit({ "cancel": false });
},
(err) => {
}
)
}
+ editIntentInstanceData(): void {
+ let id = this.defaultParams['intentId'];
+ let obj = this.defaultParams;
+ this.myhttp.updateIntentManagementData(id,obj).subscribe(
+ (response) => {
+ this.showModel = false;
+ this.modalOpreation.emit({ "cancel": false});
+ },
+ (err) => {
+ console.log(err);
+ }
+ )
+ }
}
\ No newline at end of file
if ($event.cancel) {
return;
}
- if(this.currentIndex>-1){
- this.listOfData[this.currentIndex]=$event.param
- this.currentIndex=-1
- }
this.getIntentManagementData()
}
editIntentList(data,i): void {