Commit 4e1e7a5c authored by 皮倩雯's avatar 皮倩雯

fix: '优化数据库升级交互,优化web搭建调序配置'

parent c2247cca
Pipeline #62584 passed with stages
...@@ -90,7 +90,7 @@ const ProcessConfig = props => { ...@@ -90,7 +90,7 @@ const ProcessConfig = props => {
<Option value="多表显示">多表显示</Option> <Option value="多表显示">多表显示</Option>
<Option value="多表在办显示">多表在办显示</Option> <Option value="多表在办显示">多表在办显示</Option>
<Option value="表堆叠显示">表堆叠显示</Option> <Option value="表堆叠显示">表堆叠显示</Option>
<Option value="分派节点显示">分派节点显示</Option> {/* <Option value="分派节点显示">分派节点显示</Option> */}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="编码样式" name="coding12Checked"> <Form.Item label="编码样式" name="coding12Checked">
......
...@@ -378,30 +378,6 @@ const Master = props => { ...@@ -378,30 +378,6 @@ const Master = props => {
))} ))}
</Select> </Select>
</Item> </Item>
<Item name="qrCodename" label="二维码名称">
<Input placeholder="请输入二维码名称" />
</Item>
<Item
name="qrCodeurl"
label="二维码URL"
rules={[
{
validator: (rule, value) => {
let aa = form.getFieldValue().qrCodeurl;
let regEn = /^((ht|f)tps?):\/\/([\w-]+(\.[\w-]+)*\/?)+(\?([\w\-\.,@?^=%&:\/~\+#]*)+)?$/;
if (aa) {
if (regEn.test(aa) === false) {
return Promise.reject('url必须以http(s)://开头');
}
}
return Promise.resolve();
},
},
]}
>
<Input placeholder="请输入二维码URL" />
</Item>
<Item label="展示方式" name="displayMode"> <Item label="展示方式" name="displayMode">
<Radio.Group onChange={onChange} value={radio}> <Radio.Group onChange={onChange} value={radio}>
<Radio value="卡片">卡片</Radio> <Radio value="卡片">卡片</Radio>
...@@ -436,6 +412,37 @@ const Master = props => { ...@@ -436,6 +412,37 @@ const Master = props => {
) : ( ) : (
<></> <></>
)} )}
<Row>
<Col span={8}>
<Item name="qrCodename" label="二维码名称" labelCol={{ span: 12 }}>
<Input placeholder="请输入二维码名称" />
</Item>
</Col>
<Col span={14}>
<Item
labelCol={{ span: 6 }}
name="qrCodeurl"
label="二维码URL"
rules={[
{
validator: (rule, value) => {
let aa = form.getFieldValue().qrCodeurl;
let regEn = /^((ht|f)tps?):\/\/([\w-]+(\.[\w-]+)*\/?)+(\?([\w\-\.,@?^=%&:\/~\+#]*)+)?$/;
if (aa) {
if (regEn.test(aa) === false) {
return Promise.reject('url必须以http(s)://开头');
}
}
return Promise.resolve();
},
},
]}
>
<Input placeholder="请输入二维码URL" />
</Item>
</Col>
</Row>
</Form> </Form>
<PreviewModal <PreviewModal
visible={previewModal} visible={previewModal}
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import PageContainer from '@/components/BasePageContainer'; import PageContainer from '@/components/BasePageContainer';
import { notification, Spin, Tabs, Button } from 'antd'; import { notification, Spin, Tabs, Button, Tooltip } from 'antd';
import { import {
getWebModuleTree, getWebModuleTree,
getWebconfig, getWebconfig,
...@@ -16,7 +16,7 @@ import { ...@@ -16,7 +16,7 @@ import {
SyncMapComponent, SyncMapComponent,
BatchDragSingleWebsite, BatchDragSingleWebsite,
} from '@/services/webConfig/api'; } from '@/services/webConfig/api';
import { EditTwoTone, ExclamationCircleOutlined } from '@ant-design/icons'; import { EditTwoTone, ExclamationCircleOutlined, OrderedListOutlined } from '@ant-design/icons';
import Modal from 'antd/lib/modal/Modal'; import Modal from 'antd/lib/modal/Modal';
import ProCard from '@ant-design/pro-card'; import ProCard from '@ant-design/pro-card';
import styles from './index.less'; import styles from './index.less';
...@@ -342,13 +342,27 @@ const WebConfigPage = props => { ...@@ -342,13 +342,27 @@ const WebConfigPage = props => {
<div style={{ display: 'inline-block', float: 'right', marginTop: '-15px' }}> <div style={{ display: 'inline-block', float: 'right', marginTop: '-15px' }}>
<strong style={{ marginRight: '15px' }}> <strong style={{ marginRight: '15px' }}>
地图组件数量 地图组件数量
{console.log(tabPaneItem)}
{tabPaneItem.existMapComponent < 9 ? ( {tabPaneItem.existMapComponent < 9 ? (
<span style={{ color: 'red' }}>{tabPaneItem.existMapComponent}</span> <Tooltip title="点击一键修复" placement="topRight">
<span style={{ color: 'red' }} onClick={() => SyncMap(tabPaneItem)}>
{tabPaneItem.existMapComponent}
</span>
/<span style={{ color: '#1890ff' }}>{tabPaneItem.mapComponent}</span>
</Tooltip>
) : ( ) : (
<span style={{ color: '#1890ff' }}>{tabPaneItem.existMapComponent}</span> <>
<span style={{ color: '#1890ff' }}>{tabPaneItem.existMapComponent}</span>
<span>/</span>
{tabPaneItem.existMapComponent !== 9 ? (
<span style={{ color: '#1890ff' }}>{tabPaneItem.existMapComponent}</span>
) : (
<span style={{ color: '#1890ff' }}>{tabPaneItem.mapComponent}</span>
)}
</>
)} )}
</strong> </strong>
{tabPaneItem.existMapComponent < 9 && ( {/* {tabPaneItem.existMapComponent < 9 && (
<Button <Button
type="primary" type="primary"
style={{ marginRight: '20px' }} style={{ marginRight: '20px' }}
...@@ -356,10 +370,7 @@ const WebConfigPage = props => { ...@@ -356,10 +370,7 @@ const WebConfigPage = props => {
> >
一键修复 一键修复
</Button> </Button>
)} )} */}
<Button type="primary" onClick={sort}>
网站调序
</Button>
</div> </div>
<MenuConfig <MenuConfig
menu={ menu={
...@@ -403,18 +414,39 @@ const WebConfigPage = props => { ...@@ -403,18 +414,39 @@ const WebConfigPage = props => {
<PageContainer> <PageContainer>
<div className={styles.webConfigContainer}> <div className={styles.webConfigContainer}>
<Spin spinning={loading || submitting}> <Spin spinning={loading || submitting}>
<Tabs <div style={{ display: 'flex', alignContent: 'center', justifyContent: 'flex-start' }}>
type="editable-card" <Tabs
onEdit={onEdit} type="editable-card"
onChange={handleTabChange} onEdit={onEdit}
activeKey={curWeb.id} onChange={handleTabChange}
> activeKey={curWeb.id}
{/* <TabPane key={99} tab="产品配置" closable={false}> >
{/* <TabPane key={99} tab="产品配置" closable={false}>
<ProductConfig /> <ProductConfig />
</TabPane> */} </TabPane> */}
{/* {webs.map(renderTabPane)} */} {/* {webs.map(renderTabPane)} */}
{webs.map(item => renderTabPane(item))} {webs.map(item => renderTabPane(item))}
</Tabs> </Tabs>
<Tooltip title="调序" placement="topRight">
<span
style={{
display: 'inline-block',
width: '40px',
height: '40px',
backgroundColor: '#FAFAFA',
marginLeft: '5px',
padding: '0 8px',
border: '1px solid #f0f0f0',
borderRadius: '2px 2px 0 0',
outline: 'none',
cursor: 'pointer',
}}
onClick={sort}
>
<OrderedListOutlined style={{ marginTop: '12px', marginLeft: '2px' }} />
</span>
</Tooltip>
</div>
<SiteConfig <SiteConfig
webs={webs} webs={webs}
productList={productList} productList={productList}
......
...@@ -65,6 +65,7 @@ const SortModal = props => { ...@@ -65,6 +65,7 @@ const SortModal = props => {
return ( return (
<Modal <Modal
title="网站调序"
width="600px" width="600px"
visible={visible} visible={visible}
onCancel={onCancel} onCancel={onCancel}
......
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