XiaXxxxxx 2 rokov pred
rodič
commit
37128e567d

+ 18 - 0
src/api/resource/plat.ts

@@ -104,6 +104,24 @@ export function getResViewInfo(resId) {
     })
 }
 
+/**
+ * @description:获取资源标签
+ */
+export function queryServiceTags() {
+    const formData = new FormData();
+    formData.append("interfaceName", "antu.space.provider.tags.TagsProvider");
+    formData.append("methodName", "getAllByType");
+    formData.append("args[]", session.getItem('tokenV2'));
+    formData.append("args[]", '业务类型,服务专题,数据类型,年度');
+    return new Promise<void>((resolve, reject) => {
+        defHttp.post({ url: Api.CallProvider, params: formData, ...interfaceType })
+            .then((r) => {
+                let result = r.result === '' ? [] : JSON.parse(r.result)
+                resolve(result);
+            })
+    })
+}
+
 
 /**
  * @description:获取地图资源列表

+ 5 - 5
src/views/dataAdmin/dataAdmin/fileResourceUpload/fileUploadData.js

@@ -306,8 +306,8 @@ export const accountFormSchema = [
     defaultValue: 0,
     componentProps: {
       options: [
-        { label: "启用", value: 0 },
-        { label: "禁用", value: 1 },
+        { label: "启用", value: 1 },
+        { label: "禁用", value: 0 },
       ],
     },
   },
@@ -334,15 +334,15 @@ export const accountFormSchema = [
     defaultValue: '0',
     componentProps: {
       options: [
-        { label: "是", value: '0' }, //启用
-        { label: "否", value: '1' }, //禁用
+        { label: "是", value: '1' }, //启用
+        { label: "否", value: '0' }, //禁用
       ],
     },
   },
 
   {
     field: 'isShow',
-    label: "是否展", //状态
+    label: "是否展", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 6 },
     defaultValue: '1',

+ 4 - 4
src/views/dataAdmin/dataAdmin/mapUpload/SourceDetail.vue

@@ -192,8 +192,8 @@
             </a-form-item>
           </a-col>
           <a-col :span="5" class="form-col">
-            <a-form-item ref="share" label="是否共享" name="share" class="label-form-item">
-              <a-switch checked-children="" un-checked-children="" v-model:checked="formState.share" :disabled="isView" />
+            <a-form-item ref="searched" label="是否共享" name="searched" class="label-form-item">
+              <a-switch checked-children="" un-checked-children="" v-model:checked="formState.searched" :disabled="isView" />
             </a-form-item>
           </a-col>
           <a-col :span="5" class="form-col">
@@ -203,8 +203,8 @@
             </a-form-item>
           </a-col>
           <a-col :span="4" class="form-col">
-            <a-form-item ref="searched" label="是否展示" name="searched" class="label-form-item">
-              <a-switch checked-children="" un-checked-children="" v-model:checked="formState.searched"
+            <a-form-item ref="share" label="是否展示" name="share" class="label-form-item">
+              <a-switch checked-children="" un-checked-children="" v-model:checked="formState.share"
                 :disabled="isView" />
             </a-form-item>
           </a-col>

+ 7 - 7
src/views/dataAdmin/dataAdmin/sceneResourceUpload/sceneUploadData.js

@@ -446,11 +446,11 @@ export const accountFormSchema = [
     label: "运行状态", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 12 },
-    defaultValue: 0,
+    defaultValue: 1,
     componentProps: {
       options: [
-        { label: "是", value: 0 }, //启用
-        { label: "否", value: 1 }, //禁用
+        { label: "是", value: 1 }, //启用
+        { label: "否", value: 0 }, //禁用
       ],
     },
   },
@@ -472,18 +472,18 @@ export const accountFormSchema = [
     label: "是否共享", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 8 },
-    defaultValue: '0',
+    defaultValue: '1',
     componentProps: {
       options: [
-        { label: "是", value: '0' }, //启用
-        { label: "否", value: '1' }, //禁用
+        { label: "是", value: '1' }, //启用
+        { label: "否", value: '0' }, //禁用
       ],
     },
   },
 
   {
     field: 'isShow',
-    label: "是否展", //状态
+    label: "是否展", //状态
     component: 'RadioButtonGroup',
     colProps: { span: 8 },
     defaultValue: '1',

+ 59 - 19
src/views/resource/plat/item/child/DetailModal.vue

@@ -64,13 +64,13 @@
                         <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.tag }}</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.servicealiasname }}</a-col>
+                                <a-col :span="18" class="form-item-value form-title">{{ baseInfo.servicetype }}</a-col>
                             </a-row>
                         </a-col>
                     </a-row>
@@ -80,7 +80,7 @@
                             <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 }}</a-col>
+                                    metaInfo.dataType === '2' ? '二维' : metaInfo.dataType === '3' ? '三维' : '' }}</a-col>
                             </a-row>
                         </a-col>
                         <a-col :span="12">
@@ -88,7 +88,7 @@
                                 <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>
+                                    metaInfo.dataScope }}</a-col>
                             </a-row>
                         </a-col>
                     </a-row>
@@ -161,7 +161,7 @@
                                 <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.status ? '正常运行' : '停运' }}</a-col>
+                                    baseInfo.runtimestatus ? '启用' : '禁用' }}</a-col>
                             </a-row>
                         </a-col>
                     </a-row>
@@ -201,13 +201,16 @@
                         <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">{{ '是' }}</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">{{ '是' }}</a-col>
+                                <a-col :span="18" class="form-item-value form-title">{{ metaInfo.searched === '1' ? '是' : '否'
+                                }}</a-col>
                             </a-row>
                         </a-col>
                     </a-row>
@@ -217,7 +220,7 @@
                             <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;">{{
-                                    '是' }}</a-col>
+                                    baseInfo.externalApply === '1' ? '是' : '否' }}</a-col>
                             </a-row>
                         </a-col>
                         <a-col :span="12">
@@ -225,7 +228,7 @@
                                 <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;">{{
-                                    Boolean(Number(metaInfo.isShow)) ? '是' : '否' }}</a-col>
+                                    metaInfo.isShow === '1' ? '是' : '否' }}</a-col>
                             </a-row>
                         </a-col>
                     </a-row>
@@ -240,7 +243,8 @@ import { message } from 'ant-design-vue';
 import { session } from '/@/utils/Memory';
 import moment from 'moment';
 import { setHtmlImg } from '/@/views/minWidgets/CommonWay.js';
-import { getResViewInfo } from '/@/api/resource/plat';
+import { getResViewInfo, queryServiceTags } from '/@/api/resource/plat';
+import { getAllTags } from '/@/api/sys/tag';
 
 const props = {
     resId: {
@@ -265,16 +269,52 @@ export default defineComponent({
         const baseInfo = ref({})
         const metaInfo = ref({})
         //初始化请求所需数据
-        onMounted(() => {
+        onMounted(async () => {
             console.log(props.resId);
-            getResViewInfo(props.resId).then(res => {
-                console.log(res);
-                baseInfo.value = res.servicebase;
-                baseInfo.value.thumbnail = res.metadata.thumbnail
-                baseInfo.value.thumbnail2 = session.getItem('thumbnail2');
-                baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
-                metaInfo.value = res.metadata
-            })
+            let res = await getResViewInfo(props.resId)
+            console.log(res);
+            baseInfo.value = res.servicebase;
+            baseInfo.value.thumbnail = res.metadata.thumbnail
+            baseInfo.value.thumbnail2 = session.getItem('thumbnail2');
+            baseInfo.value.updatedate = moment(baseInfo.value.updatedate).format('YYYY-MM-DD HH:mm:ss');
+            metaInfo.value = res.metadata
+            //所有标签
+            let param = {
+                1: session.getItem('tokenV2')
+            }
+            let allTags = await getAllTags(param)
+            if (allTags.status === '0' && allTags.result) {
+                let allTagArr = JSON.parse(allTags.result)
+                let keepingUnitObj = {}
+                let rbOfficeObj = {}
+                let secretLevelObj = {}
+                let epsgCodeObj = {}
+                let serviceTagsObj = {}
+                allTagArr.forEach(item => {
+                    //管理部门
+                    item.type === '管理部门' && (keepingUnitObj[item.code] = item.name)
+                    //责任科室
+                    item.type === '责任科室' && (rbOfficeObj[item.code] = item.name)
+                    //密级
+                    item.type === '密级' && (secretLevelObj[item.code] = item.name)
+                    //EPSG code
+                    item.type === 'EPSG code' && (epsgCodeObj[item.code] = item.name)
+                    //资源标签
+                    serviceTagsObj[item.code] = item.name
+                    if (metaInfo.value.keywords) {
+                        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 += ''
+                        })
+                        metaInfo.value.serviceTags = resStr.slice(0, -1)
+                    }
+                })
+                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]
+            }
         })
         return {
             setHtmlImg,