|
|
@@ -1,262 +1,227 @@
|
|
|
<template>
|
|
|
- <a-modal :visible="true" :width="width" :maskClosable="false" :destroyOnClose="true" centered :title="title"
|
|
|
- :footer="null" wrapClassName="modal-wrap" @cancel="onClose">
|
|
|
- <div class="action-content">
|
|
|
- <div class="top-header">
|
|
|
- <div class="img-container">
|
|
|
- <img :src="baseInfo?.thumbnail2 || './static/img/default-dr3.jpg'" alt="">
|
|
|
- </div>
|
|
|
- <div class="res-title">
|
|
|
- <div class="title">{{ baseInfo.servicename }}</div>
|
|
|
- <div class="describle">描述:{{ baseInfo.description }}</div>
|
|
|
- <div class="small-mark">
|
|
|
- <div class="update-time">更新时间:{{ baseInfo.updatedate }}</div>
|
|
|
- <div class="service-type">服务类型:{{ baseInfo.servicetype }}</div>
|
|
|
+ <BasicModal :maskClosable="false" width="1440px" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" :title="title"
|
|
|
+ :showOkBtn="false" :showCancelBtn="false">
|
|
|
+ <div class="modal-wrap">
|
|
|
+ <div class="action-content">
|
|
|
+ <div class="top-header">
|
|
|
+ <div class="img-container">
|
|
|
+ <img class="tab-list-icon-img-MR00001936 img_mr" :id="resRealId + '-resVersion'" alt="图片">
|
|
|
</div>
|
|
|
- <div class="look">
|
|
|
- <a target="_blank" :href="`./mapview.html?${baseInfo.serviceid}`">
|
|
|
- <span>浏览</span>
|
|
|
- </a>
|
|
|
+ <div class="res-title">
|
|
|
+ <div class="title">{{ baseInfo.servicename }}</div>
|
|
|
+ <div class="describle">描述:{{ baseInfo.description }}</div>
|
|
|
+ <div class="small-mark">
|
|
|
+ <div class="update-time">更新时间:{{ baseInfo.updatedate }}</div>
|
|
|
+ <div class="service-type">服务类型:{{ baseInfo.servicetype }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="look">
|
|
|
+ <a target="_blank" :href="`./mapview.html?${baseInfo.serviceid}`" rel="opener">
|
|
|
+ <span>浏览</span>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="base-info info-item">
|
|
|
- <div class="info-title">基本信息</div>
|
|
|
- <div class="form-box">
|
|
|
- <a-row>
|
|
|
- <a-col :span="3" class="form-item-title form-title">真实地址</a-col>
|
|
|
- <a-col :span="21" class="form-item-value form-title">{{ baseInfo.mapingurl }}</a-col>
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">资源名称</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- baseInfo.servicename }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">资源别名</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- baseInfo.servicealiasname }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col :span="3" class="form-item-title form-title" style="border-top: none;">缩略图</a-col>
|
|
|
- <a-col :span="21" class="form-item-value form-title" style="border-top: none;"
|
|
|
- :title="baseInfo.thumbnail">{{ baseInfo.thumbnail }}</a-col>
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col :span="3" class="form-item-title form-title" style="border-top: none;">资源描述</a-col>
|
|
|
- <a-col :span="21" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- baseInfo.description }}</a-col>
|
|
|
- </a-row>
|
|
|
+ <div class="base-info info-item">
|
|
|
+ <div class="info-title">基本信息</div>
|
|
|
+ <div class="form-box">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="3" class="form-item-title form-title">资源地址</a-col>
|
|
|
+ <a-col :span="21" class="form-item-value form-title">{{ baseInfo.mapingurl }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;">资源名称</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ baseInfo.servicename }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">资源别名</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ baseInfo.servicealiasname }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="3" class="form-item-title form-title" style="border-top: none;">缩略图</a-col>
|
|
|
+ <a-col :span="21" class="form-item-value form-title" style="border-top: none;"
|
|
|
+ :title="baseInfo.thumbnail">{{ baseInfo.thumbnail }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="3" class="form-item-title form-title" style="border-top: none;">资源描述</a-col>
|
|
|
+ <a-col :span="21" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ baseInfo.description }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="meta-info info-item">
|
|
|
- <div class="info-title">描述信息</div>
|
|
|
- <div class="form-box">
|
|
|
- <!-- 系统标签,资源类型 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title">系统标签</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title">{{ metaInfo.serviceTags }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-left: none;">资源类型</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title">{{ baseInfo.servicetype }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 数据类型,数据范围 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">数据类型</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.dataType === '2' ? '二维' : metaInfo.dataType === '3' ? '三维' : '' }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">数据范围</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.dataScope }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 更新方式,数据来源 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">更新方式</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.updateType }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">数据来源</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.source }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 管理部门,责任科室 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">管理部门</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.keepingunit }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">责任科室</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.rboffice }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 密级,坐标系 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">密级</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.secretlevel }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">坐标系</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.crs }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- EPSG code,运行状态 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">EPSG
|
|
|
- code</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.epsgCode }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">运行状态</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- baseInfo.runtimestatus ? '启用' : '禁用' }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 是否为历史版本,适合申请流程 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;">是否为历史版本</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- Boolean(Number(metaInfo.ishistory)) ? '是' : '否' }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">适合申请流程</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.shsqlc }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 备注 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="3" class="form-item-title form-title" style="border-top: none;">备注</a-col>
|
|
|
- <a-col :span="21" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.bz }}</a-col>
|
|
|
- </a-row>
|
|
|
+ <div class="meta-info info-item">
|
|
|
+ <div class="info-title">描述信息</div>
|
|
|
+ <div class="form-box">
|
|
|
+ <!-- 系统标签,资源类型 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title">系统标签</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title">{{ metaInfo.serviceTags
|
|
|
+ }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-left: none;">资源类型</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title">{{ baseInfo.servicetype
|
|
|
+ }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 数据类型,数据范围 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;">数据类型</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.dataType === '2' ? '二维' : metaInfo.dataType === '3' ? '三维' : ''
|
|
|
+ }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">数据范围</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.dataScope }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 更新方式,数据来源 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;">更新方式</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.updateType }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">数据来源</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.source }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 管理部门,责任科室 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;">管理部门</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.keepingunit }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">责任科室</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.rboffice }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 密级,坐标系 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;">密级</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.secretlevel }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">坐标系</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.crs }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- EPSG code,运行状态 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title" style="border-top: none;">EPSG
|
|
|
+ code</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.epsgCode }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">运行状态</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ baseInfo.runtimestatus ? '启用' : '禁用' }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 是否为历史版本,适合申请流程 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;">是否为历史版本</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ Boolean(Number(metaInfo.ishistory)) ? '是' : '否' }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="6" class="form-item-title form-title"
|
|
|
+ style="border-top: none;border-left: none;">适合申请流程</a-col>
|
|
|
+ <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.shsqlc }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 备注 -->
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="3" class="form-item-title form-title" style="border-top: none;">备注</a-col>
|
|
|
+ <a-col :span="21" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
+ metaInfo.bz }}</a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="public-set info-item">
|
|
|
- <div class="info-title">共享设置</div>
|
|
|
- <div class="form-box">
|
|
|
- <!-- 是否公开,是否共享 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title">是否公开</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title">{{ baseInfo.ispublic === '1' ? '是' :
|
|
|
- '否'
|
|
|
- }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-left: none;">是否共享</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title">{{ metaInfo.searched === '1' ? '是' : '否'
|
|
|
- }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 外部申请,是否展示 -->
|
|
|
- <a-row>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title" style="border-top: none;">外部申请</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- baseInfo.externalApply === '1' ? '是' : '否' }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-row>
|
|
|
- <a-col :span="6" class="form-item-title form-title"
|
|
|
- style="border-top: none;border-left: none;">是否展示</a-col>
|
|
|
- <a-col :span="18" class="form-item-value form-title" style="border-top: none;">{{
|
|
|
- metaInfo.isShow === '1' ? '是' : '否' }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </a-modal>
|
|
|
+ </BasicModal>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { defineComponent, reactive, ref, onMounted, watch, toRefs } from 'vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import { session } from '/@/utils/Memory';
|
|
|
import moment from 'moment';
|
|
|
-import { setHtmlImg } from '/@/views/minWidgets/CommonWay.js';
|
|
|
import { getResViewInfo, queryServiceTags } from '/@/api/resource/plat';
|
|
|
import { getAllTags } from '/@/api/sys/tag';
|
|
|
+import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
+import { getImgUrl } from '/@/api/dataAdmin/assembly';
|
|
|
+import { img } from '/@/api/resource/plat';
|
|
|
|
|
|
-const props = {
|
|
|
- resId: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
- }
|
|
|
-}
|
|
|
export default defineComponent({
|
|
|
name: 'modal',
|
|
|
- components: {},
|
|
|
- props,
|
|
|
- setup(props, { emit }) {
|
|
|
+ components: { BasicModal },
|
|
|
+ setup(_, { emit }) {
|
|
|
const data = reactive({
|
|
|
width: '1200px',
|
|
|
title: '资源详情',
|
|
|
@@ -268,16 +233,20 @@ export default defineComponent({
|
|
|
}
|
|
|
const baseInfo = ref({})
|
|
|
const metaInfo = ref({})
|
|
|
- //初始化请求所需数据
|
|
|
- onMounted(async () => {
|
|
|
- console.log(props.resId);
|
|
|
- let res = await getResViewInfo(props.resId)
|
|
|
- console.log(res);
|
|
|
+ const resRealId = ref('');
|
|
|
+ const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
|
|
+ resRealId.value = data.resId;
|
|
|
+ await getInfo(data.resId)
|
|
|
+ });
|
|
|
+ const getInfo = async (resId) => {
|
|
|
+ let res = await getResViewInfo(resId)
|
|
|
+ let thumbnail = await setHtmlImg(resRealId.value)
|
|
|
+ console.log("资源详情:", res);
|
|
|
baseInfo.value = res.servicebase;
|
|
|
- baseInfo.value.thumbnail = res.metadata.thumbnail
|
|
|
- session.getItem('thumbnail2') && (baseInfo.value.thumbnail2 = session.getItem('thumbnail2'));
|
|
|
+ baseInfo.value.thumbnail = thumbnail
|
|
|
baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
|
|
|
metaInfo.value = res.metadata
|
|
|
+
|
|
|
//所有标签
|
|
|
let param = {
|
|
|
1: session.getItem('tokenV2')
|
|
|
@@ -285,6 +254,7 @@ export default defineComponent({
|
|
|
let allTags = await getAllTags(param)
|
|
|
if (allTags.status === '0') {
|
|
|
let allTagArr = JSON.parse(allTags.result)
|
|
|
+ console.log(allTagArr)
|
|
|
let keepingUnitObj = {}
|
|
|
let rbOfficeObj = {}
|
|
|
let secretLevelObj = {}
|
|
|
@@ -305,20 +275,54 @@ export default defineComponent({
|
|
|
let tags = metaInfo.value.keywords.indexOf('[') > -1 ? JSON.parse(metaInfo.value.keywords) : [metaInfo.value.keywords];
|
|
|
let resStr = ''
|
|
|
tags.forEach(tag => {
|
|
|
- serviceTagsObj[tag]? resStr += serviceTagsObj[tag] + ',' : resStr += ''
|
|
|
+ serviceTagsObj[tag] ? resStr += serviceTagsObj[tag] + ',' : resStr += ''
|
|
|
})
|
|
|
metaInfo.value.serviceTags = resStr.slice(0, -1)
|
|
|
}
|
|
|
})
|
|
|
- console.log(allTagArr)
|
|
|
metaInfo.value.keepingunit = keepingUnitObj[metaInfo.value.keepingunit]
|
|
|
metaInfo.value.rboffice = rbOfficeObj[metaInfo.value.rboffice]
|
|
|
metaInfo.value.secretlevel = secretLevelObj[metaInfo.value.secretlevel]
|
|
|
metaInfo.value.epsgCode = epsgCodeObj[metaInfo.value.epsgCode]
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
+ const setHtmlImg = async (resId) => {
|
|
|
+ let r = await img(resId)
|
|
|
+ if (r && r.length) {
|
|
|
+ var i = r[0];
|
|
|
+ var dom = document.getElementById(`${resId}-resVersion`)
|
|
|
+ if (i.thumbnail.indexOf(",") > -1) {
|
|
|
+ if (i.thumbnail.indexOf("base64") > -1) {
|
|
|
+ dom.src = i.thumbnail ? i.thumbnail : './static/img/default-dr3.jpg';
|
|
|
+ return dom.src
|
|
|
+ } else {
|
|
|
+ let res1 = await reqGetImg(i.thumbnail, dom)
|
|
|
+ return res1
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ var uri = "http://192.168.119.143:8080/onemapV5.0/";
|
|
|
+ dom.src = i.thumbnail ? (uri + i.thumbnail) : './static/img/default-dr3.jpg';
|
|
|
+ return dom.src
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const reqGetImg = async (i, d) => {
|
|
|
+ if (i) {
|
|
|
+ var arr = i.split(',')
|
|
|
+ if(arr.length > 1){
|
|
|
+ let r = await getImgUrl(arr[0], arr[1])
|
|
|
+ d.src = r
|
|
|
+ return d.src
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return {
|
|
|
- // setHtmlImg,
|
|
|
+ registerModal,
|
|
|
+ setHtmlImg,
|
|
|
+ resRealId,
|
|
|
baseInfo,
|
|
|
metaInfo,
|
|
|
// formRef,
|