|
|
@@ -55,7 +55,7 @@
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label"> 网络状态</template>
|
|
|
- {{ basicInfo.networkStatus == 1 ? '在线' : '离线' }}
|
|
|
+ {{ basicInfo.networkStatus === 1 ? '在线' : ( basicInfo.networkStatus === 0 ?'离线':'') }}
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
|
|
|
@@ -87,10 +87,10 @@
|
|
|
<div class="basic-details-title border-none">
|
|
|
<span class="border-span">文档信息</span>
|
|
|
</div>
|
|
|
- <!-- <div class="upload-container">
|
|
|
+ <div class="upload-container">
|
|
|
<div class="img-box">
|
|
|
<img
|
|
|
- src="~@/assets/img/upload-placeholder.svg"
|
|
|
+ src="~@/assets/upload-placeholder.svg"
|
|
|
alt=""
|
|
|
v-if="!imageUrl"
|
|
|
/>
|
|
|
@@ -98,7 +98,7 @@
|
|
|
</div>
|
|
|
<div class="file-list">
|
|
|
<div
|
|
|
- :class="{ disabled: !item.accessUrl }"
|
|
|
+ :class="{ disabled: !item.storePath }"
|
|
|
@click="openfile(item)"
|
|
|
v-for="(item, index) in fileList"
|
|
|
:key="index"
|
|
|
@@ -107,7 +107,7 @@
|
|
|
{{ item.t_name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<div class="basic-details-title border-none">
|
|
|
<span class="border-span">物联参数</span>
|
|
|
</div>
|
|
|
@@ -165,7 +165,8 @@
|
|
|
|
|
|
<script>
|
|
|
import { getAssetInfo } from '@/api/ledgerAssets';
|
|
|
- // import { imageView, fileSystemDownload } from '@/utils'
|
|
|
+ import { getImageUrl } from '@/utils/file.js';
|
|
|
+ import { getFile } from '@/api/system/file/index.js';
|
|
|
// import DetailsDialog from '@/views/ledgerAssets/components/outstoreDetailsDialog.vue'
|
|
|
export default {
|
|
|
props: ['id'],
|
|
|
@@ -233,33 +234,24 @@
|
|
|
this.basicInfo = data.category;
|
|
|
if (data.attUrl && data.attUrl.length > 0) {
|
|
|
// 文档信息
|
|
|
- // Object.keys(this.attUrl).forEach((n, index) => {
|
|
|
- // if (data.attUrl[index].accessUrl) {
|
|
|
- // this.attUrl[n] = data.attUrl[index];
|
|
|
- // }
|
|
|
- // });
|
|
|
+ data.attUrl.forEach((item, index) => {
|
|
|
+ Object.assign(this.fileList[item.sort - 1], item)
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
// 资产信息
|
|
|
for (const item of this.prodOpt) {
|
|
|
// 地址
|
|
|
if (item.key == 'detailLocation') {
|
|
|
- item.value = data.positionList[0]?.path
|
|
|
- ?.map((i) => i.name)
|
|
|
- .join(',');
|
|
|
+ item.value = data.positionList[0]?.pathName
|
|
|
+ // ?.map((i) => i.name)
|
|
|
+ // .join(',');
|
|
|
} else {
|
|
|
item.value = data[item.key] || this.basicInfo[item.key];
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- console.log('this.prodOpt', this.prodOpt);
|
|
|
-
|
|
|
// 设备图片
|
|
|
- this.imageUrl = data.imageUrl;
|
|
|
- if (this.imageUrl) {
|
|
|
- // imageView(this.imageUrl).then((res) => {
|
|
|
- // this.$refs.UploadImg.setImg(res);
|
|
|
- // });
|
|
|
+ if(typeof data.imageUrl !='string' ){
|
|
|
+ this.imageUrl = getImageUrl(data.imageUrl.storePath)
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -272,8 +264,8 @@
|
|
|
return item.standardCapacity || '';
|
|
|
},
|
|
|
openfile (row) {
|
|
|
- if (row.accessUrl) {
|
|
|
- fileSystemDownload(row);
|
|
|
+ if (row.storePath) {
|
|
|
+ getFile({ objectName: row.storePath }, row.name);
|
|
|
}
|
|
|
},
|
|
|
// 打开详情弹窗
|
|
|
@@ -288,9 +280,9 @@
|
|
|
},
|
|
|
// 设备位置
|
|
|
initDetailLocation (val) {
|
|
|
- console.log(val);
|
|
|
+ // console.log(val);
|
|
|
let list = String(val)
|
|
|
- .split('/')
|
|
|
+ .split(',')
|
|
|
.filter((n) => {
|
|
|
return n !== 'null';
|
|
|
});
|
|
|
@@ -338,10 +330,9 @@
|
|
|
height: 57px;
|
|
|
text-align: center;
|
|
|
line-height: 55px;
|
|
|
- border: 1px solid var(--mainColor);
|
|
|
- color: var(--mainColor);
|
|
|
+ border: 1px solid #1890ff;
|
|
|
+ color: #1890ff;
|
|
|
cursor: pointer;
|
|
|
-
|
|
|
&.disabled {
|
|
|
cursor: not-allowed;
|
|
|
border-color: rgba(215, 215, 215, 1);
|