|
@@ -1,21 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <BasicTable
|
|
|
|
|
- :rowSelection="{ type: 'checkbox' }"
|
|
|
|
|
- @register="registerTable"
|
|
|
|
|
- :clickToRowSelect="false"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <BasicTable :rowSelection="{ type: 'checkbox' }" @register="registerTable" :clickToRowSelect="false">
|
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
|
<Authority>
|
|
<Authority>
|
|
|
<a-button type="primary" @click="handleCreate">新增地图</a-button>
|
|
<a-button type="primary" @click="handleCreate">新增地图</a-button>
|
|
|
</Authority>
|
|
</Authority>
|
|
|
<Authority>
|
|
<Authority>
|
|
|
- <Popconfirm
|
|
|
|
|
- title="您确定要批量删除数据"
|
|
|
|
|
- ok-text="确定"
|
|
|
|
|
- cancel-text="取消"
|
|
|
|
|
- @confirm="handleDeleteOrBatchDelete(null)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Popconfirm title="您确定要批量删除数据" ok-text="确定" cancel-text="取消" @confirm="handleDeleteOrBatchDelete(null)">
|
|
|
<a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
|
|
<a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
|
|
|
</Popconfirm>
|
|
</Popconfirm>
|
|
|
</Authority>
|
|
</Authority>
|
|
@@ -25,52 +16,47 @@
|
|
|
@change="(checked: boolean) => statusChange(checked, record)" />
|
|
@change="(checked: boolean) => statusChange(checked, record)" />
|
|
|
</template> -->
|
|
</template> -->
|
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
|
- <TableAction
|
|
|
|
|
- :actions="[
|
|
|
|
|
- {
|
|
|
|
|
- label: '浏览',
|
|
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
|
|
- onClick: handleViewMap.bind(null, record),
|
|
|
|
|
|
|
+ <TableAction :actions="[
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '浏览',
|
|
|
|
|
+ icon: '' /**clarity:note-edit-line*/,
|
|
|
|
|
+ onClick: handleViewMap.bind(null, record),
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '查看',
|
|
|
|
|
+ icon: '' /**clarity:note-edit-line*/,
|
|
|
|
|
+ onClick: handleView.bind(null, record),
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '编辑',
|
|
|
|
|
+ icon: '' /**clarity:note-edit-line*/,
|
|
|
|
|
+ color: 'warning',
|
|
|
|
|
+ onClick: handleEdit.bind(null, record),
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '删除',
|
|
|
|
|
+ icon: '' /**ant-design:delete-outlined'*/,
|
|
|
|
|
+ color: 'error',
|
|
|
|
|
+ ifShow: record.roleType != RoleEnum.SYS_ADMIN,
|
|
|
|
|
+ popConfirm: {
|
|
|
|
|
+ title: '是否确认删除',
|
|
|
|
|
+ confirm: handleDelete.bind(null, record),
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: '查看',
|
|
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
|
|
- onClick: handleView.bind(null, record),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '编辑',
|
|
|
|
|
- icon: '' /**clarity:note-edit-line*/,
|
|
|
|
|
- color: 'warning',
|
|
|
|
|
- onClick: handleEdit.bind(null, record),
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- label: '删除',
|
|
|
|
|
- icon: '' /**ant-design:delete-outlined'*/,
|
|
|
|
|
- color: 'error',
|
|
|
|
|
- ifShow: record.roleType != RoleEnum.SYS_ADMIN,
|
|
|
|
|
- popConfirm: {
|
|
|
|
|
- title: '是否确认删除',
|
|
|
|
|
- confirm: handleDelete.bind(null, record),
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- ]"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ ]" />
|
|
|
</template>
|
|
</template>
|
|
|
<template #pdate="{ record }">
|
|
<template #pdate="{ record }">
|
|
|
- <Tag
|
|
|
|
|
- :color="'red'"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Tag :color="'red'">
|
|
|
{{
|
|
{{
|
|
|
- record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : ''
|
|
|
|
|
|
|
+ record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : ''
|
|
|
}}
|
|
}}
|
|
|
</Tag>
|
|
</Tag>
|
|
|
</template>
|
|
</template>
|
|
|
<template #status="{ record }">
|
|
<template #status="{ record }">
|
|
|
- <Tag
|
|
|
|
|
- :style="`color:${ record.status === 3 || record.status === 3 ? 'red' : '#05B069' };`"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : '#05B069'};`">
|
|
|
{{
|
|
{{
|
|
|
- record.status === 0 ? '待审核' : (record.status === 1 ? '审核通过' : (record.status === 2 ? '审核不通过' : ( record.status === 3 ? '被驳回' : '未提交' )))
|
|
|
|
|
|
|
+ record.status === 0 ? '待审核' : (record.status === 1 ? '审核通过' : (record.status === 2 ? '审核不通过' : (record.status
|
|
|
|
|
+ === 3 ? '被驳回' : '未提交')))
|
|
|
}}
|
|
}}
|
|
|
</Tag>
|
|
</Tag>
|
|
|
</template>
|
|
</template>
|
|
@@ -80,7 +66,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, nextTick,onBeforeMount } from 'vue';
|
|
|
|
|
|
|
+import { defineComponent, nextTick, onBeforeMount,ref } from 'vue';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
import { delRole, getRoleListByPage, setRoleStatus } from '/@/api/system/system';
|
|
import { delRole, getRoleListByPage, setRoleStatus } from '/@/api/system/system';
|
|
|
// import { useDrawer } from '/@/components/Drawer';
|
|
// import { useDrawer } from '/@/components/Drawer';
|
|
@@ -93,18 +79,32 @@ import { Authority } from '/@/components/Authority';
|
|
|
import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
|
|
import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { Switch, Popconfirm } from 'ant-design-vue';
|
|
import { Switch, Popconfirm } from 'ant-design-vue';
|
|
|
-import { list,deleteService } from '/@/api/resource/map';
|
|
|
|
|
-import Moment from 'moment'
|
|
|
|
|
|
|
+import { list, deleteService, mapList } from '/@/api/resource/map';
|
|
|
|
|
+import Moment from 'moment';
|
|
|
|
|
+import { session } from "/@/utils/Memory.js";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'RoleManagement',
|
|
name: 'RoleManagement',
|
|
|
components: { BasicTable, MapDrawer, MapSourceModal, TableAction, Authority, Switch, Popconfirm },
|
|
components: { BasicTable, MapDrawer, MapSourceModal, TableAction, Authority, Switch, Popconfirm },
|
|
|
setup() {
|
|
setup() {
|
|
|
|
|
+ const tagValue = ref('')
|
|
|
|
|
+ const getData = () => {
|
|
|
|
|
+ const formData = new FormData();
|
|
|
|
|
+ formData.append("interfaceName", "antu.space.provider.sservicebase.ServiceBaseMetaDataViewProvider");
|
|
|
|
|
+ formData.append("methodName", "getResourcePagedList");
|
|
|
|
|
+ formData.append("args[]", session.getItem('tokenV2'));
|
|
|
|
|
+ formData.append("args[]", `{"type":"MR","fields":{"DATA":["serviceid","servicename","servicetype","servicealiasname"],"METADATA":["publisher ","publishdate"]},"pageIndex":1,"pageSize":10, "tagValue":"${tagValue.value||""}" }`);
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ mapList(formData).then((res) => {
|
|
|
|
|
+ resolve(res)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
//const [registerDrawer, { openDrawer }] = useDrawer();
|
|
//const [registerDrawer, { openDrawer }] = useDrawer();
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
const [registerTable, { setProps, reload, setSelectedRowKeys }] = useTable({
|
|
const [registerTable, { setProps, reload, setSelectedRowKeys }] = useTable({
|
|
|
title: '地图资源列表',
|
|
title: '地图资源列表',
|
|
|
- api: list,
|
|
|
|
|
|
|
+ api: getData,
|
|
|
columns,
|
|
columns,
|
|
|
formConfig: {
|
|
formConfig: {
|
|
|
labelWidth: 100,
|
|
labelWidth: 100,
|
|
@@ -124,6 +124,9 @@ export default defineComponent({
|
|
|
pagination: {
|
|
pagination: {
|
|
|
hideOnSinglePage: false,
|
|
hideOnSinglePage: false,
|
|
|
},
|
|
},
|
|
|
|
|
+ handleSearchInfoFn: (t) => {
|
|
|
|
|
+ tagValue.value = t.resTag
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
const moment = Moment
|
|
const moment = Moment
|
|
|
const { createMessage } = useMessage();
|
|
const { createMessage } = useMessage();
|
|
@@ -162,19 +165,19 @@ export default defineComponent({
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function handleViewMap(record: Recordable){
|
|
|
|
|
- window.open(`http://106.12.170.138:8080/onemapV5.0/mapview.html?${record.serviceid}`,'target',"")
|
|
|
|
|
|
|
+ function handleViewMap(record: Recordable) {
|
|
|
|
|
+ window.open(`http://106.12.170.138:8080/onemapV5.0/mapview.html?${record.serviceid}`, 'target', "")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const handleDelete = async(record: Recordable) => {
|
|
|
|
|
- if(record?.serviceid){
|
|
|
|
|
|
|
+ const handleDelete = async (record: Recordable) => {
|
|
|
|
|
+ if (record?.serviceid) {
|
|
|
const res = await deleteService(record?.serviceid)
|
|
const res = await deleteService(record?.serviceid)
|
|
|
- if(res?.status !== '-1'){
|
|
|
|
|
|
|
+ if (res?.status !== '-1') {
|
|
|
reload();
|
|
reload();
|
|
|
- createMessage.success('删除成功!',1)
|
|
|
|
|
|
|
+ createMessage.success('删除成功!', 1)
|
|
|
}
|
|
}
|
|
|
- else{
|
|
|
|
|
- createMessage.error('删除失败!失败原因:'+res?.message,1)
|
|
|
|
|
|
|
+ else {
|
|
|
|
|
+ createMessage.error('删除失败!失败原因:' + res?.message, 1)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -207,7 +210,7 @@ export default defineComponent({
|
|
|
reload();
|
|
reload();
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
- onBeforeMount(async()=>{
|
|
|
|
|
|
|
+ onBeforeMount(async () => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|