|
|
@@ -11,75 +11,37 @@
|
|
|
<BasicTable @register="registerTable" @fetch-success="onFetchSuccess">
|
|
|
<template #toolbar>
|
|
|
<Authority>
|
|
|
- <a-button type="primary" @click="batchExamine" :disabled="hasBatchDelete">指定IP设置</a-button>
|
|
|
+ <a-button type="primary" @click="showModal">指定IP设置</a-button>
|
|
|
</Authority>
|
|
|
</template>
|
|
|
|
|
|
<template #action="{ record }">
|
|
|
<TableAction :actions="[
|
|
|
{
|
|
|
- label: '浏览',
|
|
|
- ifShow: current == 'DR' ? false : true,
|
|
|
- onClick: handleVliew.bind(null, record),
|
|
|
+ label: '指定IP设置',
|
|
|
+ onClick: showModal.bind(null, record),
|
|
|
},
|
|
|
{
|
|
|
- label: '查看',
|
|
|
- onClick: handleDetail.bind(null, record),
|
|
|
- },
|
|
|
- {
|
|
|
- label: '审核',
|
|
|
- disabled: statusShow == 1 ? false : true,
|
|
|
- color: 'warning',
|
|
|
- onClick: handleEdit.bind(null, record),
|
|
|
+ label: '删除',
|
|
|
+ onClick: handleDel.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 #FLOWNAME="{ record }">
|
|
|
- {{ record.FLOWNAME.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>
|
|
|
+ </div>
|
|
|
+ <span style="clear: both;"></span>
|
|
|
+ </a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
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,
|
|
|
@@ -90,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 } from 'ant-design-vue';
|
|
|
-import { queryResourceById } from '/@/api/resource/map';
|
|
|
+import { Switch, Popconfirm, message } from 'ant-design-vue';
|
|
|
import Moment from 'moment';
|
|
|
-import { updateExamine } from '/@/api/resource/updateExamine';
|
|
|
+import { getProxyList, proxySave, proxyDel } from '/@/api/resource/proxy';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { useAppStore } from '/@/store/modules/app';
|
|
|
@@ -103,15 +63,10 @@ export default defineComponent({
|
|
|
name: 'RoleManagement',
|
|
|
components: {
|
|
|
BasicTable,
|
|
|
- check,
|
|
|
TableAction,
|
|
|
Authority,
|
|
|
Switch,
|
|
|
- Popconfirm,
|
|
|
- MapResourceUpload,
|
|
|
- FileResourceUpload,
|
|
|
- AssResourceUpload,
|
|
|
- SceneResourceUpload,
|
|
|
+ Popconfirm
|
|
|
},
|
|
|
setup() {
|
|
|
const appStore = useAppStore();
|
|
|
@@ -124,7 +79,7 @@ export default defineComponent({
|
|
|
api: (param) => {
|
|
|
statusShow.value = param.checkStatus;
|
|
|
const data = Object.assign(param, { serviceType: current.value });
|
|
|
- return updateExamine(data);
|
|
|
+ return getProxyList(data);
|
|
|
}, //求接口
|
|
|
//dataSource: dataSources, //表格的数据
|
|
|
columns,
|
|
|
@@ -249,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,
|
|
|
- });
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -279,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, {
|
|
|
@@ -326,34 +238,44 @@ 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 visible = ref(false);
|
|
|
+
|
|
|
+ const disabled = ref(true);
|
|
|
+ const showModal = (e) => {
|
|
|
+ visible.value = true;
|
|
|
+ disabled.value = e ? true : false;
|
|
|
+ if (e) {
|
|
|
+ formState.value.serviceid = e.SERVICEID;
|
|
|
}
|
|
|
};
|
|
|
- const batchExamine = () => {
|
|
|
- console.log('审核数据', getSelectRows());
|
|
|
+
|
|
|
+ function handleOk() {
|
|
|
+ proxySave(formState.value).then((r) => {
|
|
|
+ if (r.resp_code == 0) {
|
|
|
+ visible.value = false;
|
|
|
+ formState.value.ipaddress = '';
|
|
|
+ formState.value.serviceid = '';
|
|
|
+ message.success('保存成功');
|
|
|
+ reload();
|
|
|
+ } else {
|
|
|
+ message.error(r.resp_msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
};
|
|
|
+ const formState = ref({
|
|
|
+ ipaddress: "",
|
|
|
+ serviceid: ""
|
|
|
+ });
|
|
|
|
|
|
|
|
|
return {
|
|
|
+ disabled,
|
|
|
+ labelCol: { span: 2 },
|
|
|
+ wrapperCol: { span: 6 },
|
|
|
+ formState,
|
|
|
+ visible,
|
|
|
+ handleOk,
|
|
|
+ showModal,
|
|
|
statusShow,
|
|
|
current,
|
|
|
moment,
|
|
|
@@ -361,15 +283,12 @@ export default defineComponent({
|
|
|
sourceTypes,
|
|
|
registerTable,
|
|
|
registerModal,
|
|
|
- handleVliew,
|
|
|
- handleDetail,
|
|
|
+ handleDel,
|
|
|
handleEdit,
|
|
|
handleSuccess,
|
|
|
RoleEnum,
|
|
|
hasBatchDelete,
|
|
|
handleDeleteOrBatchDelete,
|
|
|
- statusChange,
|
|
|
- batchExamine,
|
|
|
selectHandle,
|
|
|
onFetchSuccess
|
|
|
};
|
|
|
@@ -377,6 +296,27 @@ export default defineComponent({
|
|
|
});
|
|
|
</script>
|
|
|
<style scoped lang="less">
|
|
|
+.wapper {
|
|
|
+ padding: 20px;
|
|
|
+ height: 130px;
|
|
|
+}
|
|
|
+
|
|
|
+.wapper p {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ height: 43px;
|
|
|
+}
|
|
|
+
|
|
|
+.wapper p span {
|
|
|
+ float: left;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+}
|
|
|
+
|
|
|
+.wapper p input {
|
|
|
+ float: left;
|
|
|
+ width: 430px;
|
|
|
+}
|
|
|
+
|
|
|
.examine-container {
|
|
|
display: flex;
|
|
|
height: 100%;
|
|
|
@@ -404,7 +344,6 @@ export default defineComponent({
|
|
|
border-radius: 2px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-
|
|
|
.active {
|
|
|
background: #0671dd;
|
|
|
color: #fff;
|