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