20251204修改数据管理小班多媒体及属性查看功能
This commit is contained in:
@@ -135,18 +135,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</p>
|
</p>
|
||||||
<featureInfo :data="Info" style="margin: 0 auto"/>
|
<featureInfo :data="Info" style="margin: 0 auto"/>
|
||||||
<div class="button-group">
|
<div class="button-group" v-if="currentFeatureId && Object.keys(Info).length > 0">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
class="dateBtn"
|
class="dateBtn"
|
||||||
@click="getGeoJson()"
|
@click="ifsub ? getGeoJson() : getSubGeoJson()"
|
||||||
>返回父表
|
>{{ ifsub ? '返回父表' : '进入子表' }}
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
class="dateBtn"
|
|
||||||
@click="getSubGeoJson()"
|
|
||||||
>进入子表
|
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
@@ -1175,6 +1169,40 @@ export default {
|
|||||||
}
|
}
|
||||||
jsondata.imagedata = imagedata
|
jsondata.imagedata = imagedata
|
||||||
jsondata.videodata = videodata
|
jsondata.videodata = videodata
|
||||||
|
|
||||||
|
// 处理字典数组:将属性值为字典数组的字段转换为 value 值
|
||||||
|
for (var key in jsondata) {
|
||||||
|
// 排除特殊字段
|
||||||
|
if (key === 'imagedata' || key === 'videodata' || key === 'mediaFileURLs' || key === 'id') {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var value = jsondata[key]
|
||||||
|
// 检查是否为字符串且可能是JSON格式
|
||||||
|
if (typeof value === 'string' && value.trim().startsWith('[') && value.trim().endsWith(']')) {
|
||||||
|
try {
|
||||||
|
var parsed = JSON.parse(value)
|
||||||
|
// 检查是否为数组且数组元素是对象
|
||||||
|
if (Array.isArray(parsed) && parsed.length > 0 && typeof parsed[0] === 'object' && parsed[0] !== null) {
|
||||||
|
// 提取所有 value 值,用逗号连接
|
||||||
|
var values = parsed.map(function(item) {
|
||||||
|
// 如果 value 存在且不为空,返回 value;否则返回空字符串
|
||||||
|
if (item.value !== undefined && item.value !== null && item.value !== '') {
|
||||||
|
return item.value
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}).filter(function(v) {
|
||||||
|
return v !== ''
|
||||||
|
})
|
||||||
|
// 如果所有值都为空,设置为空字符串;否则用逗号连接
|
||||||
|
jsondata[key] = values.length > 0 ? values.join(', ') : ''
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// 如果解析失败,保持原值
|
||||||
|
console.warn('Failed to parse dictionary array for key:', key, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
that.Info = jsondata
|
that.Info = jsondata
|
||||||
} else if (response.data.status === '401') {
|
} else if (response.data.status === '401') {
|
||||||
that.$alert(response.data.message)
|
that.$alert(response.data.message)
|
||||||
@@ -1217,6 +1245,40 @@ export default {
|
|||||||
}
|
}
|
||||||
jsondata.imagedata = imagedata
|
jsondata.imagedata = imagedata
|
||||||
jsondata.videodata = videodata
|
jsondata.videodata = videodata
|
||||||
|
|
||||||
|
// 处理字典数组:将属性值为字典数组的字段转换为 value 值
|
||||||
|
for (var key in jsondata) {
|
||||||
|
// 排除特殊字段
|
||||||
|
if (key === 'imagedata' || key === 'videodata' || key === 'mediaFileURLs' || key === 'id') {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var value = jsondata[key]
|
||||||
|
// 检查是否为字符串且可能是JSON格式
|
||||||
|
if (typeof value === 'string' && value.trim().startsWith('[') && value.trim().endsWith(']')) {
|
||||||
|
try {
|
||||||
|
var parsed = JSON.parse(value)
|
||||||
|
// 检查是否为数组且数组元素是对象
|
||||||
|
if (Array.isArray(parsed) && parsed.length > 0 && typeof parsed[0] === 'object' && parsed[0] !== null) {
|
||||||
|
// 提取所有 value 值,用逗号连接
|
||||||
|
var values = parsed.map(function(item) {
|
||||||
|
// 如果 value 存在且不为空,返回 value;否则返回空字符串
|
||||||
|
if (item.value !== undefined && item.value !== null && item.value !== '') {
|
||||||
|
return item.value
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}).filter(function(v) {
|
||||||
|
return v !== ''
|
||||||
|
})
|
||||||
|
// 如果所有值都为空,设置为空字符串;否则用逗号连接
|
||||||
|
jsondata[key] = values.length > 0 ? values.join(', ') : ''
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// 如果解析失败,保持原值
|
||||||
|
console.warn('Failed to parse dictionary array for key:', key, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
that.EditionInfo = jsondata
|
that.EditionInfo = jsondata
|
||||||
} else if (response.data.status === '401') {
|
} else if (response.data.status === '401') {
|
||||||
that.$alert(response.data.message)
|
that.$alert(response.data.message)
|
||||||
|
|||||||
@@ -497,7 +497,31 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.attributes-section,
|
.attributes-section {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
min-height: 200px;
|
||||||
|
|
||||||
|
/* 自定义滚动条样式 */
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: rgba(232, 245, 233, 0.3);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: linear-gradient(180deg, #81c784, #66bb6a);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: linear-gradient(180deg, #66bb6a, #4caf50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.images-section,
|
.images-section,
|
||||||
.videos-section {
|
.videos-section {
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
|
|||||||
Reference in New Issue
Block a user