|
@@ -40,13 +40,13 @@
|
|
|
<el-table-column label="物联标识" prop="deviceTypeKey" width="200" show-overflow-tooltip/>
|
|
|
<el-table-column label="小图标" align="left" prop="icon" width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <img v-if="scope.row.icon" style="height:24px;width:24px;" :src="scope.row.icon">
|
|
|
+ <img v-if="scope.row.icon" style="height:24px;width:24px;" :src="fileBrowseEnvironment+scope.row.icon">
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="大图标" align="left" prop="exceptionIcon" width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <img v-if="scope.row.exceptionIcon" style="height:24px;width:24px;" :src="scope.row.exceptionIcon">
|
|
|
+ <img v-if="scope.row.exceptionIcon" style="height:24px;width:24px;" :src="fileBrowseEnvironment+scope.row.exceptionIcon">
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -149,7 +149,7 @@
|
|
|
:headers="headers"
|
|
|
:before-upload="(file)=>beforeAvatarUpload(file)">
|
|
|
<div class="center-img" style="margin-left:20px;">
|
|
|
- <img v-if="dialogForm.icon" :src="dialogForm.icon" style="max-width:40px;max-height:40px;">
|
|
|
+ <img v-if="dialogForm.icon" :src="fileBrowseEnvironment+dialogForm.icon" style="max-width:40px;max-height:40px;">
|
|
|
<p v-if="!dialogForm.icon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#0183FA;"></p>
|
|
|
</div>
|
|
|
</el-upload>
|
|
@@ -164,7 +164,7 @@
|
|
|
:headers="headers"
|
|
|
:before-upload="(file)=>beforeAvatarUpload(file)">
|
|
|
<div class="center-img" style="margin-left:20px;">
|
|
|
- <img v-if="dialogForm.exceptionIcon" :src="dialogForm.exceptionIcon" style="max-width:40px;max-height:40px;">
|
|
|
+ <img v-if="dialogForm.exceptionIcon" :src="fileBrowseEnvironment+dialogForm.exceptionIcon" style="max-width:40px;max-height:40px;">
|
|
|
<p v-if="!dialogForm.exceptionIcon" class="el-icon-upload" style="text-align: center;line-height:40px;font-size:30px;color:#E65D6E;"></p>
|
|
|
</div>
|
|
|
</el-upload>
|
|
@@ -244,6 +244,8 @@
|
|
|
},
|
|
|
//物联分类下拉列表
|
|
|
iotTypeOptions:[],
|
|
|
+ // 文件服务地址
|
|
|
+ fileBrowseEnvironment:window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment'),
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -308,10 +310,6 @@
|
|
|
this.$set(this,'loading',true);
|
|
|
let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
|
iotHardwareTypeList(obj).then(response => {
|
|
|
- response.data.records.forEach((item)=>{
|
|
|
- item.icon = item.icon?window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.icon:null;
|
|
|
- item.exceptionIcon = item.exceptionIcon?window.location.href.split('://')[0]+'://'+localStorage.getItem('fileBrowseEnvironment')+item.exceptionIcon:null;
|
|
|
- })
|
|
|
this.$set(this,'loading',false);
|
|
|
this.$set(this,'dataList',response.data.records);
|
|
|
this.$set(this,'total',response.data.total);
|