Commit 1ac8b847 authored by 邓超's avatar 邓超

fix: 替换图片库路径,表分组接口替换,添加检测分组功能

parent f564e99c
Pipeline #55728 waiting for manual action with stages
/*
* @Author: dengchao 754083046@qq.com
* @Date: 2022-05-09 11:19:45
* @LastEditors: dengchao 754083046@qq.com
* @LastEditTime: 2022-07-19 14:56:48
* @FilePath: \maintenance\src\components\GlobalHeader\RightContent.jsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import React, { useContext, useState, useEffect } from 'react';
import { RouteContext } from '@ant-design/pro-layout';
import { Breadcrumb } from 'antd';
......@@ -51,7 +59,7 @@ const GlobalHeaderRight = props => {
{/* <span className={styles.left}>{value.title}</span> */}
<Breadcrumb {...value.breadcrumb} className={styles.lineHeight} />
<div style={{ flex: 1 }} />
<div style={{ margin: '0 10px' }}>
{/* <div style={{ margin: '0 10px' }}>
<a
target="_blank"
href={`${window.location.origin}/civmanage/site/content${dosRouter}`}
......@@ -59,9 +67,9 @@ const GlobalHeaderRight = props => {
>
文档说明
</a>
</div>
</div> */}
{/* <Colophon /> */}
<div style={{ margin: '0 10px' }}>
{/* <div style={{ margin: '0 10px' }}>
<a
target="_blank"
href={`${window.location.origin}/cityoms3/4.0.html`}
......@@ -69,7 +77,7 @@ const GlobalHeaderRight = props => {
>
运维平台4.0
</a>
</div>
</div> */}
{/* <HeaderSearch
className={`${styles.action} ${styles.search} ${styles.toRight}`}
placeholder="站内搜索"
......
......@@ -213,7 +213,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
localStorage.setItem('pd2-baseUrl', baseUrl)
}
console.log(fileList[0].url)
this.props.onChange && this.props.onChange(maxLen === 1 ? fileList[0].url.replace('web4\\', '') : fileList.map(f => f.url.replace('web4\\', '')));
this.props.onChange && this.props.onChange(maxLen === 1 ? fileList[0].url.replace('civweb4\\', '') : fileList.map(f => f.url.replace('civweb4\\', '')));
this.setState({ fileList, wallModalVisible: false });
};
......@@ -265,7 +265,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
return path
}
if (path && path.indexOf('assets') === 0) {
return `${window.location.origin}/web4/${path}`.replace(/\\/g, '/')
return `${window.location.origin}/civweb4/${path}`.replace(/\\/g, '/')
}
return `${window.location.origin}/${path}`.replace(/\\/g, '/')
}
......
......@@ -369,7 +369,7 @@ const AddModal = props => {
aa.push({ name: item, key: index, ID: index, children: arr[item] });
bb.push(item);
});
console.log(aa);
console.log(aa,'aaaaaaaaaaaaa');
console.log(arr);
console.log(newArr);
setSelectGroup(newArr);
......
......@@ -17,6 +17,7 @@ import {
Card,
Dropdown,
Menu,
Modal,
} from 'antd';
import {
EditOutlined,
......@@ -30,6 +31,9 @@ import {
DoubleRightOutlined,
MenuOutlined,
DatabaseOutlined,
FunnelPlotOutlined,
BranchesOutlined,
ToolOutlined,
} from '@ant-design/icons';
import PageContainer from '@/components/BasePageContainer';
......@@ -37,6 +41,8 @@ import {
CM_Table_LoadTable,
removeTable,
loadUnattachedTables,
checkTableType,
regroupTableType,
} from '@/services/tablemanager/tablemanager';
import { useHistory } from 'react-router-dom';
import styles from './index.less';
......@@ -75,6 +81,8 @@ const TableManager = props => {
const [hoverItemIndex, setHoverItemIndex] = useState(0); // hover流程索引
const [pickIndex, setPickIndex] = useState(0);
const [tableType, setTableType] = useState(defaultFields[0].value);
const [groupPopVisible, setgGroupPopVisible] = useState(false);
const [checkMsg, setCheckMsg] = useState();
const initNum = useRef(0);
useEffect(
......@@ -448,7 +456,27 @@ const TableManager = props => {
setTableType(e.key);
AddTable();
};
// 检查表类型重分组
const checkGroup = () => {
checkTableType().then(res => {
console.log(res);
if (res.data === '检查完成,一切正常!') {
notification.success({ message: '提示', duration: 3, description: res.data });
} else {
setCheckMsg(res.data);
setgGroupPopVisible(true);
}
});
};
const getNewGroup = () => {
regroupTableType().then(res => {
if (res.code === 0) {
setFlag(flag + 1);
setgGroupPopVisible(false);
notification.success({ message: '提示', duration: 3, description: '执行成功' });
}
});
};
const menu = (
<Menu
onClick={onMenuClick}
......@@ -468,7 +496,20 @@ const TableManager = props => {
})}
>
<div style={{ display: `${treeVisible ? 'block' : 'none'}` }}>
<span className={styles.processTitle}>表分组</span>
<span className={styles.processTitle}>
表分组
<Tooltip title="检查表类型重分组">
<ToolOutlined
onClick={() => checkGroup()}
style={{
fontSize: '20px',
color: '#1890FF',
cursor: 'pointer',
marginLeft: '130px',
}}
/>
</Tooltip>
</span>
<hr className={styles.splitLine} />
<div
......@@ -647,6 +688,14 @@ const TableManager = props => {
callBackSubmit={onSubmit}
/>
)}
<Modal
title="重分组表类型"
visible={groupPopVisible}
onOk={getNewGroup}
onCancel={() => setgGroupPopVisible(false)}
>
<div style={{ whiteSpace: 'pre-line', textAlign: 'justify' }}>{checkMsg}</div>
</Modal>
</PageContainer>
</Spin>
);
......
......@@ -2,12 +2,17 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-06-28 09:42:40
* @LastEditTime: 2022-07-19 10:57:34
* @LastEditors: dengchao 754083046@qq.com
*/
import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
// 检查表类型重分组
export const checkTableType = param => get(`${PUBLISH_SERVICE}/CaseManage/CheckTableType`, param);
// 执行重分组表类型
export const regroupTableType = param => get(`${PUBLISH_SERVICE}/CaseManage/RegroupTableType`, param);
// 1.获取所有已附加的表
export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTable`, param);
// export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTable`, param);
export const CM_Table_LoadTable = param => get(`${PUBLISH_SERVICE}/CaseManage/LoadTableV2`, param);
// 2.获取单张表的字段 CM_Table_ReloadFields
export const CM_Table_ReloadFields = param =>
get(`${CITY_SERVICE}/OMS.svc/CM_Table_ReloadFields`, param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment