Browse Source

资源查看浏览

XiaXxxxxx 1 year ago
parent
commit
a753b8406b

+ 87 - 70
src/views/dataAdmin/dataAdmin/resVersion/AssemblyDetailModal.vue

@@ -1,75 +1,76 @@
 <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?.url || './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">服务类型:组件工具</div>
+    <BasicModal :maskClosable="false" :width="1440" :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 :src="baseInfo?.url || './static/img/default-dr3.jpg'" alt="">
                     </div>
-                    <div class="look">
-                        <a :href="[`./mapview.html?onlineIde_${baseInfo.servicealiasname}`]" target="_blank"
-                            rel="noopener noreferrer">浏览</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">服务类型:组件工具</div>
+                        </div>
+                        <div class="look">
+                            <a :href="[`./map${baseInfo.SFJRSQK == '审核通过' ? 'view' : 'see'}.html?onlineIde_${baseInfo.servicealiasname}`]"
+                                target="_blank" rel="opener">浏览</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.zsdz }}</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.url">{{ baseInfo.url }}</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">{{ `/mapview.html?onlineIde_${baseInfo.servicealiasname}` }}</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.url">{{ baseInfo.url }}</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>
-    </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 { listApproved } from '/@/api/dataAdmin/assembly';
 import { getResViewInfo } from '/@/api/resource/plat';
-
+import { BasicModal, useModalInner } from '/@/components/Modal';
+import { getImgUrl } from '/@/api/dataAdmin/assembly';
 
 export default defineComponent({
     name: 'modal',
-    components: {},
+    components: { BasicModal },
     props: {
         resId: {
             type: String,
@@ -81,28 +82,44 @@ export default defineComponent({
             width: '1200px',
             title: '组件详情',
         })
-        // 关闭请求弹窗
-        const onClose = (e) => {
-            emit('closeModal')
-        }
         const baseInfo = ref({})
-        const metaInfo = ref({})
+        const [registerModal, { closeModal }] = useModalInner(async (data) => {
+            await getInfo(data.resId)
+        });
+        const getInfo = async (resId) => {
+            let res = await listApproved('')
+            res.forEach(async (item) => {
+                if (item.SERVICEID == resId) {
+                    item.url = await getImg(item.mapingurl);
+                    item.updatedate = moment(item.updatedate).format('YYYY-MM-DD HH:mm:ss');
+                    console.log(item)
+                    baseInfo.value = item;
+                }
+            })
+        }
+        const getImg = async (i) => {
+            var url = null;
+            if (i) {
+                var arr = i.split(',')
+                if (arr.length > 1) url = await getImgUrl(arr[0], arr[1]);
+            }
+            return url ? url : interfaceImg;
+        }
         //初始化请求所需数据
         onMounted(() => {
-            getResViewInfo(props.resId).then(res => {
-                console.log(res);
-                baseInfo.value = res.servicebase;
-                baseInfo.value.thumbnail = res.metadata.thumbnail
-                baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
-                baseInfo.value.zsdz = `${window.location.origin}/mapview.html?onlineIde_${baseInfo.value.servicealiasname}`;
-            })
+            // getResViewInfo(props.resId).then(res => {
+            //     console.log(res);
+            //     baseInfo.value = res.servicebase;
+            //     baseInfo.value.thumbnail = res.metadata.thumbnail
+            //     baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
+            //     baseInfo.value.zsdz = `${window.location.origin}/mapview.html?onlineIde_${baseInfo.value.servicealiasname}`;
+            // })
         })
         return {
             baseInfo,
-            metaInfo,
+            registerModal,
             // formRef,
-            ...toRefs(data),
-            onClose
+            ...toRefs(data)
         };
     },
 });

+ 64 - 106
src/views/dataAdmin/dataAdmin/resVersion/InterfaceDetailModal.vue

@@ -1,6 +1,6 @@
 <!-- 接口详情弹窗 -->
 <template>
-    <BasicModal width="1000px" :maskClosable="false" v-bind="$attrs" title="接口详情" :showOkBtn="false"
+    <BasicModal :width="1000" :maskClosable="false" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" title="接口详情" :showOkBtn="false"
         :showCancelBtn="false">
         <div class="assembly-detail">
             <!-- 基本信息 -->
@@ -45,41 +45,22 @@
                     <div class="title">返回示例</div>
                 </div>
                 <div class="item-body">
-                    <a-textarea v-model:value="resExample" placeholder="" :autoSize="true" disabled/>
+                    <a-textarea v-model:value="resExample" placeholder="" :autoSize="true" disabled />
                 </div>
             </div>
         </div>
     </BasicModal>
-    <a-modal v-model:visible="visible" centered title="调用说明" width="700px" :footer="null">
-        <div class="content" style="padding: 20px 10px 10px;font-size: 16px;">
-            <p>· 使用需鉴权的接口要在网络请求头(Http Headers)中添加参数(Authorization)项,设置已授权的令牌(JWT:JSON Web Tokens)</p>
-            <p>· 获取授权的JWT如下:</p>
-            <p>1). 首先拥有成都市规划和自然资源局门户的账号和密码</p>
-            <p>2). 其次由信息中心管理员配置client_id、client_secret、username、password参数值</p>
-            <p>3). 然后获取access_token</p>
-            <p>4). 最后通过access_token访问需鉴权的资源</p>
-            <p>5). 注意:access_token有效期为:30分钟,过期需重新获取</p>
-        </div>
-    </a-modal>
 </template>
 
 <script>
 import { defineComponent, reactive, ref, toRefs, computed, onMounted, watch } from 'vue';
 import { getInterfaceDetail } from '/@/api/interface/interface.ts';
-import { BasicModal } from '/@/components/Modal';
-
-const props = {
-    action: {
-        type: Object,
-        default: {}
-    }
-}
+import { BasicModal, useModalInner } from '/@/components/Modal';
 
 export default defineComponent({
     name: 'assemblyDetail',
     components: { BasicModal },
-    props,
-    setup(props) {
+    setup(_, {emit}) {
         //action数据,初始化时使用这个数据去组装需要的数据
         const actionData = ref(null)
 
@@ -89,9 +70,6 @@ export default defineComponent({
         const resData = ref(null)
         const resExample = ref(null)
 
-        const visible = ref(false)
-        const showActionMock = ref(false)
-
         //请求参数表
         const reqColumns = [
             {
@@ -154,82 +132,66 @@ export default defineComponent({
                 key: 'type'
             }
         ]
-
-        onMounted(() => {
-            props.action && getActionData(props.action)
-        })
-        watch(
-            () => props.action,
-            (val) => {
-                getActionData(val)
-            }
-        )
-        const getActionData = (id) => {
-            getInterfaceDetail(id).then(res => {
-                if (JSON.stringify(res) == '{}') {
-                    actionData.value = '';
-                    baseData.value.map(i => i.value = '');
-                    resExample.value = '';
-                } else {
-                    actionData.value = {
-                        ...res,
-                        queryParams: JSON.parse(res.queryParams),
-                        requestHeaders: JSON.parse(res.requestHeaders),
-                        responseParams: JSON.parse(res.responseParams),
-                        // successRespExample:JSON.parse(res.successRespExample),
-                    }
-                    //组装四个需求的数据
-                    baseData.value = [
-                        {
-                            label: '接口名称',
-                            value: actionData.value.name || '',
-                        },
-                        {
-                            label: '接口地址',
-                            value: actionData.value.requestUrl || '',
-                        },
-                        {
-                            label: '请求方式',
-                            value: actionData.value.requestMethod ? actionData.value.requestMethod : '',
-                        },
-                        {
-                            label: '发布日期',
-                            value: actionData.value.publishTime || '',
-                        },
-                        {
-                            label: '版本号',
-                            value: actionData.value.version || ''
-                        },
-                        {
-                            label: '接口描述',
-                            value: actionData.value.remark || ''
-                        },
-                    ]
-                    reqData.value = actionData.value.queryParams
-                    reqData.value.unshift({
-                        description: '令牌',
-                        in: 'header',
-                        name: 'Authorization',
-                        required: false,
-                        type: 'string'
-                    })
-                    reqData.value.forEach((item, index) => {
-                        item.key = index
-                    })
-                    resData.value = actionData.value.responseParams
-                    resData.value.forEach((item, index) => {
-                        item.key = index
-                    })
-                    resExample.value = actionData.value.successRespExample
-                    console.log(actionData.value);
+        const [registerModal, { closeModal }] = useModalInner(async (data) => {
+            await getActionData(data.resId)
+        });
+        const getActionData = async (id) => {
+            let res = await getInterfaceDetail(id)
+            if (JSON.stringify(res) == '{}') {
+                actionData.value = '';
+                baseData.value.map(i => i.value = '');
+                resExample.value = '';
+            } else {
+                actionData.value = {
+                    ...res,
+                    queryParams: JSON.parse(res.queryParams),
+                    requestHeaders: JSON.parse(res.requestHeaders),
+                    responseParams: JSON.parse(res.responseParams),
                 }
-            })
-        }
-        const openActionRemark = () => {
-            visible.value = true;
-        }
-        const openActionMock = () => {
-            showActionMock.value = true
+                //组装四个需求的数据
+                baseData.value = [
+                    {
+                        label: '接口名称',
+                        value: actionData.value.name || '',
+                    },
+                    {
+                        label: '接口地址',
+                        value: actionData.value.requestUrl || '',
+                    },
+                    {
+                        label: '请求方式',
+                        value: actionData.value.requestMethod ? actionData.value.requestMethod : '',
+                    },
+                    {
+                        label: '发布日期',
+                        value: actionData.value.publishTime || '',
+                    },
+                    {
+                        label: '版本号',
+                        value: actionData.value.version || ''
+                    },
+                    {
+                        label: '接口描述',
+                        value: actionData.value.remark || ''
+                    },
+                ]
+                reqData.value = actionData.value.queryParams
+                reqData.value.unshift({
+                    description: '令牌',
+                    in: 'header',
+                    name: 'Authorization',
+                    required: false,
+                    type: 'string'
+                })
+                reqData.value.forEach((item, index) => {
+                    item.key = index
+                })
+                resData.value = actionData.value.responseParams
+                resData.value.forEach((item, index) => {
+                    item.key = index
+                })
+                resExample.value = actionData.value.successRespExample
+            }
         }
         return {
             actionData,
@@ -241,11 +203,7 @@ export default defineComponent({
             reqColumns,
             resColumns,
 
-            visible,
-            showActionMock,
-
-            openActionRemark,
-            openActionMock
+            registerModal
         };
     },
 });

+ 254 - 250
src/views/dataAdmin/dataAdmin/resVersion/ResDetailModal.vue

@@ -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,

+ 3 - 2
src/views/dataAdmin/dataAdmin/resVersion/ResHistoryVersionModal.vue

@@ -1,6 +1,6 @@
 <!-- 资源的历史版本查询弹窗 -->
 <template>
-    <BasicModal :maskClosable="false" :width="1430" @register="registerModal" v-bind="$attrs" :title="title" centered
+    <BasicModal :maskClosable="false" :width="1430" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" :title="title" centered
         :showOkBtn="false" :showCancelBtn="false" wrapClassName="res-history-version-modal" :footer="null">
         <div class="custom-content">
             <div class="right-header">
@@ -129,7 +129,7 @@ export default defineComponent({
             api: getResData, //加载数据
             columns: columns,
             useSearchForm: false,     //开启搜索区域
-            bordered: false,
+            bordered: true,
             showTableSetting: true,  // 显示表格设置
             tableSetting: {
                 redo: true,
@@ -137,6 +137,7 @@ export default defineComponent({
                 setting: false,
                 fullScreen: false
             },
+            canResize:false,
             showIndexColumn: true,
             pagination: {
                 hideOnSinglePage: false

+ 1 - 1
src/views/dataAdmin/dataAdmin/resVersion/ResVersionManageAllModal.vue

@@ -1,5 +1,5 @@
 <template>
-    <BasicModal :maskClosable="false" :width="440" @register="registerModal" v-bind="$attrs" title="资源版本管理" centered
+    <BasicModal :maskClosable="false" :width="440" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" title="资源版本管理" centered
         @ok="handleSubmit">
         <div class="content">
             <div class="form-item">

+ 1 - 1
src/views/dataAdmin/dataAdmin/resVersion/ResVersionManageModal.vue

@@ -1,5 +1,5 @@
 <template>
-    <BasicModal :maskClosable="false" :width="750" @register="registerModal" v-bind="$attrs" title="资源版本管理" centered
+    <BasicModal :maskClosable="false" :width="750" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" title="资源版本管理" centered
         @ok="handleSubmit">
         <div class="content">
             <div class="base">

+ 60 - 44
src/views/dataAdmin/dataAdmin/resVersion/index.vue

@@ -26,7 +26,8 @@
                 <div class="right-body">
                     <BasicTable @register="registerTable">
                         <template #toolbar>
-                            <Button type="primary" :disabled="hasSelected" @click="handleManageAll" v-if="searchType === 0">
+                            <Button type="primary" :disabled="hasSelected" @click="handleManageAll"
+                                v-if="searchType === 0">
                                 批量版本管理
                             </Button>
                             <Button type="primary" danger :disabled="hasSelected" @click="handleDelAll" v-else>
@@ -35,30 +36,30 @@
                         </template>
                         <template #action="{ record }">
                             <TableAction :actions="[
-                                {
-                                    label: '浏览',
-                                    tooltip: '浏览',
-                                    ifShow: !isInterface,
-                                    onClick: handleFetchRes.bind(null, record),
-                                },
-                                {
-                                    label: '查看',
-                                    tooltip: '查看',
-                                    onClick: handleLookRes.bind(null, record),
-                                },
-                                {
-                                    label: '版本管理',
-                                    tooltip: '版本管理',
-                                    ifShow: !isgl,
-                                    onClick: handleManage.bind(null, record),
-                                },
-                                {
-                                    label: '取消版本',
-                                    tooltip: '取消版本',
-                                    ifShow: isgl,
-                                    onClick: handleDel.bind(null, record),
-                                },
-                            ]" />
+                    {
+                        label: '浏览',
+                        tooltip: '浏览',
+                        ifShow: !isInterface,
+                        onClick: handleFetchRes.bind(null, record),
+                    },
+                    {
+                        label: '查看',
+                        tooltip: '查看',
+                        onClick: handleLookRes.bind(null, record),
+                    },
+                    {
+                        label: '版本管理',
+                        tooltip: '版本管理',
+                        ifShow: !isgl,
+                        onClick: handleManage.bind(null, record),
+                    },
+                    {
+                        label: '取消版本',
+                        tooltip: '取消版本',
+                        ifShow: isgl,
+                        onClick: handleDel.bind(null, record),
+                    },
+                ]" />
                         </template>
                     </BasicTable>
                 </div>
@@ -66,9 +67,8 @@
         </div>
         <ResVersionManageModal @register="registerModal" @success="onSubmit"></ResVersionManageModal>
         <ResVersionManageAllModalVue @register="registerModalAll" @success="onSubmit"></ResVersionManageAllModalVue>
-        <ResDetailModal v-if="ifResDetail" :resId="resId" @closeModal="ifResDetail = false"></ResDetailModal>
-        <AssemblyDetailModal v-if="ifAssemblyDetail" :resId="resId" @closeModal="ifAssemblyDetail = false">
-        </AssemblyDetailModal>
+        <ResDetailModal @register="registerResDetailModal"></ResDetailModal>
+        <AssemblyDetailModal @register="registerAssemblyDetailModal"></AssemblyDetailModal>
         <InterfaceDetailModal @register="registerInterfaceModal" :action="resId"></InterfaceDetailModal>
     </div>
 </template>
@@ -90,17 +90,17 @@ import moment from 'moment'
 import { session } from '/@/utils/Memory';
 import uiTool from '/@/utils/uiTool';
 import { getResViewInfo } from '/@/api/resource/plat';
+import { listApproved } from '/@/api/dataAdmin/assembly';
 
 export default defineComponent({
     name: 'resVersion',
     components: { ResVersionManageModal, ResVersionManageAllModalVue, BasicTable, TableAction, Button, ResDetailModal, AssemblyDetailModal, InterfaceDetailModal },
     setup() {
         const [registerModal, { openModal }] = useModal();
+        const [registerResDetailModal, { openModal: openResDetailModal }] = useModal();
+        const [registerAssemblyDetailModal, { openModal: openAssemblyDetailModal }] = useModal();
         const [registerModalAll, { openModal: openModalAll }] = useModal();
         const [registerInterfaceModal, { openModal: openInterfaceModal }] = useModal();
-        const ifResDetail = ref(false)
-        const ifAssemblyDetail = ref(false)
-        // const ifInterfaceDetail = ref(false)
         const resId = ref('')
         const data = reactive({
             searchValue: "",//关键字
@@ -263,13 +263,26 @@ export default defineComponent({
         // 浏览资源
         const handleFetchRes = (record) => {
             if (currentResType.value === 'SR') {
-                getResViewInfo(record.SERVICEID).then(res => {
-                    console.log(res);
-                    window.open(`./mapview.html?onlineIde_${res.servicebase.servicealiasname}`, '_blank')
+                listApproved('').then(res => {
+                    res.forEach(async (item) => {
+                        if (item.SERVICEID == record.SERVICEID) {
+                            window.open(`./map${item.SFJRSQK === '审核通过' ? 'view' : 'see'}.html?onlineIde_${item.servicealiasname}`, '_blank')
+                        }
+                    })
                 })
+                // getResViewInfo(record.SERVICEID).then(res => {
+                //     console.log(res);
+                //     window.open(`./mapview.html?onlineIde_${res.servicebase.servicealiasname}`, '_blank')
+                // })
             }
             else if (currentResType.value === 'interface') {
-
+                
+            }
+            else if (currentResType.value === 'DR') {
+                getResViewInfo(record.SERVICEID).then(res => {
+                    console.log(res)
+                    window.open(res?.metadata?.thumbnail || './static/img/default-dr3.jpg', '_blank')
+                })
             }
             else {
                 getResViewInfo(record.SERVICEID).then(res => {
@@ -282,16 +295,21 @@ export default defineComponent({
         const handleLookRes = (record) => {
             console.log(record)
             console.log(currentResType.value)
-            resId.value = record.SERVICEID
+            resId.value = record.SERVICEID || record.SERVERID
             if (currentResType.value === 'SR') {
-                ifAssemblyDetail.value = true
+                openAssemblyDetailModal(true, {
+                    resId: resId.value
+                })
             }
             else if (currentResType.value === 'interface') {
-                // ifInterfaceDetail.value = true
-                openInterfaceModal(true)
+                openInterfaceModal(true, {
+                    resId: resId.value
+                })
             }
             else {
-                ifResDetail.value = true
+                openResDetailModal(true, {
+                    resId: resId.value
+                })
             }
         }
         //管理资源的版本
@@ -342,9 +360,6 @@ export default defineComponent({
             },
         });
         return {
-            ifResDetail,
-            ifAssemblyDetail,
-            // ifInterfaceDetail,
             resId,
             resBtns,
             currentResType,
@@ -354,8 +369,9 @@ export default defineComponent({
             isInterface,
             ...toRefs(data),
             // func
-            // registerResModal,
             registerModal,
+            registerResDetailModal,
+            registerAssemblyDetailModal,
             registerModalAll,
             registerInterfaceModal,
             registerTable,

+ 87 - 70
src/views/dataAdmin/dataAdmin/version/AssemblyDetailModal.vue

@@ -1,75 +1,76 @@
 <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?.url || './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">服务类型:组件工具</div>
+    <BasicModal :maskClosable="false" :destroyOnClose="true" width="1440px" @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 :src="baseInfo?.url || './static/img/default-dr3.jpg'" alt="">
                     </div>
-                    <div class="look">
-                        <a :href="[`./mapview.html?onlineIde_${baseInfo.servicealiasname}`]" target="_blank"
-                            rel="noopener noreferrer">浏览</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">服务类型:组件工具</div>
+                        </div>
+                        <div class="look">
+                            <a :href="[`./map${baseInfo.SFJRSQK == '审核通过' ? 'view' : 'see'}.html?onlineIde_${baseInfo.servicealiasname}`]"
+                                target="_blank" rel="opener">浏览</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.zsdz }}</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.url">{{ baseInfo.url }}</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">{{ `/mapview.html?onlineIde_${baseInfo.servicealiasname}` }}</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.url">{{ baseInfo.url }}</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>
-    </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 { listApproved } from '/@/api/dataAdmin/assembly';
 import { getResViewInfo } from '/@/api/resource/plat';
-
+import { BasicModal, useModalInner } from '/@/components/Modal';
+import { getImgUrl } from '/@/api/dataAdmin/assembly';
 
 export default defineComponent({
     name: 'modal',
-    components: {},
+    components: { BasicModal },
     props: {
         resId: {
             type: String,
@@ -81,28 +82,44 @@ export default defineComponent({
             width: '1200px',
             title: '组件详情',
         })
-        // 关闭请求弹窗
-        const onClose = (e) => {
-            emit('closeModal')
-        }
         const baseInfo = ref({})
-        const metaInfo = ref({})
+        const [registerModal, { closeModal }] = useModalInner(async (data) => {
+            await getInfo(data.resId)
+        });
+        const getInfo = async (resId) => {
+            let res = await listApproved('')
+            res.forEach(async (item) => {
+                if (item.SERVICEID == resId) {
+                    item.url = await getImg(item.mapingurl);
+                    item.updatedate = moment(item.updatedate).format('YYYY-MM-DD HH:mm:ss');
+                    console.log(item)
+                    baseInfo.value = item;
+                }
+            })
+        }
+        const getImg = async (i) => {
+            var url = null;
+            if (i) {
+                var arr = i.split(',')
+                if (arr.length > 1) url = await getImgUrl(arr[0], arr[1]);
+            }
+            return url ? url : interfaceImg;
+        }
         //初始化请求所需数据
         onMounted(() => {
-            getResViewInfo(props.resId).then(res => {
-                console.log(res);
-                baseInfo.value = res.servicebase;
-                baseInfo.value.thumbnail = res.metadata.thumbnail
-                baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
-                baseInfo.value.zsdz = `${window.location.origin}/mapview.html?onlineIde_${baseInfo.value.servicealiasname}`;
-            })
+            // getResViewInfo(props.resId).then(res => {
+            //     console.log(res);
+            //     baseInfo.value = res.servicebase;
+            //     baseInfo.value.thumbnail = res.metadata.thumbnail
+            //     baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
+            //     baseInfo.value.zsdz = `${window.location.origin}/mapview.html?onlineIde_${baseInfo.value.servicealiasname}`;
+            // })
         })
         return {
             baseInfo,
-            metaInfo,
+            registerModal,
             // formRef,
-            ...toRefs(data),
-            onClose
+            ...toRefs(data)
         };
     },
 });

+ 3 - 2
src/views/dataAdmin/dataAdmin/version/HistoryResListModal.vue

@@ -1,6 +1,6 @@
 <!-- 资源的历史版本查询弹窗 -->
 <template>
-    <BasicModal :maskClosable="false" :width="1430" @register="registerModal" v-bind="$attrs" :title="title" centered
+    <BasicModal :maskClosable="false" :destroyOnClose="true" :width="1430" @register="registerModal" v-bind="$attrs" :title="title" centered
         wrapClassName="history-res-modal" :footer="null">
         <BasicTable @register="registerTable"></BasicTable>
     </BasicModal>
@@ -96,7 +96,8 @@ export default defineComponent({
             api: getResData, //加载数据
             columns: columns,
             useSearchForm: false,     //开启搜索区域
-            bordered: false,
+            bordered: true,
+            canResize:false,
             showTableSetting: true,  // 显示表格设置
             tableSetting: {
                 redo: true,

+ 74 - 84
src/views/dataAdmin/dataAdmin/version/InterfaceDetailModal.vue

@@ -1,78 +1,74 @@
 <!-- 接口详情弹窗 -->
 <template>
-    <div class="assembly-detail">
-        <!-- 基本信息 -->
-        <div class="detail-item">
-            <div class="item-header">
-                <div class="title">基本信息</div>
-            </div>
-            <div class="item-body">
-                <div class="des" v-for="(item, index) of baseData" :key="index">
-                    <div class="des-label">{{ item.label }}:</div>
-                    <div v-if="item.label!=='接口描述'">{{ item.value }}</div>
-                    <div v-else v-html="item.value"></div>
+    <BasicModal :width="1000" :maskClosable="false" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" title="接口详情" :showOkBtn="false"
+        :showCancelBtn="false">
+        <div class="assembly-detail">
+            <!-- 基本信息 -->
+            <div class="detail-item">
+                <div class="item-header">
+                    <div class="title">基本信息</div>
+                </div>
+                <div class="item-body">
+                    <div class="des" v-for="(item, index) of baseData" :key="index">
+                        <div class="des-label">{{ item.label }}:</div>
+                        <div v-if="item.label !== '接口描述'">{{ item.value }}</div>
+                        <div v-else v-html="item.value"></div>
+                    </div>
                 </div>
             </div>
-        </div>
-        <!-- 请求参数 -->
-        <div class="detail-item">
-            <div class="item-header">
-                <div class="title">请求参数</div>
-            </div>
-            <div class="item-body">
-                <a-table :data-source="reqData" :columns="reqColumns" :pagination="{ hideOnSinglePage: true }">
-                    <template #required="{ record }">
-                        <div>{{ record.required ? '是' : '否' }}</div>
-                    </template>
-                </a-table>
-            </div>
-        </div>
-        <!-- 返回参数 -->
-        <div class="detail-item">
-            <div class="item-header">
-                <div class="title">返回参数</div>
-            </div>
-            <div class="item-body">
-                <a-table :data-source="resData" :columns="resColumns" :pagination="{ hideOnSinglePage: true }">
-                </a-table>
+            <!-- 请求参数 -->
+            <div class="detail-item">
+                <div class="item-header">
+                    <div class="title">请求参数</div>
+                </div>
+                <div class="item-body">
+                    <a-table :data-source="reqData" :columns="reqColumns" :pagination="{ hideOnSinglePage: true }">
+                        <template #required="{ record }">
+                            <div>{{ record.required ? '是' : '否' }}</div>
+                        </template>
+                    </a-table>
+                </div>
             </div>
-        </div>
-        <!-- 返回示例 -->
-        <div class="detail-item">
-            <div class="item-header">
-                <div class="title">返回示例</div>
+            <!-- 返回参数 -->
+            <div class="detail-item">
+                <div class="item-header">
+                    <div class="title">返回参数</div>
+                </div>
+                <div class="item-body">
+                    <a-table :data-source="resData" :columns="resColumns" :pagination="{ hideOnSinglePage: true }">
+                    </a-table>
+                </div>
             </div>
-            <div class="item-body">
-                <a-textarea v-model:value="resExample" placeholder="" :autoSize="true" />
+            <!-- 返回示例 -->
+            <div class="detail-item">
+                <div class="item-header">
+                    <div class="title">返回示例</div>
+                </div>
+                <div class="item-body">
+                    <a-textarea v-model:value="resExample" placeholder="" :autoSize="true" disabled />
+                </div>
             </div>
         </div>
-    </div>
+    </BasicModal>
 </template>
 
 <script>
 import { defineComponent, reactive, ref, toRefs, computed, onMounted, watch } from 'vue';
 import { getInterfaceDetail } from '/@/api/interface/interface.ts';
-import { message } from 'ant-design-vue';
-
-const props = {
-    action: {
-        type: String,
-        default: ''
-    }
-}
+import { BasicModal, useModalInner } from '/@/components/Modal';
 
 export default defineComponent({
-    components: {},
-    props,
-    setup(props) {
+    name: 'assemblyDetail',
+    components: { BasicModal },
+    setup(_, {emit}) {
         //action数据,初始化时使用这个数据去组装需要的数据
         const actionData = ref(null)
 
         // 四类数据
         const baseData = ref([])
-        const reqData = ref([])
-        const resData = ref([])
-        const resExample = ref('')
+        const reqData = ref(null)
+        const resData = ref(null)
+        const resExample = ref(null)
 
         //请求参数表
         const reqColumns = [
@@ -136,33 +132,21 @@ export default defineComponent({
                 key: 'type'
             }
         ]
-
-        onMounted(() => {
-            props.action && getActionData(props.action)
-        })
-        watch(
-            () => props.action,
-            (val) => {
-                getActionData(val)
-            }
-        )
-        const getActionData = (id) => {
-            actionData.value = null
-            baseData.value = []
-            reqData.value = []
-            resData.value = []
-            resExample.value = ''
-            getInterfaceDetail(id).then(res => {
-                if(!res.id){
-                    message.info('该接口暂未查询到详情')
-                    return
-                }
+        const [registerModal, { closeModal }] = useModalInner(async (data) => {
+            await getActionData(data.resId)
+        });
+        const getActionData = async (id) => {
+            let res = await getInterfaceDetail(id)
+            if (JSON.stringify(res) == '{}') {
+                actionData.value = '';
+                baseData.value.map(i => i.value = '');
+                resExample.value = '';
+            } else {
                 actionData.value = {
                     ...res,
                     queryParams: JSON.parse(res.queryParams),
                     requestHeaders: JSON.parse(res.requestHeaders),
                     responseParams: JSON.parse(res.responseParams),
-                    // successRespExample:JSON.parse(res.successRespExample),
                 }
                 //组装四个需求的数据
                 baseData.value = [
@@ -193,11 +177,11 @@ export default defineComponent({
                 ]
                 reqData.value = actionData.value.queryParams
                 reqData.value.unshift({
-                    description:'令牌',
-                    in:'header',
-                    name:'Authorization',
-                    required:false,
-                    type:'string'
+                    description: '令牌',
+                    in: 'header',
+                    name: 'Authorization',
+                    required: false,
+                    type: 'string'
                 })
                 reqData.value.forEach((item, index) => {
                     item.key = index
@@ -207,8 +191,7 @@ export default defineComponent({
                     item.key = index
                 })
                 resExample.value = actionData.value.successRespExample
-                console.log(actionData.value);
-            })
+            }
         }
         return {
             actionData,
@@ -219,12 +202,18 @@ export default defineComponent({
 
             reqColumns,
             resColumns,
+
+            registerModal
         };
     },
 });
 </script>
 
 <style lang="less" scoped>
+// #interfaceShow {
+//     display: none;
+// }
+
 .assembly-detail {
     .detail-item {
         margin-top: 10px;
@@ -236,6 +225,7 @@ export default defineComponent({
 
         .item-header {
             padding-left: 20px;
+            margin-top: 10px;
             height: 30px;
             display: flex;
             justify-content: space-between;

+ 254 - 249
src/views/dataAdmin/dataAdmin/version/ResDetailModal.vue

@@ -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,7 +275,7 @@ 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)
                     }
@@ -315,9 +285,44 @@ export default defineComponent({
                 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,

+ 3 - 2
src/views/dataAdmin/dataAdmin/version/VersionHistoryListModal.vue

@@ -1,6 +1,6 @@
 <!-- 版本的历史版本弹窗 -->
 <template>
-    <BasicModal :maskClosable="false" :width="1430" @register="registerModal" v-bind="$attrs" :title="title" centered
+    <BasicModal :maskClosable="false" :width="1430" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" :title="title" centered
         wrapClassName="history-res-modal" :footer="null">
         <BasicTable @register="registerTable">
             <template #action="{ record }">
@@ -94,7 +94,8 @@ export default defineComponent({
             api: getHisData, //加载数据
             columns: columns,
             useSearchForm: false,     //开启搜索区域
-            bordered: false,
+            bordered: true,
+            canResize:false,
             showTableSetting: true,  // 显示表格设置
             tableSetting: {
                 redo: true,

+ 1 - 1
src/views/dataAdmin/dataAdmin/version/VersionManageModal.vue

@@ -1,5 +1,5 @@
 <template>
-    <BasicModal :maskClosable="false" :width="440" @register="registerModal" v-bind="$attrs" :title="getTitle" centered
+    <BasicModal :maskClosable="false" :width="440" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" :title="getTitle" centered
         @ok="handleSubmit">
         <BasicForm @register="registerForm" />
     </BasicModal>

+ 42 - 25
src/views/dataAdmin/dataAdmin/version/VersionResModal.vue

@@ -1,5 +1,5 @@
 <template>
-    <BasicModal :maskClosable="false" :width="1430" @register="registerModal" v-bind="$attrs" :title="title" centered
+    <BasicModal :maskClosable="false" :width="1430" :destroyOnClose="true" @register="registerModal" v-bind="$attrs" :title="title" centered
         :showOkBtn="false" :showCancelBtn="false" wrapClassName="version-res-modal" :footer="null">
         <div class="custom-content">
             <div class="left-box">
@@ -47,15 +47,9 @@
         </div>
     </BasicModal>
     <HistoryResListModal @register="registerHistoryModal"></HistoryResListModal>
-    <ResDetailModal v-if="ifResDetail" :resId="resId" @closeModal="ifResDetail = false"></ResDetailModal>
-    <AssemblyDetailModal v-if="ifAssemblyDetail" :resId="resId" @closeModal="ifAssemblyDetail = false">
-    </AssemblyDetailModal>
-    <a-modal wrapClassName="modal-wrap" title="接口详情" width="1200px" v-model:visible="ifInterfaceDetail"
-        @cancel="ifInterfaceDetail = false" centered :footer="null">
-        <div class="content">
-            <InterfaceDetailModal :action="resId"></InterfaceDetailModal>
-        </div>
-    </a-modal>
+    <ResDetailModal @register="registerResDetailModal" :resId="resId"></ResDetailModal>
+    <AssemblyDetailModal @register="registerAssemblyDetailModal"></AssemblyDetailModal>
+    <InterfaceDetailModal @register="registerInterfaceModal" :action="resId"></InterfaceDetailModal>
 </template>
 <script>
 import { defineComponent, reactive, ref, onMounted, watch, computed } from 'vue';
@@ -71,6 +65,7 @@ import ResDetailModal from './ResDetailModal.vue';
 import AssemblyDetailModal from './AssemblyDetailModal.vue';
 import InterfaceDetailModal from './InterfaceDetailModal.vue';
 import { getResViewInfo } from '/@/api/resource/plat';
+import { listApproved } from '/@/api/dataAdmin/assembly';
 
 export default defineComponent({
     name: 'VersionResModal',
@@ -107,9 +102,7 @@ export default defineComponent({
         const currentType = ref('MR')
         const currentFid = ref('')
         const searchValue = ref('')
-        const ifResDetail = ref(false)
         const ifAssemblyDetail = ref(false)
-        const ifInterfaceDetail = ref(false)
         const resId = ref('')
         const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
             const { FID, VERSION_NAME, VERSION_NO, VERSION_DISP } = data.form;
@@ -119,7 +112,10 @@ export default defineComponent({
             reload()
             getNumber()
         });
+        const [registerResDetailModal, { openModal: openResDetailModal }] = useModal();
+        const [registerAssemblyDetailModal, { openModal: openAssemblyDetailModal }] = useModal();
         const [registerHistoryModal, { openModal }] = useModal();
+        const [registerInterfaceModal, { openModal: openInterfaceModal }] = useModal();
         const typeObj = {
             MR: "地图资源",
             ER: "场景资源",
@@ -211,7 +207,7 @@ export default defineComponent({
             api: getVersionResData, //加载数据
             columns: columns,
             useSearchForm: false,     //开启搜索区域
-            bordered: false,
+            bordered: true,
             showTableSetting: true,  // 显示表格设置
             tableSetting: {
                 redo: true,
@@ -219,6 +215,7 @@ export default defineComponent({
                 setting: false,
                 fullScreen: false
             },
+            canResize:false,
             showIndexColumn: true,
             pagination: {
                 hideOnSinglePage: false
@@ -250,11 +247,23 @@ export default defineComponent({
         }
         // 浏览资源
         const handleFetchRes = (record) => {
-            if (currentType.value === 'SR') {
-                getResViewInfo(record.SERVICEID).then(res => {
-                    console.log(res);
-                    window.open(`./mapview.html?onlineIde_${res.servicebase.servicealiasname}`, '_blank')
+            // 浏览资源
+        const handleFetchRes = (record) => {
+            if (currentResType.value === 'SR') {
+                listApproved('').then(res => {
+                    res.forEach(async (item) => {
+                        if (item.SERVICEID == record.SERVICEID) {
+                            window.open(`./map${item.SFJRSQK === '审核通过' ? 'view' : 'see'}.html?onlineIde_${item.servicealiasname}`, '_blank')
+                        }
+                    })
                 })
+                // getResViewInfo(record.SERVICEID).then(res => {
+                //     console.log(res);
+                //     window.open(`./mapview.html?onlineIde_${res.servicebase.servicealiasname}`, '_blank')
+                // })
+            }
+            else if (currentResType.value === 'interface') {
+                
             }
             else {
                 getResViewInfo(record.SERVICEID).then(res => {
@@ -263,33 +272,38 @@ export default defineComponent({
                 })
             }
         }
+        }
         // 查看资源
         const handleLookRes = (record) => {
             console.log(record)
             console.log(currentType.value)
             resId.value = record.SERVICEID || record.SERVERID
-            if (currentType.value === 'SR') {
-                ifAssemblyDetail.value = true
+            if (currentResType.value === 'SR') {
+                openAssemblyDetailModal(true,{
+                    resId: resId.value
+                })
             }
-            else if (currentType.value === 'interface') {
-                ifInterfaceDetail.value = true
+            else if (currentResType.value === 'interface') {
+                openInterfaceModal(true,{
+                    resId: resId.value
+                })
             }
             else {
-                ifResDetail.value = true
+                openResDetailModal(true,{
+                    resId: resId.value
+                })
             }
         }
         // 历史版本
         const handleSearchHistory = (record) => {
             openModal(true, {
-                serviceId: record.SERVICEID,
+                serviceId: record.SERVICEID || record.SERVERID,
                 serviceName: record.SERVICENAME,
                 type: record.type
             })
         }
         return {
-            ifResDetail,
             ifAssemblyDetail,
-            ifInterfaceDetail,
             resId,
             isInterface,
             title,
@@ -299,6 +313,9 @@ export default defineComponent({
             registerModal,
             registerTable,
             registerHistoryModal,
+            registerResDetailModal,
+            registerAssemblyDetailModal,
+            registerInterfaceModal,
             handleChangeRes,
             resetTable,
             searchTable,

+ 0 - 3
src/views/resource/plat/item/child/DetailModal.vue

@@ -280,9 +280,6 @@ export default defineComponent({
         const seeShow = ref(false);
 
         var urlShow = ref(false);
-        onMounted(() => {
-            urlShow.value = props?.res?.SFJRSQK === '审核通过' ? true : false;
-        })
         watch(() => props.resId,() => getInfo());
         //初始化请求所需数据
         onMounted(()=>getInfo())