fix(studio): 对晶格任务的资源模型的 model_name 修改了获取路径

Signed-off-by: 李东云 <dongyun.li@luxcreo.ai>
This commit is contained in:
李东云
2022-07-08 16:01:32 +08:00
parent 153c7498cf
commit 490d9d71fc

View File

@@ -38,6 +38,7 @@ use Singularity\HDK\Utils\Resource\ClassicResponse;
* @property float $size 晶格尺寸
* @property float $wide 杆径粗细
* @property int $surfaceNum 面数
* @property string|null $modelName
* @property int $fieldId
* @property Field $field
* @property LatticeResource $lattice
@@ -68,7 +69,7 @@ final class Lattice extends JsonResource
return [
'fieldZh' => $this->field?->nameZh,
'fieldEn' => $this->field?->nameEn,
'modelName' => $this->source?->name,
'modelName' => $this->modelName ?? $this->source?->name,
'action' => is_null($action) ? null : $action,
'lattice' => $this->when(!empty($this->lattice), $this->lattice?->title),
'scalingRatio' => $this->scalingRatio,