|
|
@@ -12,7 +12,6 @@
|
|
|
<template #toolbar>
|
|
|
<Authority>
|
|
|
<a-button type="primary" @click="showModal">指定IP设置</a-button>
|
|
|
- <!-- <a-button type="primary" @click="batchExamine" :disabled="hasBatchDelete">指定IP设置</a-button> -->
|
|
|
</Authority>
|
|
|
</template>
|
|
|
|
|
|
@@ -20,58 +19,20 @@
|
|
|
<TableAction :actions="[
|
|
|
{
|
|
|
label: '指定IP设置',
|
|
|
- ifShow: current == 'DR' ? false : true,
|
|
|
onClick: showModal.bind(null, record),
|
|
|
},
|
|
|
{
|
|
|
label: '删除',
|
|
|
- onClick: handleDetail.bind(null, record),
|
|
|
+ onClick: handleDel.bind(null, record),
|
|
|
},
|
|
|
- // {
|
|
|
- // label: '审核',
|
|
|
- // disabled: statusShow == 1 ? false : true,
|
|
|
- // color: 'warning',
|
|
|
- // onClick: handleEdit.bind(null, record),
|
|
|
- // },
|
|
|
]" />
|
|
|
</template>
|
|
|
- <template #pdate="{ record }">
|
|
|
- <a-tag :color="'red'">
|
|
|
- {{ record.publishdate ? moment(record.publishdate).format('YYYY-MM-DD HH:mm:ss') : '' }}
|
|
|
- </a-tag>
|
|
|
- </template>
|
|
|
- <template #SERVICEID="{ record }">
|
|
|
- {{ record.SERVICEID.replace('上传', '') }}
|
|
|
- </template>
|
|
|
- <template #status="{ record }">
|
|
|
- <a-tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
|
|
|
- {{
|
|
|
- !record.status ? '待审核' : record.status == 2 ? '审核不通过' : record.status ? '审核通过' : ''
|
|
|
- }}
|
|
|
- </a-tag>
|
|
|
- </template>
|
|
|
- <template #BLZT="{ record }">
|
|
|
- <a-tag :style="`color:${record.status === 3 || record.status === 3 ? 'red' : ''};`">
|
|
|
- {{
|
|
|
- record.BLZT
|
|
|
- }}
|
|
|
- </a-tag>
|
|
|
- </template>
|
|
|
</BasicTable>
|
|
|
- <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="registerModal"
|
|
|
- @success="handleSuccess"></scene-resource-upload>
|
|
|
- <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>
|
|
|
<a-modal v-model:visible="visible" :label-col="labelCol" :wrapper-col="wrapperCol" title="代理IP地址设置" @ok="handleOk">
|
|
|
<div class="wapper">
|
|
|
- <p><span>IP地址:</span><a-input v-model:value="formState.ipaddress" /></p>
|
|
|
- <p><span>服务ID:</span><a-input v-model:value="formState.serviceid" /></p>
|
|
|
+ <p><span>IP地址: </span><a-input v-model:value="formState.ipaddress" /></p>
|
|
|
+ <p><span>服务ID: </span><a-input v-model:value="formState.serviceid" /></p>
|
|
|
</div>
|
|
|
<span style="clear: both;"></span>
|
|
|
</a-modal>
|
|
|
@@ -81,13 +42,6 @@
|
|
|
import { defineComponent, nextTick, ref, watch } from 'vue';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
import { delRole, setRoleStatus } from '/@/api/system/system';
|
|
|
-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';
|
|
|
import {
|
|
|
columns,
|
|
|
searchFormSchemaMR,
|
|
|
@@ -98,11 +52,9 @@ import {
|
|
|
import { RoleEnum } from '/@/enums/roleEnum';
|
|
|
import { Authority } from '/@/components/Authority';
|
|
|
import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
|
|
|
-import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { Switch, Popconfirm, message } from 'ant-design-vue';
|
|
|
-import { queryResourceById } from '/@/api/resource/map';
|
|
|
import Moment from 'moment';
|
|
|
-import { getProxyList, proxySave } from '/@/api/resource/proxy';
|
|
|
+import { getProxyList, proxySave, proxyDel } from '/@/api/resource/proxy';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { useAppStore } from '/@/store/modules/app';
|
|
|
@@ -111,15 +63,10 @@ export default defineComponent({
|
|
|
name: 'RoleManagement',
|
|
|
components: {
|
|
|
BasicTable,
|
|
|
- check,
|
|
|
TableAction,
|
|
|
Authority,
|
|
|
Switch,
|
|
|
- Popconfirm,
|
|
|
- MapResourceUpload,
|
|
|
- FileResourceUpload,
|
|
|
- AssResourceUpload,
|
|
|
- SceneResourceUpload,
|
|
|
+ Popconfirm
|
|
|
},
|
|
|
setup() {
|
|
|
const appStore = useAppStore();
|
|
|
@@ -257,21 +204,16 @@ export default defineComponent({
|
|
|
/**
|
|
|
* 详情
|
|
|
*/
|
|
|
- async function handleDetail(record: Recordable) {
|
|
|
- ischect.value = false;
|
|
|
- const res = (await queryResourceById(record?.SERVICEID)) as any;
|
|
|
- if (res) {
|
|
|
- if (res.dataVersionConf) {
|
|
|
- res.metadata.isnew = res.servicebase.isnew = res.dataVersionConf.active == 'Y' ? "1" : "0";
|
|
|
+ async function handleDel(record: Recordable) {
|
|
|
+ console.log(record);
|
|
|
+ proxyDel(record).then((r) => {
|
|
|
+ if (r) {
|
|
|
+ message.success(r.resp_msg);
|
|
|
+ reload();
|
|
|
+ } else {
|
|
|
+ message.error('删除代理失败!');
|
|
|
}
|
|
|
- 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,
|
|
|
- });
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -287,45 +229,7 @@ export default defineComponent({
|
|
|
appStore.setRouterPushAuditFlag(false)
|
|
|
}, 100);
|
|
|
}
|
|
|
- /**
|
|
|
- * 浏览
|
|
|
- */
|
|
|
- async function handleVliew(record: Recordable) {
|
|
|
- //场景资源
|
|
|
- if (current.value === 'ER') {
|
|
|
- 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', '');
|
|
|
- }
|
|
|
- //地图资源
|
|
|
- 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') {
|
|
|
- const obj = {
|
|
|
- id: record['fileid'],
|
|
|
- userid: record['userid'],
|
|
|
- parentId: session.getItem('sysFild').dirId,
|
|
|
- };
|
|
|
- const res = (await getFileUrl(obj)) as any;
|
|
|
- if (res) {
|
|
|
- const fileName = res.fileName;
|
|
|
- console.log('下载文件', fileName);
|
|
|
- const url = res.url;
|
|
|
- window.open(url);
|
|
|
- }
|
|
|
- }
|
|
|
- if (current.value === 'DR') {
|
|
|
- console.log('组件');
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
function handleSuccess() {
|
|
|
openModal(false, {
|
|
|
@@ -334,37 +238,15 @@ export default defineComponent({
|
|
|
reload();
|
|
|
}
|
|
|
|
|
|
- const statusChange = async (checked, record) => {
|
|
|
- setProps({
|
|
|
- loading: true,
|
|
|
- });
|
|
|
- setSelectedRowKeys([]);
|
|
|
- resetSelectedRowKeys();
|
|
|
- const newStatus = checked ? 1 : 0;
|
|
|
- const { createMessage } = useMessage();
|
|
|
- try {
|
|
|
- await setRoleStatus(record.id, newStatus);
|
|
|
- if (newStatus) {
|
|
|
- createMessage.success(`启用成功`);
|
|
|
- } else {
|
|
|
- createMessage.success('禁用成功');
|
|
|
- }
|
|
|
- } finally {
|
|
|
- setProps({
|
|
|
- loading: false,
|
|
|
- });
|
|
|
- reload();
|
|
|
- }
|
|
|
- };
|
|
|
- const batchExamine = () => {
|
|
|
- console.log('审核数据', getSelectRows());
|
|
|
- };
|
|
|
-
|
|
|
const visible = ref(false);
|
|
|
|
|
|
+ const disabled = ref(true);
|
|
|
const showModal = (e) => {
|
|
|
visible.value = true;
|
|
|
- if (e) formState.value.serviceid = e.SERVICEID;
|
|
|
+ disabled.value = e ? true : false;
|
|
|
+ if (e) {
|
|
|
+ formState.value.serviceid = e.SERVICEID;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
function handleOk() {
|
|
|
@@ -387,6 +269,7 @@ export default defineComponent({
|
|
|
|
|
|
|
|
|
return {
|
|
|
+ disabled,
|
|
|
labelCol: { span: 2 },
|
|
|
wrapperCol: { span: 6 },
|
|
|
formState,
|
|
|
@@ -400,15 +283,12 @@ export default defineComponent({
|
|
|
sourceTypes,
|
|
|
registerTable,
|
|
|
registerModal,
|
|
|
- handleVliew,
|
|
|
- handleDetail,
|
|
|
+ handleDel,
|
|
|
handleEdit,
|
|
|
handleSuccess,
|
|
|
RoleEnum,
|
|
|
hasBatchDelete,
|
|
|
handleDeleteOrBatchDelete,
|
|
|
- statusChange,
|
|
|
- batchExamine,
|
|
|
selectHandle,
|
|
|
onFetchSuccess
|
|
|
};
|
|
|
@@ -464,7 +344,6 @@ export default defineComponent({
|
|
|
border-radius: 2px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-
|
|
|
.active {
|
|
|
background: #0671dd;
|
|
|
color: #fff;
|