LaiTool V3.0.3
This commit is contained in:
@@ -294,4 +294,24 @@ export class BookTaskDetailService extends BaseRealmService {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除MJ中生成图片的所有的信息,包括 outImagePath subImagePath mjMessage (mjMessage是另一张表,要单独生成)
|
||||
* @param bookTaskDetailId
|
||||
*/
|
||||
DeleteBoookTaskDetailGenerateImage(bookTaskDetailId: string): void {
|
||||
this.transaction(() => {
|
||||
let bookTaskDetail = this.realm.objectForPrimaryKey<BookTaskDetailModel>('BookTaskDetail', bookTaskDetailId)
|
||||
if (bookTaskDetail == null) {
|
||||
throw new Error("没有找到要删除的分镜信息")
|
||||
}
|
||||
if (bookTaskDetail.mjMessage) {
|
||||
this.realm.delete(bookTaskDetail.mjMessage)
|
||||
}
|
||||
bookTaskDetail.mjMessage = undefined
|
||||
bookTaskDetail.outImagePath = undefined;
|
||||
bookTaskDetail.subImagePath = []
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user