|
|
@@ -176,7 +176,7 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody v-if="assetInstances.length > 0">
|
|
|
+ <tbody v-if="assetInstances != null && assetInstances.length > 0">
|
|
|
<tr
|
|
|
v-for="(item, index) in assetInstances"
|
|
|
:key="item.id"
|
|
|
@@ -237,13 +237,12 @@ export default {
|
|
|
const _self = this;
|
|
|
// 根据UUID获取资产的id
|
|
|
var uuid = _self.$route.params.uuid;
|
|
|
- UserStorageResource.uniqueByKey(uuid + '_modelData').then(str => {
|
|
|
- // if(str.errorCode != 0) {
|
|
|
- // Notify.error('提示', str.errorMessage, false);
|
|
|
- // return;
|
|
|
- // }
|
|
|
- if (str.data != null) {
|
|
|
- const modelData = JSON.parse(str.data);
|
|
|
+ UserStorageResource.uniqueByKey(uuid + '_modelData').then(data => {
|
|
|
+ if(data.errorCode != 0) {
|
|
|
+ Notify.error('提示', data.errorMessage, false);
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ let modelData = JSON.parse(data.data);
|
|
|
_self.assetInstanceId = modelData.id;
|
|
|
_self.findByAssetInstanceId();
|
|
|
}
|
|
|
@@ -259,7 +258,12 @@ export default {
|
|
|
findByAssetInstanceId: function () {
|
|
|
const _self = this;
|
|
|
AssetInstanceResource.uniqueAssetInstance(_self.assetInstanceId).then(successData => {
|
|
|
- _self.assetInstance = successData;
|
|
|
+ if(successData.errorCode != 0) {
|
|
|
+ Notify.error('提示', successData.errorMessage, false);
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ _self.assetInstance = successData.data;
|
|
|
+ }
|
|
|
}, errorData => {
|
|
|
Common.processException(errorData);
|
|
|
});
|
|
|
@@ -279,7 +283,7 @@ export default {
|
|
|
_self.loading=true;
|
|
|
AssetInstanceResource.copy(assetInstanceCopyRequest).then(successData => {
|
|
|
if (successData.errorCode == 0) {
|
|
|
- _self.assetInstances = successData.assetInstances;
|
|
|
+ _self.assetInstances = successData.assetSimpleResponses;
|
|
|
_self.copyIsSuccess = true;
|
|
|
_self.loading=false;
|
|
|
Notify.success('资产卡片复制成功', '资产卡片复制成功。', true);
|