|
|
@@ -19,18 +19,15 @@
|
|
|
<TableAction :actions="[
|
|
|
{
|
|
|
label: '浏览',
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
ifShow: current == 'DR' ? false : true,
|
|
|
onClick: handleVliew.bind(null, record),
|
|
|
},
|
|
|
{
|
|
|
label: '查看',
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
onClick: handleDetail.bind(null, record),
|
|
|
},
|
|
|
{
|
|
|
label: '审核',
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
disabled: statusShow == 1 ? false : true,
|
|
|
color: 'warning',
|
|
|
onClick: handleEdit.bind(null, record),
|
|
|
@@ -48,48 +45,38 @@
|
|
|
<template #status="{ record }">
|
|
|
<Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
|
|
|
{{
|
|
|
- // record.status === 0
|
|
|
- // ? '待审核'
|
|
|
- // : record.status === 1
|
|
|
- // ? '审核通过'
|
|
|
- // : record.status === 2
|
|
|
- // ? '审核不通过'
|
|
|
- // : record.status === 3
|
|
|
- // ? '被驳回'
|
|
|
- // : '未提交'
|
|
|
-
|
|
|
!record.status ? '待审核' : record.status == 2 ? '审核不通过' : record.status ? '审核通过' : ''
|
|
|
-
|
|
|
}}
|
|
|
</Tag>
|
|
|
</template>
|
|
|
<template #BLZT="{ record }">
|
|
|
<Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
|
|
|
{{
|
|
|
- // record.BLZT == '在办' ? '审核中' : record.BLZT == '已办结' ? '审核完' : ''
|
|
|
record.BLZT
|
|
|
}}
|
|
|
</Tag>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
- <check v-if="ischect" @register="registerModal1" @success="handleSuccess" />
|
|
|
- <map-resource-upload v-if="!ischect && current === 'MR'" @register="registerModalMR"
|
|
|
+ <check v-if="ischect" @register="registerModal" @success="handleSuccess" />
|
|
|
+ <map-resource-upload v-if="!ischect && current === 'MR'" @register="registerModal"
|
|
|
@success="handleSuccess"></map-resource-upload>
|
|
|
- <scene-resource-upload v-if="!ischect && current === 'ER'" @register="registerModalER"
|
|
|
+ <scene-resource-upload v-if="!ischect && current === 'ER'" @register="registerModal"
|
|
|
@success="handleSuccess"></scene-resource-upload>
|
|
|
- <file-resource-upload v-if="!ischect && current === 'DR'" @register="registerModalDR"
|
|
|
+ <file-resource-upload v-if="!ischect && current === 'DR'" @register="registerModal"
|
|
|
@success="handleSuccess"></file-resource-upload>
|
|
|
+ <ass-resource-upload v-if="!ischect && current === 'SR'" @register="registerModal"
|
|
|
+ @success="handleSuccess"></ass-resource-upload>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, nextTick, onBeforeMount, ref, watch } from 'vue';
|
|
|
+import { defineComponent, nextTick, ref, watch } from 'vue';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
import { delRole, setRoleStatus } from '/@/api/system/system';
|
|
|
-// import { useDrawer } from '/@/components/Drawer';
|
|
|
import MapResourceUpload from '/@/views/dataAdmin/dataAdmin/mapUpload/MapSourceModal.vue';
|
|
|
import FileResourceUpload from '/@/views/dataAdmin/dataAdmin/fileResourceUpload/AddMethod.vue';
|
|
|
import SceneResourceUpload from '/@/views/dataAdmin/dataAdmin/sceneResourceUpload/AddMethod.vue';
|
|
|
+import AssResourceUpload from '/@/views/dataAdmin/assembly/MapSourceModal.vue';
|
|
|
import check from './check.vue';
|
|
|
import { getFileUrl } from '/@/api/resource/files';
|
|
|
import { session } from '/@/utils/Memory.js';
|
|
|
@@ -107,9 +94,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { Switch, Popconfirm } from 'ant-design-vue';
|
|
|
import { queryResourceById } from '/@/api/resource/map';
|
|
|
import Moment from 'moment';
|
|
|
-import { getResourceGroup } from '/@/api/resource/examine';
|
|
|
import { updateExamine } from '/@/api/resource/updateExamine';
|
|
|
-import { onMounted } from 'vue';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
|
|
|
|
|
|
@@ -124,24 +109,12 @@ export default defineComponent({
|
|
|
Popconfirm,
|
|
|
MapResourceUpload,
|
|
|
FileResourceUpload,
|
|
|
+ AssResourceUpload,
|
|
|
SceneResourceUpload,
|
|
|
},
|
|
|
setup() {
|
|
|
let current = ref('MR');
|
|
|
let statusShow = ref(1);
|
|
|
- //const [registerDrawer, { openDrawer }] = useDrawer();
|
|
|
- const [registerModal, { openModal }] = useModal();
|
|
|
- const registerModal1 = registerModal,
|
|
|
- openModal1 = openModal;
|
|
|
- const registerModalMR = registerModal,
|
|
|
- openModalMR = openModal;
|
|
|
- const registerModalDR = registerModal,
|
|
|
- openModalDR = openModal;
|
|
|
- const registerModalER = registerModal,
|
|
|
- openModalER = openModal;
|
|
|
-
|
|
|
- const registerModalSR = registerModal,
|
|
|
- openModalSR = openModal;
|
|
|
const [registerTable, { getSelectRows, setProps, reload, setSelectedRowKeys }] = useTable({
|
|
|
title: '地图资源审核列表',
|
|
|
api: (param) => {
|
|
|
@@ -151,7 +124,7 @@ export default defineComponent({
|
|
|
}, //求接口
|
|
|
//dataSource: dataSources, //表格的数据
|
|
|
columns,
|
|
|
- rowKey: 'serviceid',
|
|
|
+ rowKey: 'SERVICEID',
|
|
|
formConfig: {
|
|
|
labelWidth: 90,
|
|
|
schemas: searchFormSchemaMR,
|
|
|
@@ -180,6 +153,7 @@ export default defineComponent({
|
|
|
fullScreen: false,
|
|
|
},
|
|
|
});
|
|
|
+
|
|
|
const moment = Moment;
|
|
|
const ischect = ref(true)
|
|
|
const sourceTypes = ref([
|
|
|
@@ -198,9 +172,9 @@ export default defineComponent({
|
|
|
// return { disabled: false };
|
|
|
// }
|
|
|
};
|
|
|
+ const [registerModal, { openModal }] = useModal();
|
|
|
watch(
|
|
|
- () => current.value,
|
|
|
- (val) => {
|
|
|
+ () => current.value, (val) => {
|
|
|
let searchFormSchema = searchFormSchemaMR;
|
|
|
let title = '地图资源审核列表';
|
|
|
if (val === 'MR') {
|
|
|
@@ -241,27 +215,16 @@ export default defineComponent({
|
|
|
ischect.value = false;
|
|
|
const res = (await queryResourceById(record?.SERVICEID)) as any;
|
|
|
if (res) {
|
|
|
- const result = Object.assign(res.metadata, res.servicebase);
|
|
|
- if (current.value === 'MR') {
|
|
|
- openModalMR(true, {
|
|
|
- record: result,
|
|
|
- isUpdate: true,
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- if (current.value === 'DR') {
|
|
|
- openModalDR(true, {
|
|
|
- record: result,
|
|
|
- isUpdate: true,
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- if (current.value === 'ER') {
|
|
|
- openModalER(true, {
|
|
|
- record: result,
|
|
|
- isUpdate: true,
|
|
|
- });
|
|
|
+ if (res.dataVersionConf) {
|
|
|
+ res.metadata.isnew = res.servicebase.isnew = res.dataVersionConf.active == 'Y' ? "1" : "0";
|
|
|
}
|
|
|
+ const result = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
|
|
|
+ if (record.bussid) res.bussid = record.BUSSID;
|
|
|
+ openModal(true, {
|
|
|
+ record: result,
|
|
|
+ isUpdate: true,
|
|
|
+ isView: true,
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -270,10 +233,12 @@ export default defineComponent({
|
|
|
*/
|
|
|
function handleEdit(record: Recordable) {
|
|
|
ischect.value = true;
|
|
|
- openModal1(true, {
|
|
|
- record,
|
|
|
- isUpdate: true,
|
|
|
- });
|
|
|
+ setTimeout(() => {
|
|
|
+ openModal(true, {
|
|
|
+ record,
|
|
|
+ isUpdate: true,
|
|
|
+ });
|
|
|
+ }, 100);
|
|
|
}
|
|
|
/**
|
|
|
* 浏览
|
|
|
@@ -281,19 +246,19 @@ export default defineComponent({
|
|
|
async function handleVliew(record: Recordable) {
|
|
|
//场景资源
|
|
|
if (current.value === 'ER') {
|
|
|
- window.open(
|
|
|
- `http://192.168.119.143:8080/onemapV5.0/sceneview.html?${record.SERVICEID}`,
|
|
|
- 'target',
|
|
|
- ''
|
|
|
- );
|
|
|
+ window.open(`http://192.168.119.143:8080/onemapV5.0/sceneview.html?${record.SERVICEID}`, 'target', '');
|
|
|
}
|
|
|
//地图资源
|
|
|
if (current.value === 'MR') {
|
|
|
- window.open(
|
|
|
- `http://192.168.119.143:8080/onemapV5.0/mapview.html?${record.SERVICEID}`,
|
|
|
- 'target',
|
|
|
- ''
|
|
|
- );
|
|
|
+ window.open(`http://192.168.119.143:8080/onemapV5.0/mapview.html?${record.SERVICEID}`, 'target', '');
|
|
|
+ }
|
|
|
+ //地图资源
|
|
|
+ if (current.value === 'SR') {
|
|
|
+ var res = (await queryResourceById(record?.SERVICEID)) as any;
|
|
|
+ res = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
|
|
|
+ if (res) {
|
|
|
+ window.open(`./mapview.html?onlineIde_${res.servicealiasname}`, 'target', '');
|
|
|
+ }
|
|
|
}
|
|
|
//文件资源
|
|
|
if (current.value === 'DR') {
|
|
|
@@ -348,20 +313,6 @@ export default defineComponent({
|
|
|
console.log('审核数据', getSelectRows());
|
|
|
};
|
|
|
|
|
|
- onBeforeMount(async () => { });
|
|
|
- onMounted(() => {
|
|
|
- getResourceGroupTotal();
|
|
|
- })
|
|
|
-
|
|
|
- //分组统计所有资源数量
|
|
|
- function getResourceGroupTotal() {
|
|
|
- getResourceGroup().then((r) => {
|
|
|
- if (r.resp_code == 1 && r.resp_msg == '查询成功') {
|
|
|
- r.datas.map(i => i.name = i.SERVICETYPE == 'MR' ? '地图资源' : i.SERVICETYPE == 'ER' ? '场景资源' : i.SERVICETYPE == 'DR' ? '文件资源' : '组件资源')
|
|
|
- sourceTypes.value = r.datas;
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
|
|
|
return {
|
|
|
statusShow,
|
|
|
@@ -371,11 +322,6 @@ export default defineComponent({
|
|
|
sourceTypes,
|
|
|
registerTable,
|
|
|
registerModal,
|
|
|
- registerModal1,
|
|
|
- registerModalMR,
|
|
|
- registerModalDR,
|
|
|
- registerModalER,
|
|
|
- registerModalSR,
|
|
|
handleVliew,
|
|
|
handleDetail,
|
|
|
handleEdit,
|